- RetrievedDocTracker 升级为域级+文档级双层记录(Map<sessionId, Map<domain, Set<filePath>>>) - LookupKnowledgeTool 新增 Min-Max 归一化层(BGE-M3 L2 距离→[0,1] similarity) - 三等级 relevanceLevel:PRECISE / HIGHLY_RELEVANT / REFERENCE + completenessHint 兜底信号 - LookupResult 新增 relevanceLevel、completenessHint、retrievedDomainsThisSession - Executor prompt 重写:4 条检索约束 + 合法出口不查全不追责,重复检索才惩罚 - 入库可观测性:V010 迁移 + retrieval_details JSON 扩展 - 归档 executor-action-memory-relevance change
160 lines
4.5 KiB
YAML
160 lines
4.5 KiB
YAML
server:
|
||
port: 9900
|
||
servlet:
|
||
encoding:
|
||
charset: UTF-8
|
||
enabled: true
|
||
force: true
|
||
|
||
file:
|
||
upload:
|
||
path: ./uploads
|
||
allowed-extensions: txt,md
|
||
|
||
# 知识库配置
|
||
knowledge:
|
||
base-path: knowledge_base/
|
||
|
||
milvus:
|
||
host: in03-4a578da0f27ce9d.serverless.aws-eu-central-1.cloud.zilliz.com
|
||
port: 443
|
||
username: ""
|
||
password: ""
|
||
database: db_4a578da0f27ce9d
|
||
timeout: 10000
|
||
token: d246a77f43a109685596e3c68ecfd359e1cd8b29d35c41d708160f02b97ae623d2ab392738df740d0c77b58ca1bbadfa7c412140
|
||
secure: true
|
||
vector-dim: 1024 # BGE-M3 = 1024,换模型时同步改
|
||
|
||
# =====================================================
|
||
# 模型路由配置
|
||
# =====================================================
|
||
# 通过关键字匹配 Bean,切换模型只改这里 + 对应 api-key
|
||
# Chat: deepseek | openai | ollama | ...
|
||
# Embedding: siliconflow | openai | ollama | dashscope | ...
|
||
# =====================================================
|
||
|
||
model-routing:
|
||
chat: deepseek
|
||
embedding: siliconflow
|
||
|
||
spring:
|
||
# =====================================================
|
||
# 数据源配置 (MySQL)
|
||
# =====================================================
|
||
datasource:
|
||
url: jdbc:mysql://119.29.78.52:33306/superbiz_agent?useUnicode=true&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
|
||
username: root
|
||
password: '!Fucker123..'
|
||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||
|
||
# =====================================================
|
||
# JPA 配置
|
||
# =====================================================
|
||
jpa:
|
||
hibernate:
|
||
ddl-auto: validate # Flyway 管理表结构,这里使用 validate
|
||
show-sql: true
|
||
properties:
|
||
hibernate:
|
||
format_sql: true
|
||
dialect: org.hibernate.dialect.MySQL8Dialect
|
||
|
||
# =====================================================
|
||
# Flyway 数据库迁移配置
|
||
# =====================================================
|
||
flyway:
|
||
enabled: true
|
||
baseline-on-migrate: true
|
||
locations: classpath:db/migration
|
||
|
||
# =====================================================
|
||
# Redis 配置
|
||
# =====================================================
|
||
data:
|
||
redis:
|
||
host: 119.29.78.52
|
||
port: 33308
|
||
password: '!Fucker123..'
|
||
database: 0
|
||
timeout: 3000
|
||
lettuce:
|
||
pool:
|
||
max-active: 8
|
||
max-idle: 8
|
||
min-idle: 0
|
||
|
||
ai:
|
||
# --- Chat: DeepSeek (原生) ---
|
||
deepseek:
|
||
api-key: sk-1f44696abe644bd684f09cc43f12c557
|
||
base-url: https://api.deepseek.com
|
||
chat:
|
||
options:
|
||
model: deepseek-v4-flash
|
||
|
||
# --- OpenAI 模块供 SiliconFlow Embedding 复用 ---
|
||
openai:
|
||
api-key: unused
|
||
|
||
# Spring AI MCP 客户端配置
|
||
mcp:
|
||
client:
|
||
enabled: false
|
||
|
||
# --- Embedding: SiliconFlow BGE-M3 ---
|
||
siliconflow:
|
||
api-key: sk-rlxqcnlohjqwkzoffollthmzzfiohngdrabrmmqhcgtewnzx
|
||
base-url: https://api.siliconflow.cn
|
||
embedding:
|
||
model: BAAI/bge-m3
|
||
|
||
# 文档分片配置
|
||
document:
|
||
chunk:
|
||
max-size: 800
|
||
overlap: 100
|
||
|
||
# RAG 配置
|
||
rag:
|
||
top-k: 3 # 检索返回的最相似文档数量
|
||
|
||
# 检索归一化配置
|
||
retrieval:
|
||
normalization:
|
||
max-l2-distance: 2.0 # L2 距离上界(BGE-M3 单位向量 = 2.0)
|
||
highly-relevant-threshold: 0.75 # similarity >= 0.75 → HIGHLY_RELEVANT
|
||
reference-threshold: 0.5 # similarity >= 0.5 → REFERENCE
|
||
|
||
# Prometheus 配置
|
||
prometheus:
|
||
base-url: http://localhost:9090
|
||
timeout: 10 # 超时时间(秒)
|
||
mock-enabled: true # 是否启用 Mock 模式(用于测试)
|
||
|
||
# CLS 云日志服务配置
|
||
cls:
|
||
mock-enabled: true # 是否启用 Mock 模式(用于测试,设为 true 返回与告警关联的模拟日志数据)
|
||
|
||
# =====================================================
|
||
# 日志配置
|
||
# =====================================================
|
||
logging:
|
||
file:
|
||
name: logs/application.log # 日志文件路径
|
||
pattern:
|
||
console: "%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n"
|
||
file: "%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n"
|
||
level:
|
||
root: INFO
|
||
com.superbiz.agent: DEBUG # 本项目包日志级别设为 DEBUG
|
||
org.springframework.ai: DEBUG # Spring AI 日志
|
||
org.springframework.data: INFO # Spring Data 日志
|
||
org.hibernate: INFO # Hibernate 日志
|
||
com.alibaba.cloud: INFO
|
||
logback:
|
||
rollingpolicy:
|
||
max-file-size: 10MB # 单个日志文件最大 10MB
|
||
max-history: 30 # 保留 30 天
|
||
total-size-cap: 1GB # 所有日志文件总大小上限 1GB
|