Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8467d66

Browse filesBrowse files
committed
chore: only strip leading whitespace
1 parent 246bc5b commit 8467d66
Copy full SHA for 8467d66

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

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

Copy file name to clipboardExpand all lines: src/openai/lib/streaming/chat/_completions.py
+1-1Lines changed: 1 addition & 1 deletion
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.