Improve write_file fallback handling
This commit is contained in:
@@ -1614,11 +1614,10 @@ class LocalCodingAgent:
|
||||
f'工具:{name};位置:line {exc.lineno} column {exc.colno};'
|
||||
f'原因:{exc.msg};参数片段:{preview!r}。'
|
||||
'请回复“继续”,我会要求模型重新生成合法 JSON 参数;'
|
||||
'对于 product-data 生成数据,不要用 write_file 写大段 draft;'
|
||||
'应每批最多 8 条,直接用 python_exec 的 script_path 模式调用 '
|
||||
'skills/product-data/scripts/normalize_dataset_draft.py,'
|
||||
'通过 stdin 传入小批量 JSON,并把 normalize 结果追加到 '
|
||||
'scratchpad/normalized_records.jsonl。'
|
||||
'如果是 write_file 写多行文本,应改用 content_lines 或 content_base64;'
|
||||
'如果 write_file 仍不稳定,应改用 python_exec 作为通用写文件兜底;'
|
||||
'如果是生成/转换结构化数据,应优先调用对应 skill 脚本或 python_exec,'
|
||||
'不要把大段 JSON/CSV/draft 直接塞进工具参数;bash 仅作为最后兜底。'
|
||||
) from exc
|
||||
if not isinstance(arguments, dict):
|
||||
raise OpenAICompatError(
|
||||
|
||||
Reference in New Issue
Block a user