summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/OpenaiChat.py
diff options
context:
space:
mode:
authorTekky <98614666+xtekky@users.noreply.github.com>2023-09-05 15:25:10 +0200
committerGitHub <noreply@github.com>2023-09-05 15:25:10 +0200
commit4323662008519396c598b4e14ab87923fadff923 (patch)
tree85ab7d042d3a77d3ca579e886b96d474fbfc6229 /g4f/Provider/OpenaiChat.py
parent~ |  Merge pull request #872 (diff)
parenttype hints (diff)
downloadgpt4free-4323662008519396c598b4e14ab87923fadff923.tar
gpt4free-4323662008519396c598b4e14ab87923fadff923.tar.gz
gpt4free-4323662008519396c598b4e14ab87923fadff923.tar.bz2
gpt4free-4323662008519396c598b4e14ab87923fadff923.tar.lz
gpt4free-4323662008519396c598b4e14ab87923fadff923.tar.xz
gpt4free-4323662008519396c598b4e14ab87923fadff923.tar.zst
gpt4free-4323662008519396c598b4e14ab87923fadff923.zip
Diffstat (limited to '')
-rw-r--r--g4f/Provider/OpenaiChat.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/g4f/Provider/OpenaiChat.py b/g4f/Provider/OpenaiChat.py
index 9ca0cd58..f2d1ed6f 100644
--- a/g4f/Provider/OpenaiChat.py
+++ b/g4f/Provider/OpenaiChat.py
@@ -1,14 +1,18 @@
+from __future__ import annotations
+
has_module = True
try:
from revChatGPT.V1 import AsyncChatbot
except ImportError:
has_module = False
-from .base_provider import AsyncGeneratorProvider, get_cookies, format_prompt
-from ..typing import AsyncGenerator
-from httpx import AsyncClient
import json
+from httpx import AsyncClient
+
+from ..typing import AsyncGenerator
+from .base_provider import AsyncGeneratorProvider, format_prompt, get_cookies
+
class OpenaiChat(AsyncGeneratorProvider):
url = "https://chat.openai.com"