fix web_fetch
This commit is contained in:
parent
08599f8736
commit
17b5c39d56
1 changed files with 10 additions and 7 deletions
|
|
@ -651,14 +651,17 @@ func (t *WebFetchTool) Execute(ctx context.Context, args map[string]any) *ToolRe
|
|||
|
||||
resultJSON, _ := json.MarshalIndent(result, "", " ")
|
||||
|
||||
return &ToolResult{
|
||||
ForLLM: fmt.Sprintf(
|
||||
"Fetched %d bytes from %s (extractor: %s, truncated: %v)",
|
||||
forLLM := fmt.Sprintf(
|
||||
"Fetched %d bytes from %s (extractor: %s, truncated: %v)\nContent:\n%s",
|
||||
len(text),
|
||||
urlStr,
|
||||
extractor,
|
||||
truncated,
|
||||
text
|
||||
),
|
||||
|
||||
return &ToolResult{
|
||||
ForLLM: forLLM,
|
||||
ForUser: string(resultJSON),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue