Skip to content

Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous reasoning agent, and a self-maintaining Wiki.

refactor: Simplify logging in RemoteAPIChat HTTP requests

wizardchen9f916181db27
diff --git a/internal/models/chat/remote_api.go b/internal/models/chat/remote_api.go
index 88a0ee301..7f4be400d 100644
--- a/internal/models/chat/remote_api.go
+++ b/internal/models/chat/remote_api.go
@@ -368,13 +368,8 @@ func (c *RemoteAPIChat) chatWithRawHTTP(ctx context.Context, endpoint string, cu
httpReq.Header.Set("Authorization", "Bearer "+c.apiKey)
}
- // print headers
- headers, err := json.Marshal(httpReq.Header)
- if err != nil {
- return nil, fmt.Errorf("marshal headers: %w", err)
- }
- logger.Infof(ctx, "[LLM Request] Remote HTTP, endpoint=%s, model=%s, headers: %s",
- endpoint, c.modelName, string(headers))
+ logger.Infof(ctx, "[LLM Request] Remote HTTP, endpoint=%s, model=%s",
+ endpoint, c.modelName)
resp, err := rawHTTPClient.Do(httpReq)
if err != nil {