XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 1
返回提交历史

XFEstudio/gpt4free

fix: include conversation_id in prepare request for conversation continuity

The prepare request to /backend-api/f/conversation/prepare was missing conversation_id, causing ChatGPT to always create a new conversation even when continuing an existing one. This adds conversation_id to the prepare payload when available, matching the main request behavior. Fixes #2897, #3102

2b3a2ea7
aannoo <aannoo@users.noreply.github.com>
提交于

代码差异

1 个文件 +2 -0
Modified g4f/Provider/needs_auth/OpenaiChat.py +2 -0
@@ -464,6 +464,8 @@ class OpenaiChat(AsyncAuthedProvider, ProviderModelMixin):
464 464 }
465 465 if temporary:
466 466 data["history_and_training_disabled"] = True
467 if conversation.conversation_id is not None and not temporary:
468 data["conversation_id"] = conversation.conversation_id
467 469 async with session.post(
468 470 prepare_url,
469 471 json=data,