MCPcopy Create free account
hub / github.com/aurora-develop/aurora / appendToolDebugLog

Function appendToolDebugLog

initialize/handlers.go:2418–2426  ·  view source on GitHub ↗

appendToolDebugLog 把每次工具解析的输入文本和解析结果写入日志文件, 用于排查模型为什么没产生 tool_call。出错不影响主流程。

(path string, attempt int, text string, calls []officialtypes.ToolCall)

Source from the content-addressed store, hash-verified

2416// appendToolDebugLog 把每次工具解析的输入文本和解析结果写入日志文件,
2417// 用于排查模型为什么没产生 tool_call。出错不影响主流程。
2418func appendToolDebugLog(path string, attempt int, text string, calls []officialtypes.ToolCall) {
2419 f, err := os.OpenFile(path, os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0644)
2420 if err != nil {
2421 return
2422 }
2423 defer f.Close()
2424 callsJSON, _ := json.Marshal(calls)
2425 fmt.Fprintf(f, "\n=== attempt %d ===\ntext: %s\ncalls: %s\n", attempt, text, string(callsJSON))
2426}

Callers 1

handleToolCallingMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected