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.
This commit is contained in:
Heiner Lohaus 2024-02-12 11:41:27 +01:00
parent 9aeae65b9b
commit aba4b96f23
14 changed files with 480 additions and 125 deletions

View file

@ -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: