Auto-Coder常用秘籍 autocoder.chat启动之后的处理

Auto-Coder手册:‍‌​​⁠​‍​‍‍‌‍‍⁠​​‬‌​​‬​‍⁠‬⁠⁠​​​‍​‌‬​​​‌‬‬⁠‍‌​‌​Auto-Coder.Chat: 通向智能编程之路 - 飞书云文档

控制窗口大小与压缩上下文

看到这篇文档里讲过:https://skywalk.blog.csdn.net/article/details/149067759

复制代码
/conf context_prune_safe_zone_tokens:30720
# /conf index_filter_model_max_input_length:30720
/conf index_filter_model_max_input_length:24576
/conf conversation_prune_safe_zone_tokens:24576

当时手里的模型token只有32k,所以三个参数都针对默认值进行了下调,下面为配置参数和默认值:

conversation_prune_safe_zone_tokens 上下文剪枝 51200

conversation_prune_safe_zone_tokens 索引文件建议51200

context_prune_safe_zone_tokens 单文件 24576

配置示例

64k窗口模型

复制代码
/conf conversation_prune_safe_zone_tokens:51200
/conf index_filter_model_max_input_length:51200
/conf context_prune_safe_zone_tokens:24576

128k窗口模型

对于token 窗口是128k的模型,可以选择翻一倍,即:

复制代码
/conf conversation_prune_safe_zone_tokens:102400
/conf index_filter_model_max_input_length:102400
/conf context_prune_safe_zone_tokens:49152

三个配置参数详解

conversation_prune_safe_zone_tokens

如果上下文过长,会触发剪枝动作。具体长度通过

/conf conversation_prune_safe_zone_tokens:51200

默认值为: 51200。 如果是 gemini 2.5 或者 quasar 等窗口很长的模型(code_model,chat_model,model),可以再翻一倍。

index_filter_model_max_input_length

索引文件很大(具体通过 index_filter_model_max_input_length) 来的判断是不是要分割处理。

/conf index_filter_model_max_input_length:51200

默认:51200 。 如果是窗口很大的的模型(index_model,model),可以试着至少提升一倍。

context_prune_safe_zone_tokens

配置单文件剪枝阈值

/conf context_prune_safe_zone_tokens:24576

碰到的问题

不过我也碰到了设置之后还是撑满的情况:

复制代码
conversation tokens: 180560 -> 101349 (conversation round: 352)
╭─ 🔥 Error ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Error: Connection failed. Error: r code: 400 - {'object': 'error', 'message': "This model's maximum context length is 131072 tokens. However, you │
│ requested 144864 tokens (136768 in the messages, 8096 in the completion). Please reduce the length of the messages or completion.", 'type':       │
│ 'BadRequestError', 'param': None, 'code': 400}    

所以我只能/auto /new 一下重新运行

相关推荐
狂师8 小时前
想做测试工具却不会写代码?怎么办?
人工智能·程序员·测试
xiangzhihong88 小时前
零基础学AI之机器学习原理
人工智能·机器学习·机器人
Aision_8 小时前
实习手记 Day:从 ELK 到 Agent 的“最后一公里”——告警消费与上下文富化
运维·人工智能·web安全·elk·网络安全·安全威胁分析
workbuddy小能手8 小时前
用 WorkBuddy 调混元 Hy3 做批量文档摘要:一个可运行的实战示例
人工智能·workbuddy
梦想的旅途28 小时前
企微私域 AI 创作:文案生成与 AI 配图自动化发布实战
人工智能·自动化·企业微信
Bruce_Liuxiaowei8 小时前
多模态AI在网络安全监控中的创新应用
人工智能·安全·web安全
java修仙传8 小时前
从网页禅道到 AI 能调用的工具:我的禅道 MCP 实现思路分享
java·人工智能·python·ai应用·mcp开发
乌恩大侠8 小时前
图解 AI-RAN开发需要哪些软硬件:O-RU、DGX Spark、Sionna与Aerial
人工智能·spark·o-ru·ai-ran
中电金信8 小时前
中电金信 :一站式企业智能体柔性生产全链路解决方案
大数据·人工智能