summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/needs_auth
diff options
context:
space:
mode:
authorH Lohaus <hlohaus@users.noreply.github.com>2024-01-13 18:12:21 +0100
committerGitHub <noreply@github.com>2024-01-13 18:12:21 +0100
commit691fac6db61cf91afbe9abe45e8bd3d47f985e01 (patch)
treefd1ddf447d186ee5e4c8977e5b937e4161392b4c /g4f/Provider/needs_auth
parentMerge pull request #1465 from hlohaus/upp (diff)
parentFix process_image in Bing (diff)
downloadgpt4free-691fac6db61cf91afbe9abe45e8bd3d47f985e01.tar
gpt4free-691fac6db61cf91afbe9abe45e8bd3d47f985e01.tar.gz
gpt4free-691fac6db61cf91afbe9abe45e8bd3d47f985e01.tar.bz2
gpt4free-691fac6db61cf91afbe9abe45e8bd3d47f985e01.tar.lz
gpt4free-691fac6db61cf91afbe9abe45e8bd3d47f985e01.tar.xz
gpt4free-691fac6db61cf91afbe9abe45e8bd3d47f985e01.tar.zst
gpt4free-691fac6db61cf91afbe9abe45e8bd3d47f985e01.zip
Diffstat (limited to '')
-rw-r--r--g4f/Provider/needs_auth/OpenaiChat.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/g4f/Provider/needs_auth/OpenaiChat.py b/g4f/Provider/needs_auth/OpenaiChat.py
index 4b11aeaf..a790f0de 100644
--- a/g4f/Provider/needs_auth/OpenaiChat.py
+++ b/g4f/Provider/needs_auth/OpenaiChat.py
@@ -13,7 +13,6 @@ from ...webdriver import get_browser, get_driver_cookies
from ...typing import AsyncResult, Messages
from ...requests import StreamSession
from ...image import to_image, to_bytes, ImageType, ImageResponse
-from ... import debug
models = {
"gpt-3.5": "text-davinci-002-render-sha",
@@ -242,9 +241,7 @@ class OpenaiChat(AsyncGeneratorProvider):
json=data,
headers={"Accept": "text/event-stream", **headers}
) as response:
- try:
- response.raise_for_status()
- except:
+ if not response.ok:
raise RuntimeError(f"Response {response.status_code}: {await response.text()}")
try:
last_message: int = 0