From aba4b96f23ef38ca75195b3b78a88bb92035b4a9 Mon Sep 17 00:00:00 2001 From: Heiner Lohaus Date: Mon, 12 Feb 2024 11:41:27 +0100 Subject: Add new Client API with Docs Use object urls for the preview of image uploads. Fix upload images in You provider Fix create image. It's now a single image. Improve system message for create images. --- g4f/Provider/You.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'g4f/Provider/You.py') diff --git a/g4f/Provider/You.py b/g4f/Provider/You.py index 001f775d..ece1d340 100644 --- a/g4f/Provider/You.py +++ b/g4f/Provider/You.py @@ -58,9 +58,14 @@ class You(AsyncGeneratorProvider): "selectedChatMode": chat_mode, #"chat": json.dumps(chat), } + params = { + "userFiles": upload, + "selectedChatMode": chat_mode, + } async with (client.post if chat_mode == "default" else client.get)( f"{cls.url}/api/streamingSearch", data=data, + params=params, headers=headers, cookies=cookies ) as response: -- cgit v1.2.3