Skip to content

Commit

Permalink
[fix][lmi] fix issue where streaming response that finishes with empt… (
Browse files Browse the repository at this point in the history
  • Loading branch information
siddvenk authored Feb 6, 2025
1 parent e249be7 commit ed821e5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ void addResponse(byte[] json, Map<String, String> properties) {
break;
}
}
if ((nextToken == null || nextToken.isEmpty()) && code == null) {
if ((nextToken == null || nextToken.isEmpty()) && !last) {
// in non-streaming cases, we do not return content until generation is finished
return;
}
Expand Down

0 comments on commit ed821e5

Please sign in to comment.