# 温馨提示:不建议直接修改此文件,为了平台升级方便,建议将需要修改的参数值,复制到application.yml里进行覆盖该参数值。 spring: ai: # 在线大模型【请在 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} # 聊天对话模型 chat: options: # model: deepseek-ai/DeepSeek-R1-Distill-Qwen-7B # model: DeepSeek-R1-Distill-Qwen-14B model: deepseek-r1-distill-llama-8b max-tokens: 1024 temperature: 0.6 top-p: 0.9 frequency-penalty: 0 #logprobs: true # 向量库知识库模型(注意:不同的模型维度不同) embedding: options: # model: BAAI/bge-m3 # model: bge-large-zh-v1.5 # dimensions: 512 model: text-embedding-v3 dimensions: 1024 # 本地大模型配置【请在 pom.xml 中打开 ollama 的注释,并注释上其它模型】 ollama: base-url: http://localhost:11434 # 聊天对话模型 chat: options: model: qwen2.5 #model: deepseek-r1:7b max-tokens: 1024 temperature: 0.6 top-p: 0.7 frequency-penalty: 0 # 向量库知识库模型(注意:不同的模型维度不同) embedding: # 维度 dimensions 设置为 384 #model: all-minilm:33m # 维度 dimensions 设置为 768 #model: nomic-embed-text # 维度 dimensions 设置为 1024 model: bge-m3 # 向量数据库配置 vectorstore: # Chroma 向量数据库【请在 pom.xml 中打开 chroma 的注释,并注释上其它向量库】 chroma: client: host: http://testserver port: 8000 initialize-schema: true # collection-name: vector_store collection-name: vector_store_1024 # Postgresql 向量数据库(PG 连接配置,见下文,需要手动建表)【请在 pom.xml 中打开 pgvector 的注释,并注释上其它向量库】 pgvector: id-type: TEXT index-type: HNSW distance-type: COSINE_DISTANCE initialize-schema: false #table-name: vector_store_384 #dimensions: 384 #table-name: vector_store_786 #dimensions: 768 table-name: vector_store_1024 dimensions: 1024 max-document-batch-size: 10000 # ES 向量数据库(ES 连接配置,见下文)【请在 pom.xml 中打开 elasticsearch 的注释,并注释上其它向量库】 elasticsearch: index-name: vector-index initialize-schema: true dimensions: 1024 similarity: cosine # Milvus 向量数据库【请在 pom.xml 中打开 milvus 的注释,并注释上其它向量库】 milvus: client: host: "localhost" port: 19530 username: "root" password: "milvus" initialize-schema: true database-name: "default" collection-name: "vector_store" embedding-dimension: 384 index-type: HNSW metric-type: COSINE # 是否启用工具调用【例子详见 CmsAiTools.java 】 tool-calls: false # 默认系统提示词 default-system: | ## 人物设定 你是我的知识库AI助手,你把我当作朋友,耐心真诚地回复我提出的相关问题。 你需要遵循以下原则,与关注者进行友善而有价值的沟通。 ## 表达方式: 1. 使用简体中文回答我的问题。 2. 使用幽默有趣的方式与我沟通。 3. 可以用少量表情,避免过多表情。 4. 增加互动,如 “您的看法如何?” # 默认问题回答模板 default-prompt-template: | 上下文信息如下,用---------------------符号标出: --------------------- {question_answer_context} --------------------- 在提供上下文和历史信息的基础上,并且不使用先前知识的前提下回答用户的问题。 如果问题的答案不在上下文中,请告知用户你无法回答该问题。 # ========= Postgresql 向量数据库数据源 ========= #jdbc: # ds_pgvector: # type: postgresql # driver: org.postgresql.Driver # url: jdbc:postgresql://127.0.0.1:5433/jeesite-ai # username: postgres # password: postgres # testSql: SELECT 1 # pool: # init: 0 # minIdle: 0 # breakAfterAcquireFailure: true # ========= ES 向量数据库连接配置 ========= #spring.elasticsearch: # socket-timeout: 120s # connection-timeout: 120s # uris: http://127.0.0.1:9200 # username: elastic # password: elastic # 对话消息存缓存,可自定义存数据库 j2cache: caffeine: region: # 对话消息的超期时间,默认 30天,根据需要可以设置更久。 cmsChatCache: 100000, 30d cmsChatMsgCache: 100000, 30d #logging: # level: # org.springframework: debug