Skip to content

Commit

Permalink
Fix Sonar issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Sashir Estela committed May 7, 2024
1 parent 80ad962 commit 99cfd71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/io/github/sashirestela/openai/OpenAI.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 99cfd71

Please sign in to comment.