Skip to content

Commit 4769b6b

Browse files
committed
ensure stream parameter is checked correctly in request handling
1 parent 0e1318b commit 4769b6b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pkg/ollama/handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ func (h *Handler) proxyToCompletions(ctx context.Context, w http.ResponseWriter,
773773
}
774774
newReq.Header.Set("Content-Type", "application/json")
775775

776-
if openAIReq["stream"].(bool) {
776+
if stream, ok := openAIReq["stream"].(bool); ok && stream {
777777
// Use streaming response writer that processes SSE on the fly
778778
streamWriter := &streamingGenerateResponseWriter{
779779
w: w,

0 commit comments

Comments
 (0)