Commit b8f2f74
committed
fix: correct stream completion detection in OpenAI response
The stream was not properly detecting completion state in chat responses.
Changed the done condition to check for finish_reason presence instead of
relying on content parsing. This fixes premature stream termination and
ensures all response chunks are properly processed.1 parent 1281aa0 commit b8f2f74
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
| 173 | + | |
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
| |||
0 commit comments