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 一下重新运行

相关推荐
skywalker_114 分钟前
Java中异常
java·开发语言·异常
2501_940315266 分钟前
航电oj:首字母变大写
开发语言·c++·算法
副露のmagic9 分钟前
深度学习基础复健
人工智能·深度学习
没有天赋那就反复9 分钟前
JAVA 静态方法
java·开发语言
番茄大王sc11 分钟前
2026年科研AI工具深度测评(一):文献调研与综述生成领域,维普科创助手领跑学术严谨性
人工智能·深度学习·考研·学习方法·论文笔记
Thomas_YXQ22 分钟前
Unity3D在ios平台下内存的优化详解
开发语言·macos·ios·性能优化·cocoa
代码丰25 分钟前
SpringAI+RAG向量库+知识图谱+多模型路由+Docker打造SmartHR智能招聘助手
人工智能·spring·知识图谱
咸甜适中28 分钟前
rust的docx-rs库,自定义docx模版批量生成docx文档(逐行注释)
开发语言·rust·docx·docx-rs
浒畔居32 分钟前
泛型编程与STL设计思想
开发语言·c++·算法
Fcy64838 分钟前
C++ 异常详解
开发语言·c++·异常