mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-07-28 01:27:58 +00:00
refactor(openai_compat): replace log.Printf with structured logger
This commit is contained in:
@@ -7,7 +7,6 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
"maps"
|
||||
"net/http"
|
||||
"net/url"
|
||||
@@ -769,7 +768,10 @@ func parseStreamResponse(
|
||||
raw := acc.argsJSON.String()
|
||||
if raw != "" {
|
||||
if err := json.Unmarshal([]byte(raw), &args); err != nil {
|
||||
log.Printf("openai_compat stream: failed to decode tool call arguments for %q: %v", acc.name, err)
|
||||
logger.WarnCF("openai_compat", "stream: failed to decode tool call arguments", map[string]any{
|
||||
"tool": acc.name,
|
||||
"error": err.Error(),
|
||||
})
|
||||
args["raw"] = raw
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user