后端: 1. 排程工具从 tools/ 根目录拆分为 tools/schedule 独立子包 - 12 个排程工具文件等价迁入 tools/schedule/,tools/ 根目录仅保留 registry.go 作为统一注册入口 - 所有依赖方(conv / model / node / prompt / service)import 统一切到 schedule 子包 2. Web 搜索工具链落地(tools/web 子包) - 新增 web_search(结构化检索)与 web_fetch(正文抓取)两个读工具,支持博查 API / mock 降级 - 启动流程按配置选择 provider,未识别类型自动降级为 mock,不阻断主流程 - 执行提示补齐 web 工具使用约束与返回值示例 - config.example.yaml 补齐 websearch 配置段 前端:无 仓库:无
113 lines
2.9 KiB
YAML
113 lines
2.9 KiB
YAML
# 应用配置文件示例
|
||
# 包含服务器、数据库等基础配置
|
||
# 请根据实际情况修改并保存为 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-1-6-lite-251015" # 智能体使用的Worker模型,需根据实际情况调整
|
||
strategistModel: "deepseek-v3-2-251201" # 策略师使用的Worker模型,需根据实际情况调整
|
||
baseURL: "https://ark.cn-beijing.volces.com/api/v3" # Worker服务的基础URL,需根据实际情况调整
|
||
dailyRefineConcurrency: 3 # 日内并发优化并发度,建议按模型配额调整
|
||
weeklyAdjustBudget: 5 # 周级跨天配平额度上限,防止过度调整
|
||
|
||
rag:
|
||
enabled: false
|
||
store: "inmemory" # 可选:inmemory / milvus
|
||
topK: 8
|
||
threshold: 0.55
|
||
retrieve:
|
||
timeoutMs: 1500
|
||
ingest:
|
||
chunkSize: 400
|
||
chunkOverlap: 80
|
||
embed:
|
||
provider: "mock" # 可选:mock / eino
|
||
model: "" # 例如 Ark/OpenAI 兼容 embedding 模型名
|
||
baseURL: "https://ark.cn-beijing.volces.com/api/v3"
|
||
apiKeyEnv: "ARK_API_KEY"
|
||
timeoutMs: 1200
|
||
dimension: 1024
|
||
reranker:
|
||
enabled: false
|
||
provider: "noop" # 当前默认 noop,后续可扩展
|
||
timeoutMs: 1200
|
||
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: false
|
||
prompt:
|
||
extract: ""
|
||
decision: ""
|
||
threshold: 0.55
|
||
enableReranker: false
|
||
llm:
|
||
temperature: 0.1
|
||
topP: 0.2
|
||
job:
|
||
maxRetry: 6
|
||
worker:
|
||
pollEvery: 2s
|
||
claimBatch: 1
|
||
|
||
websearch:
|
||
provider: mock # 可选:mock | bocha(mock 为空实现,跑通链路用)
|
||
apiKey: "" # 搜索供应商 API Key(bocha 模式必填,否则降级为 mock)
|
||
timeout: 10s # 单次搜索请求超时
|
||
fetchTimeout: 15s # 单次 URL 抓取超时
|
||
fetchMaxChars: 4000 # 抓取正文最大字符数
|
||
rag:
|
||
enabled: false
|