feat: 支持智能体置顶配置
This commit is contained in:
1 parent
1f2b1e3b8a
commit
bcebc8d5fb
20 files changed
+852
-310
No files matched your search
@@ -137,6 +137,28 @@ title:
|
||||
|
||||
User: {user_msg}
|
||||
Assistant: {assistant_msg}
|
||||
# 上下文压缩(对话摘要):长对话接近上下文上限时,把较早的消息总结成一段摘要,
|
||||
# 只保留最近若干条原始消息,避免撑爆模型上下文窗口。
|
||||
# - trigger:触发条件,可配多个,任意一个先满足就压缩(OR 关系)。
|
||||
# type=tokens 按 token 总数(最准,直接防溢出)
|
||||
# type=messages 按消息条数(简单直观,作兜底保险)
|
||||
# type=fraction 按模型上下文窗口的比例(如 0.8);自定义 base_url 模型可能探不到
|
||||
# 准确窗口,故此处用写死的 token 阈值更稳妥。
|
||||
# - keep:压缩后保留多少最近的上下文(同样支持 tokens / messages / fraction)。
|
||||
# - trim_tokens_to_summarize:喂给摘要模型的消息最多裁到多少 token。
|
||||
# - model_name:生成摘要用的模型(留空则用主对话模型)。
|
||||
summarization:
|
||||
enabled: true
|
||||
# model_name: deepseek-chat
|
||||
trigger:
|
||||
- type: tokens
|
||||
value: 60000
|
||||
- type: messages
|
||||
value: 80
|
||||
keep:
|
||||
type: messages
|
||||
value: 20
|
||||
trim_tokens_to_summarize: 4000
|
||||
skills:
|
||||
path: /app/skills
|
||||
security_scan:
|
||||
|
||||
Reference in new issue
Block a user