From d0da5900c4d79b65a4ede95306530ce538265f05 Mon Sep 17 00:00:00 2001 From: Heiner Lohaus Date: Wed, 27 Mar 2024 19:04:00 +0100 Subject: Fix attr conversation_id not found --- g4f/Provider/needs_auth/OpenaiChat.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'g4f/Provider') diff --git a/g4f/Provider/needs_auth/OpenaiChat.py b/g4f/Provider/needs_auth/OpenaiChat.py index 72f9f224..331d524a 100644 --- a/g4f/Provider/needs_auth/OpenaiChat.py +++ b/g4f/Provider/needs_auth/OpenaiChat.py @@ -392,8 +392,8 @@ class OpenaiChat(AsyncGeneratorProvider, ProviderModelMixin): fields = Conversation() if conversation is None else copy(conversation) fields.finish_reason = None while fields.finish_reason is None: - conversation_id = conversation_id if fields.conversation_id is None else fields.conversation_id - parent_id = parent_id if fields.message_id is None else fields.message_id + conversation_id = fields.conversation_id if hasattr(fields, "conversation_id") else conversation_id + parent_id = fields.message_id if hasattr(fields, "message_id") else parent_id websocket_request_id = str(uuid.uuid4()) data = { "action": action, -- cgit v1.2.3