summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/needs_auth/OpenaiChat.py
diff options
context:
space:
mode:
authorHeiner Lohaus <hlohaus@users.noreply.github.com>2024-03-27 19:04:00 +0100
committerHeiner Lohaus <hlohaus@users.noreply.github.com>2024-03-27 19:04:00 +0100
commitd0da5900c4d79b65a4ede95306530ce538265f05 (patch)
tree6e151884eef7c1665abf994e94d2c7f11e4b3843 /g4f/Provider/needs_auth/OpenaiChat.py
parentFix load .har files, add hardir to docker, add docs (diff)
downloadgpt4free-d0da5900c4d79b65a4ede95306530ce538265f05.tar
gpt4free-d0da5900c4d79b65a4ede95306530ce538265f05.tar.gz
gpt4free-d0da5900c4d79b65a4ede95306530ce538265f05.tar.bz2
gpt4free-d0da5900c4d79b65a4ede95306530ce538265f05.tar.lz
gpt4free-d0da5900c4d79b65a4ede95306530ce538265f05.tar.xz
gpt4free-d0da5900c4d79b65a4ede95306530ce538265f05.tar.zst
gpt4free-d0da5900c4d79b65a4ede95306530ce538265f05.zip
Diffstat (limited to '')
-rw-r--r--g4f/Provider/needs_auth/OpenaiChat.py4
1 files changed, 2 insertions, 2 deletions
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,