summaryrefslogtreecommitdiffstats
path: root/g4f
diff options
context:
space:
mode:
authorHeiner Lohaus <hlohaus@users.noreply.github.com>2024-02-11 07:59:45 +0100
committerHeiner Lohaus <hlohaus@users.noreply.github.com>2024-02-11 07:59:45 +0100
commit333fb4d2c3e75b0a251fd684adcc229c89004fab (patch)
tree221fb396d9cfc024d38e4066bf587388cfd747a2 /g4f
parentAdd upload image support in You (diff)
downloadgpt4free-333fb4d2c3e75b0a251fd684adcc229c89004fab.tar
gpt4free-333fb4d2c3e75b0a251fd684adcc229c89004fab.tar.gz
gpt4free-333fb4d2c3e75b0a251fd684adcc229c89004fab.tar.bz2
gpt4free-333fb4d2c3e75b0a251fd684adcc229c89004fab.tar.lz
gpt4free-333fb4d2c3e75b0a251fd684adcc229c89004fab.tar.xz
gpt4free-333fb4d2c3e75b0a251fd684adcc229c89004fab.tar.zst
gpt4free-333fb4d2c3e75b0a251fd684adcc229c89004fab.zip
Diffstat (limited to 'g4f')
-rw-r--r--g4f/Provider/You.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/g4f/Provider/You.py b/g4f/Provider/You.py
index e1ae7f9e..001f775d 100644
--- a/g4f/Provider/You.py
+++ b/g4f/Provider/You.py
@@ -53,12 +53,12 @@ class You(AsyncGeneratorProvider):
}
data = {
"userFiles": upload,
- "selectedChatMode": chat_mode,
"q": format_prompt(messages),
"domain": "youchat",
+ "selectedChatMode": chat_mode,
#"chat": json.dumps(chat),
}
- async with client.post(
+ async with (client.post if chat_mode == "default" else client.get)(
f"{cls.url}/api/streamingSearch",
data=data,
headers=headers,
@@ -126,7 +126,7 @@ class You(AsyncGeneratorProvider):
auth_uuid = "507a52ad-7e69-496b-aee0-1c9863c7c8"
auth_token = f"public-token-live-{auth_uuid}bb:public-token-live-{auth_uuid}19"
auth = base64.standard_b64encode(auth_token.encode()).decode()
- return f"Basic {auth}",
+ return f"Basic {auth}"
@classmethod
async def create_cookies(cls, client: ClientSession) -> Cookies: