From 99cfd71854b8ad7351e749575831ddcdf7e28173 Mon Sep 17 00:00:00 2001 From: Sashir Estela Date: Tue, 7 May 2024 23:46:11 +0000 Subject: [PATCH] Fix Sonar issue --- src/main/java/io/github/sashirestela/openai/OpenAI.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/io/github/sashirestela/openai/OpenAI.java b/src/main/java/io/github/sashirestela/openai/OpenAI.java index d4e2e99..fcdcd73 100644 --- a/src/main/java/io/github/sashirestela/openai/OpenAI.java +++ b/src/main/java/io/github/sashirestela/openai/OpenAI.java @@ -737,7 +737,7 @@ static AudioResponseFormat getResponseFormat(AudioResponseFormat currValue, Audi static ChatRequest updateRequest(ChatRequest chatRequest, Boolean useStream) { var updatedChatRequest = chatRequest.withStream(useStream); - if (useStream) { + if (Boolean.TRUE.equals(useStream)) { updatedChatRequest = updatedChatRequest.withStreamOptions(StreamOptions.of(useStream)); } if (!isNullOrEmpty(chatRequest.getTools()) && chatRequest.getToolChoice() == null) {