Files
smartmate/backend/config.example.yaml
Losita 634a9fb926 Version: 0.9.21.dev.260416
后端:
1. Memory 写入链路新增"召回→比对→汇总"去重决策层
- 新增决策流程:Runner 根据decision.enabled 配置走决策路径(语义召回候选 → Hash 精确命中 → LLM 逐对比对 → 汇总决策 → 执行 ADD/UPDATE/DELETE/NONE),默认关闭,旧路径完全保留
- 新增 LLMDecisionOrchestrator:单对关系判断编排器,输出 duplicate/update/conflict/unrelated 四种关系
- 新增 decision_flow / apply_actions:决策流程主循环与动作落地(新增、更新内容、软删除、跳过)
- 新增 aggregate_decision / decision_validate:汇总规则(按优先级判定动作)与 LLM 输出校验
- 新增 decision model:CandidateSnapshot / ComparisonResult / FinalDecision 等决策层核心类型
- ItemRepo 新增 FindActiveByHash / UpdateContentByID / SoftDeleteByID 三个决策层专用方法
- RAG Runtime / Pipeline / Service 新增 DeleteMemory 向量删除能力,MilvusStore 补充 duplicate collection 错误识别
- Runner 新增 syncVectorDeletes 处理决策层 DELETE 动作的向量清理
- config 新增 decision(enabled/candidateTopK/candidateMinScore/fallbackMode)和 write.mode 配置项,config_loader 增加默认值兜底
- 删除 HANDOFF-RAG复用后续实施计划.md 和旧 log.txt,新增 Log.txt 记录决策流程调试日志
- normalize_facts 导出 HashContent 供决策层复用,audit 新增 update 操作常量

前端:无 仓库:无
2026-04-16 12:11:58 +08:00

118 lines
3.6 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 应用配置文件示例
# 包含服务器、数据库等基础配置
# 请根据实际情况修改并保存为 config.yaml
server:
port: 8080
mode: debug
timeout: 30s
database:
host: localhost
port: 3306
user: smartflow_user
password: "put_your_database_password_here"
dbname: "put_your_database_name_here"
charset: utf8mb4
parseTime: true
loc: Local
jwt:
accessSecret: "put_your_jwt_access_secret_here"
refreshSecret: "put_your_jwt_refresh_secret_here"
accessTokenExpire: 15min
refreshTokenExpire: 7d
log:
level: info
path: logs/
redis:
host: localhost
port: 6379
password: ""
db: 0
kafka:
enabled: true
brokers:
- "localhost:9092"
topic: "smartflow.agent.outbox"
groupID: "smartflow-agent-outbox-consumer"
retryScanInterval: 1s
retryBatchSize: 100
maxRetry: 20
time:
zone: "Asia/Shanghai"
semesterStartDate: "2026-03-02" #学期开始日期,一定要设定为周一,以便于计算周数
semesterEndDate: "2026-07-19" #学期结束日期,一定要设定为周日,确保最后一周完整
agent:
workerModel: "doubao-seed-2-0-code-preview-260215" # 智能体使用的Worker模型需根据实际情况调整
strategistModel: "doubao-seed-2-0-code-preview-260215" # 策略师使用的Worker模型需根据实际情况调整
baseURL: "https://ark.cn-beijing.volces.com/api/v3" # Worker服务的基础URL需根据实际情况调整
dailyRefineConcurrency: 7 # 日内并发优化并发度,建议按模型配额调整
weeklyAdjustBudget: 5 # 周级跨天配平额度上限,防止过度调整
rag:
enabled: true
store: "milvus" # 可选inmemory / milvus
topK: 8
threshold: 0.55
retrieve:
timeoutMs: 1500
ingest:
chunkSize: 400
chunkOverlap: 80
embed:
provider: "eino" # 可选mock / eino
model: "doubao-embedding-vision-251215" # 例如 Ark/OpenAI 兼容 embedding 模型名
baseURL: "https://ark.cn-beijing.volces.com/api/v3" # 这里填服务根路径SDK 会自动拼接 /embeddingsAPI Key 统一从环境变量 ARK_API_KEY 读取
timeoutMs: 1200
dimension: 1024
reranker:
enabled: false
provider: "noop" # 当前默认 noop后续可扩展
milvus:
address: "http://localhost:19530" # Milvus REST 入口,当前联调确认不要填 9091 健康检查口
token: "root:Milvus"
dbName: ""
collectionName: "smartflow_rag_chunks"
metricType: "COSINE"
requestTimeoutMs: 1500
memory:
enabled: true
rag:
enabled: true
prompt:
extract: ""
decision: ""
threshold: 0.55
enableReranker: false
llm:
temperature: 0.1
topP: 0.2
job:
maxRetry: 6
worker:
pollEvery: 2s
claimBatch: 1
decision:
enabled: false # 决策层总开关,默认关闭。开启后写入链路走"召回→比对→汇总"流程
candidateTopK: 5 # Milvus 语义召回候选数上限
candidateMinScore: 0.6 # Milvus 语义召回最低相似度阈值
fallbackMode: legacy_add # 决策流程整体失败时的降级策略legacy_add退回旧路径/ drop丢弃
write:
mode: legacy # 写入模式legacy旧路径/ decision决策流程仅 decision.enabled=true 时生效
websearch:
provider: bocha # 可选mock | bochamock 为空实现,跑通链路用)
apiKey: "" # 搜索供应商 API Keybocha 模式必填,否则降级为 mock
timeout: 10s # 单次搜索请求超时
fetchTimeout: 15s # 单次 URL 抓取超时
fetchMaxChars: 4000 # 抓取正文最大字符数
rag:
enabled: false