refactor: Simplify logging in RemoteAPIChat HTTP requests
- Removed header printing from the chatWithRawHTTP method to streamline logging. - Updated log message to focus on endpoint and model name, enhancing clarity while reducing verbosity.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user