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

XFEstudio/gpt4free

Fix conversation return logic in HuggingChat class

509b5b85
hlohaus <983577+hlohaus@users.noreply.github.com>
提交于

代码差异

1 个文件 +2 -3
Modified g4f/Provider/needs_auth/hf/HuggingChat.py +2 -3
@@ -108,14 +108,13 @@ class HuggingChat(AsyncAuthedProvider, ProviderModelMixin):
108 108 debug.log(f"Conversation created: {json.dumps(conversationId[8:] + '...')}")
109 109 messageId = cls.fetch_message_id(session, conversationId)
110 110 conversation.models[model] = {"conversationId": conversationId, "messageId": messageId}
111 if return_conversation:
112 yield conversation
113 111 inputs = format_prompt(messages)
114 112 else:
115 113 conversationId = conversation.models[model]["conversationId"]
116 114 conversation.models[model]["messageId"] = cls.fetch_message_id(session, conversationId)
117 115 inputs = get_last_user_message(messages)
118
116 if return_conversation:
117 yield conversation
119 118 settings = {
120 119 "inputs": inputs,
121 120 "id": conversation.models[model]["messageId"],