Skip to content

Commit

Permalink
Fix gui api
Browse files Browse the repository at this point in the history
  • Loading branch information
hlohaus committed Dec 28, 2024
1 parent 86e36ef commit ac087b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions g4f/gui/server/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def decorated_log(text: str):
conversations[provider][conversation_id] = chunk
if isinstance(chunk, JsonConversation):
yield self._format_json("conversation", {
provider: chunk.to_dict()
provider: chunk.get_dict()
})
else:
yield self._format_json("conversation_id", conversation_id)
Expand All @@ -167,7 +167,7 @@ def decorated_log(text: str):
images = ImageResponse(images, chunk.alt)
yield self._format_json("content", str(images))
elif isinstance(chunk, SynthesizeData):
yield self._format_json("synthesize", chunk.to_json())
yield self._format_json("synthesize", chunk.get_dict())
elif isinstance(chunk, TitleGeneration):
yield self._format_json("title", chunk.title)
elif isinstance(chunk, RequestLogin):
Expand Down

0 comments on commit ac087b1

Please sign in to comment.