Skip to content

Commit 28287ae

Browse files
authored
fix: call slog correctly (#82)
Fixes call to slog. If called like this, I think slog would panic.
1 parent 2f9dd49 commit 28287ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

intercept_openai_chat_streaming.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ func (i *OpenAIStreamingChatInterception) ProcessRequest(w http.ResponseWriter,
137137
// Marshal and relay chunk to client.
138138
payload, err := i.marshalChunk(&chunk, i.ID(), processor)
139139
if err != nil {
140-
logger.Warn(ctx, "failed to marshal chunk", slog.Error(err), chunk.RawJSON())
140+
logger.Warn(ctx, "failed to marshal chunk", slog.Error(err), slog.F("chunk", chunk.RawJSON()))
141141
lastErr = fmt.Errorf("marshal chunk: %w", err)
142142
break
143143
}

0 commit comments

Comments
 (0)