Skip to content

配置说明

所有配置项均可通过环境变量覆盖。环境变量名采用大写下划线格式,例如 siliconflow.api-key 对应 SILICONFLOW_API_KEY

SiliconFlow 配置

属性环境变量默认值说明
siliconflow.api-keySILICONFLOW_API_KEY-API 密钥(必填)
siliconflow.base-url-https://api.siliconflow.cn/v1API 基础 URL
siliconflow.embedding-model-Qwen/Qwen3-Embedding-8BEmbedding 模型
siliconflow.chat-model-Qwen/Qwen3-32B对话模型
siliconflow.reranker-model-BAAI/bge-reranker-v2-m3Reranker 模型

Milvus 配置

属性环境变量默认值说明
milvus.uriMILVUS_URIhttp://localhost:19530Milvus 连接地址
milvus.collection-name-customer_service_chunks集合名称
milvus.vector-dim-4096向量维度

RAG 配置

属性默认值说明
rag.chunk-size500分块大小(字符数)
rag.chunk-overlap50分块重叠字符数
rag.top-k8最终返回的 Top-K 结果数
rag.dense-recall-top-k20Dense 检索召回数
rag.sparse-recall-top-k20Sparse BM25 检索召回数
rag.rrf-k60RRF 融合参数 K

会话记忆配置

属性默认值说明
memory.max-rounds5保留最近 N 轮对话
memory.token-threshold3000触发摘要压缩的 Token 阈值
memory.session-timeout-minutes30会话超时时间(分钟)
memory.summary-modelQwen/Qwen2.5-7B-Instruct摘要模型

安全配置

属性默认值说明
security.api-key.enabledfalse是否启用 API 认证(生产环境自动开启)

认证开启后,后端每次启动自动生成随机 Token 并打印到日志,同时写入 data/auth-token.txt。前端通过登录页输入 Token 进行认证。

其他配置

属性默认值说明
rewrite.enabledtrue是否启用问题重写
rewrite.modelQwen/Qwen2.5-7B-Instruct重写模型
tool.enabledtrue是否启用工具调用
tool.modelQwen/Qwen2.5-7B-Instruct工具调用模型
intent.enabledtrue是否启用意图识别
intent.modelQwen/Qwen2.5-7B-Instruct意图分类模型
intent.confidence-threshold0.5意图分类置信度阈值
cors.allowed-origins*CORS 允许的来源
file.storage.pathdata/documents/文档存储路径