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

XFEstudio/gpt4free

Fix select chat mode, fix auth value in You

333fb4d2
Heiner Lohaus <hlohaus@users.noreply.github.com>
提交于

代码差异

1 个文件 +3 -3
Modified g4f/Provider/You.py +3 -3
@@ -53,12 +53,12 @@ class You(AsyncGeneratorProvider):
53 53 }
54 54 data = {
55 55 "userFiles": upload,
56 "selectedChatMode": chat_mode,
57 56 "q": format_prompt(messages),
58 57 "domain": "youchat",
58 "selectedChatMode": chat_mode,
59 59 #"chat": json.dumps(chat),
60 60 }
61 async with client.post(
61 async with (client.post if chat_mode == "default" else client.get)(
62 62 f"{cls.url}/api/streamingSearch",
63 63 data=data,
64 64 headers=headers,
@@ -126,7 +126,7 @@ class You(AsyncGeneratorProvider):
126 126 auth_uuid = "507a52ad-7e69-496b-aee0-1c9863c7c8"
127 127 auth_token = f"public-token-live-{auth_uuid}bb:public-token-live-{auth_uuid}19"
128 128 auth = base64.standard_b64encode(auth_token.encode()).decode()
129 return f"Basic {auth}",
129 return f"Basic {auth}"
130 130
131 131 @classmethod
132 132 async def create_cookies(cls, client: ClientSession) -> Cookies: