fix: 角色agent轮数15→30 + read_file截断8000→30000(减少分段读浪费)
This commit is contained in:
parent
8371d95101
commit
b3ddb59e2e
@ -543,7 +543,7 @@ async def _exec_agent_tool(tool, params, workspace_dir):
|
||||
if not _is_safe_workdir(full): return 'FAIL: 路径不在允许范围'
|
||||
if not os.path.isfile(full): return f'FAIL: 文件不存在 {path}'
|
||||
with open(full, encoding='utf-8') as f:
|
||||
return f.read()[:8000]
|
||||
return f.read()[:30000]
|
||||
elif tool == 'write_file':
|
||||
path = p.get('path', '')
|
||||
content = p.get('content', '')
|
||||
@ -649,7 +649,7 @@ async def role_agent_run(project_id, role, agent_id=None, model_name=None):
|
||||
ask_question = None
|
||||
|
||||
# ── Tool Loop(原生 function calling)──
|
||||
for turn in range(15):
|
||||
for turn in range(30):
|
||||
try:
|
||||
resp = await llm_call_msgs_native(msgs, tools=tools_schema, model=model_name, temperature=0.4)
|
||||
except Exception as e:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user