diff --git a/modules/cms-ai/src/main/resources/config/jeesite-cms-ai.yml b/modules/cms-ai/src/main/resources/config/jeesite-cms-ai.yml index 552e8c69..94ceb69f 100644 --- a/modules/cms-ai/src/main/resources/config/jeesite-cms-ai.yml +++ b/modules/cms-ai/src/main/resources/config/jeesite-cms-ai.yml @@ -5,31 +5,59 @@ spring: # 在线大模型【请在 pom.xml 中打开 openai 的注释,并注释上其它模型】 openai: -# base-url: https://api.siliconflow.cn -# api-key: ${SFLOW_APP_KEY} -# base-url: https://ai.gitee.com -# api-key: ${GITEE_APP_KEY} - base-url: https://dashscope.aliyuncs.com/compatible-mode - api-key: ${BAILIAN_APP_KEY} + + # 硅基流动 + base-url: https://api.siliconflow.cn + api-key: ${SFLOW_APP_KEY} # 聊天对话模型 chat: options: -# model: deepseek-ai/DeepSeek-R1-Distill-Qwen-7B -# model: DeepSeek-R1-Distill-Qwen-14B - model: deepseek-r1-distill-llama-8b + model: deepseek-ai/DeepSeek-R1-Distill-Qwen-7B max-tokens: 1024 temperature: 0.6 top-p: 0.9 frequency-penalty: 0 - #logprobs: true # 向量库知识库模型(注意:不同的模型维度不同) embedding: options: -# model: BAAI/bge-m3 + model: BAAI/bge-m3 + dimensions: 512 + +# # 模力方舟 +# base-url: https://ai.gitee.com +# api-key: ${GITEE_APP_KEY} +# # 聊天对话模型 +# chat: +# options: +# model: DeepSeek-R1-Distill-Qwen-14B +# max-tokens: 1024 +# temperature: 0.6 +# top-p: 0.9 +# frequency-penalty: 0 +# #logprobs: true +# # 向量库知识库模型(注意:不同的模型维度不同) +# embedding: +# options: # model: bge-large-zh-v1.5 # dimensions: 512 - model: text-embedding-v3 - dimensions: 1024 + +# # 阿里百炼 +# base-url: https://dashscope.aliyuncs.com/compatible-mode +# api-key: ${BAILIAN_APP_KEY} +# # 聊天对话模型 +# chat: +# options: +# model: deepseek-r1-distill-llama-8b +# max-tokens: 1024 +# temperature: 0.6 +# top-p: 0.9 +# frequency-penalty: 0 +# #logprobs: true +# # 向量库知识库模型(注意:不同的模型维度不同) +# embedding: +# options: +# model: text-embedding-v3 +# dimensions: 1024 # 本地大模型配置【请在 pom.xml 中打开 ollama 的注释,并注释上其它模型】 ollama: @@ -61,8 +89,8 @@ spring: host: http://testserver port: 8000 initialize-schema: true -# collection-name: vector_store - collection-name: vector_store_1024 + collection-name: vector_store +# collection-name: vector_store_1024 # Postgresql 向量数据库(PG 连接配置,见下文,需要手动建表)【请在 pom.xml 中打开 pgvector 的注释,并注释上其它向量库】 pgvector: @@ -105,22 +133,16 @@ spring: # 默认系统提示词 default-system: | ## 人物设定 - 你是我的知识库AI助手,你把我当作朋友,耐心真诚地回复我提出的相关问题。 - 你需要遵循以下原则,与关注者进行友善而有价值的沟通。 + 你是我的知识库AI助手,请耐心真诚地回复我提出的相关问题。 + 你需要遵循以下原则,与我进行友善而有价值的沟通。 ## 表达方式: 1. 使用简体中文回答我的问题。 - 2. 使用幽默有趣的方式与我沟通。 - 3. 可以用少量表情,避免过多表情。 - 4. 增加互动,如 “您的看法如何?” + 2. 可以用少量表情,避免过多表情。 # 默认问题回答模板 default-prompt-template: | - 上下文信息如下,用---------------------符号标出: - --------------------- - {question_answer_context} - --------------------- - 在提供上下文和历史信息的基础上,并且不使用先前知识的前提下回答用户的问题。 - 如果问题的答案不在上下文中,请告知用户你无法回答该问题。 + {question_answer_context} + 在提供上下文和历史信息的基础上,优先回答最后一条用户的问题。 # ========= Postgresql 向量数据库数据源 =========