summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/Aura.py
diff options
context:
space:
mode:
authorHeiner Lohaus <hlohaus@users.noreply.github.com>2024-01-27 02:00:44 +0100
committerHeiner Lohaus <hlohaus@users.noreply.github.com>2024-01-27 02:00:44 +0100
commit47b50b4827121ec68d9e52a018b631a4a3f09625 (patch)
treed4d9d2040f8588634413be86d7e24b914fa6e29c /g4f/Provider/Aura.py
parentFix: ChromeDriver only supports characters in the BMP (diff)
downloadgpt4free-47b50b4827121ec68d9e52a018b631a4a3f09625.tar
gpt4free-47b50b4827121ec68d9e52a018b631a4a3f09625.tar.gz
gpt4free-47b50b4827121ec68d9e52a018b631a4a3f09625.tar.bz2
gpt4free-47b50b4827121ec68d9e52a018b631a4a3f09625.tar.lz
gpt4free-47b50b4827121ec68d9e52a018b631a4a3f09625.tar.xz
gpt4free-47b50b4827121ec68d9e52a018b631a4a3f09625.tar.zst
gpt4free-47b50b4827121ec68d9e52a018b631a4a3f09625.zip
Diffstat (limited to 'g4f/Provider/Aura.py')
-rw-r--r--g4f/Provider/Aura.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/g4f/Provider/Aura.py b/g4f/Provider/Aura.py
index 06887425..126c8d0f 100644
--- a/g4f/Provider/Aura.py
+++ b/g4f/Provider/Aura.py
@@ -1,5 +1,7 @@
from __future__ import annotations
+
from aiohttp import ClientSession
+
from ..typing import AsyncResult, Messages
from .base_provider import AsyncGeneratorProvider
@@ -23,7 +25,7 @@ class Aura(AsyncGeneratorProvider):
"Content-Type": "application/json",
"Origin": f"{cls.url}",
"Referer": f"{cls.url}/",
- "Sec-Ch-Ua": '"Not_A Brand";v="8", "Chromium";v="120", "Google Chrome";v="120"',
+ "Sec-Ch-Ua": '"Not_A Brand";v="8", "Chromium";v="120", "Google Chrome";v="120"',
"Sec-Ch-Ua-Mobile": "?0",
"Sec-Ch-Ua-Platform": '"Linux"',
"Sec-Fetch-Dest": "empty",
@@ -52,5 +54,6 @@ class Aura(AsyncGeneratorProvider):
"temperature": 0.5
}
async with session.post(f"{cls.url}/api/chat", json=data, proxy=proxy) as response:
+ response.raise_for_status()
async for chunk in response.content.iter_any():
yield chunk.decode() \ No newline at end of file