Skip to content

Commit 62a95d5

Browse files
committed
fix: use correct Black version formatting for streaming_handler.py
Reformat with Black 23.x to match CI's version requirement. The previous formatting commit used a newer Black version. Signed-off-by: majiayu000 <1835304752@qq.com>
1 parent 51bbec7 commit 62a95d5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

litellm/litellm_core_utils/streaming_handler.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@ def __init__(
127127

128128
self.system_fingerprint: Optional[str] = None
129129
self.received_finish_reason: Optional[str] = None
130-
self.intermittent_finish_reason: Optional[str] = (
131-
None # finish reasons that show up mid-stream
132-
)
130+
self.intermittent_finish_reason: Optional[
131+
str
132+
] = None # finish reasons that show up mid-stream
133133
self.special_tokens = [
134134
"<|assistant|>",
135135
"<|system|>",
@@ -1516,9 +1516,9 @@ def chunk_creator(self, chunk: Any): # type: ignore # noqa: PLR0915
15161516
t.function.arguments = ""
15171517
_json_delta = delta.model_dump()
15181518
if "role" not in _json_delta or _json_delta["role"] is None:
1519-
_json_delta["role"] = (
1520-
"assistant" # mistral's api returns role as None
1521-
)
1519+
_json_delta[
1520+
"role"
1521+
] = "assistant" # mistral's api returns role as None
15221522
if "tool_calls" in _json_delta and isinstance(
15231523
_json_delta["tool_calls"], list
15241524
):

0 commit comments

Comments
 (0)