From 37b91e6dace1f023e07b06ce8293c13fe9811e79 Mon Sep 17 00:00:00 2001 From: Heiner Lohaus Date: Fri, 19 Apr 2024 14:07:56 +0200 Subject: [PATCH] Fix image generation in OpenaiChat --- g4f/Provider/needs_auth/OpenaiChat.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/g4f/Provider/needs_auth/OpenaiChat.py b/g4f/Provider/needs_auth/OpenaiChat.py index 07620c80361..ae02896543c 100644 --- a/g4f/Provider/needs_auth/OpenaiChat.py +++ b/g4f/Provider/needs_auth/OpenaiChat.py @@ -533,6 +533,8 @@ async def iter_messages_line(cls, session: StreamSession, line: bytes, fields: C return if line["message"]["metadata"]["message_type"] not in ("next", "continue", "variant"): return + if line["message"]["recipient"] != "all": + return if fields.conversation_id is None: fields.conversation_id = line["conversation_id"] fields.message_id = line["message"]["id"]