From dec27987f2a5e558a2a2fb1af4c15df4c90a1c9d Mon Sep 17 00:00:00 2001 From: zwl <1633720889@qq.com> Date: Mon, 2 Dec 2024 08:07:05 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=A2=98=E7=9B=AE?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=E5=88=B0=E7=9F=A5=E8=AF=86=E5=BA=93=E7=9A=84?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .run/docker.run.xml | 2 +- doc/template.docx | Bin 0 -> 9947 bytes go.mod | 11 +- go.sum | 18 ++- internal/ai/internal/domain/knowledge_base.go | 24 +++ internal/ai/internal/domain/llm.go | 1 + .../ai/internal/integration/doc/template.docx | Bin 0 -> 9947 bytes .../internal/integration/llm_config_test.go | 5 +- .../integration/llm_knowledge_base_test.go | 44 ++++++ .../internal/integration/llm_service_test.go | 6 +- .../ai/internal/integration/startup/wire.go | 16 ++ .../internal/integration/startup/wire_gen.go | 22 ++- internal/ai/internal/repository/config.go | 51 +++--- internal/ai/internal/repository/dao/init.go | 1 + .../repository/dao/repository_base.go | 79 ++++++++++ .../ai/internal/repository/knowledge_base.go | 48 ++++++ .../service/llm/knowledge_base/type.go | 15 ++ .../service/llm/knowledge_base/zhipu/zhipu.go | 114 ++++++++++++++ internal/ai/internal/web/admin_handler.go | 1 + internal/ai/internal/web/vo.go | 1 + internal/ai/knowledge_base.go | 23 +++ internal/ai/mocks/knowledge_base.mock.go | 80 ++++++++++ internal/ai/module.go | 7 +- internal/ai/type.go | 8 + internal/ai/wire.go | 4 + .../integration/knowledge_base_test.go | 146 ++++++++++++++++++ .../internal/integration/startup/wire.go | 8 +- .../internal/integration/startup/wire_gen.go | 19 ++- .../internal/repository/dao/question.go | 12 ++ .../question/internal/repository/question.go | 7 + .../internal/service/knowledge_base.go | 75 +++++++++ .../question/internal/web/knowledge_base.go | 27 ++++ internal/question/knowlegde_base.go | 20 +++ internal/question/module.go | 2 + internal/question/types.go | 1 + internal/question/wire.go | 5 +- internal/question/wire_gen.go | 6 +- .../resume/internal/repository/dao/project.go | 2 +- internal/resume/internal/web/project.go | 18 ++- ioc/admin.go | 1 + 40 files changed, 858 insertions(+), 72 deletions(-) create mode 100644 doc/template.docx create mode 100644 internal/ai/internal/domain/knowledge_base.go create mode 100644 internal/ai/internal/integration/doc/template.docx create mode 100644 internal/ai/internal/integration/llm_knowledge_base_test.go create mode 100644 internal/ai/internal/repository/dao/repository_base.go create mode 100644 internal/ai/internal/repository/knowledge_base.go create mode 100644 internal/ai/internal/service/llm/knowledge_base/type.go create mode 100644 internal/ai/internal/service/llm/knowledge_base/zhipu/zhipu.go create mode 100644 internal/ai/knowledge_base.go create mode 100644 internal/ai/mocks/knowledge_base.mock.go create mode 100644 internal/question/internal/integration/knowledge_base_test.go create mode 100644 internal/question/internal/service/knowledge_base.go create mode 100644 internal/question/internal/web/knowledge_base.go create mode 100644 internal/question/knowlegde_base.go diff --git a/.run/docker.run.xml b/.run/docker.run.xml index e5c474b9..75d95be7 100644 --- a/.run/docker.run.xml +++ b/.run/docker.run.xml @@ -1,5 +1,5 @@ - +