Skip to content

Commit

Permalink
fix: Linter
Browse files Browse the repository at this point in the history
  • Loading branch information
ramedina86 committed May 15, 2024
1 parent a640f6f commit 5a419fa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/streamsync/ai.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ def _process_completion_data_chunk(choice: StreamingData) -> str:
def _process_chat_data_chunk(chat_data: Chat) -> dict:
choices = chat_data.choices
for entry in choices:
message = cast(dict, entry).get("message")
dict_entry = cast(dict, entry)
message = cast(dict, dict_entry["message"])
return message
raise ValueError("Failed to retrieve text from chat stream")

Expand Down

0 comments on commit 5a419fa

Please sign in to comment.