summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/Aura.py
diff options
context:
space:
mode:
authorH Lohaus <hlohaus@users.noreply.github.com>2024-01-27 16:09:21 +0100
committerGitHub <noreply@github.com>2024-01-27 16:09:21 +0100
commit0d83bdeef91001c7c00d69f79fccad5a78b4b94b (patch)
tree362ebeb245cc4e123914635b03f890a314a7a40d /g4f/Provider/Aura.py
parentMerge pull request #1512 from KennyPhan123/patch-1 (diff)
parentFix PerplexityLabs Provider, Improve bypass_cloudflare helper (diff)
downloadgpt4free-0d83bdeef91001c7c00d69f79fccad5a78b4b94b.tar
gpt4free-0d83bdeef91001c7c00d69f79fccad5a78b4b94b.tar.gz
gpt4free-0d83bdeef91001c7c00d69f79fccad5a78b4b94b.tar.bz2
gpt4free-0d83bdeef91001c7c00d69f79fccad5a78b4b94b.tar.lz
gpt4free-0d83bdeef91001c7c00d69f79fccad5a78b4b94b.tar.xz
gpt4free-0d83bdeef91001c7c00d69f79fccad5a78b4b94b.tar.zst
gpt4free-0d83bdeef91001c7c00d69f79fccad5a78b4b94b.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