Skip to content

Commit 4fc5252

Browse files
RobertCraigiestainless-app[bot]
authored andcommitted
chore: only strip leading whitespace
1 parent b3f0daf commit 4fc5252

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/openai/lib/streaming/chat/_completions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ def _accumulate_chunk(self, chunk: ChatCompletionChunk) -> ParsedChatCompletionS
439439
and not choice_snapshot.message.refusal
440440
and is_given(self._rich_response_format)
441441
# partial parsing fails on white-space
442-
and choice_snapshot.message.content.strip()
442+
and choice_snapshot.message.content.lstrip()
443443
):
444444
choice_snapshot.message.parsed = from_json(
445445
bytes(choice_snapshot.message.content, "utf-8"),

0 commit comments

Comments
 (0)