summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/GptGod.py
diff options
context:
space:
mode:
authorabc <98614666+xtekky@users.noreply.github.com>2023-10-21 01:52:19 +0200
committerabc <98614666+xtekky@users.noreply.github.com>2023-10-21 01:52:19 +0200
commitae8dae82cffb07eeeecc5b07ffc9b502e92bfe62 (patch)
tree6b24ca9b43ad4ace9347dbce2a66c000b9e12e28 /g4f/Provider/GptGod.py
parent~ | g4f v-0.1.7.0 (diff)
downloadgpt4free-ae8dae82cffb07eeeecc5b07ffc9b502e92bfe62.tar
gpt4free-ae8dae82cffb07eeeecc5b07ffc9b502e92bfe62.tar.gz
gpt4free-ae8dae82cffb07eeeecc5b07ffc9b502e92bfe62.tar.bz2
gpt4free-ae8dae82cffb07eeeecc5b07ffc9b502e92bfe62.tar.lz
gpt4free-ae8dae82cffb07eeeecc5b07ffc9b502e92bfe62.tar.xz
gpt4free-ae8dae82cffb07eeeecc5b07ffc9b502e92bfe62.tar.zst
gpt4free-ae8dae82cffb07eeeecc5b07ffc9b502e92bfe62.zip
Diffstat (limited to 'g4f/Provider/GptGod.py')
-rw-r--r--g4f/Provider/GptGod.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/g4f/Provider/GptGod.py b/g4f/Provider/GptGod.py
index 6c975389..060500a9 100644
--- a/g4f/Provider/GptGod.py
+++ b/g4f/Provider/GptGod.py
@@ -8,7 +8,7 @@ from .helper import format_prompt
class GptGod(AsyncGeneratorProvider):
url = "https://gptgod.site"
supports_gpt_35_turbo = True
- working = True
+ working = False
@classmethod
async def create_async_generator(
@@ -18,6 +18,7 @@ class GptGod(AsyncGeneratorProvider):
proxy: str = None,
**kwargs
) -> AsyncResult:
+
headers = {
"User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/118.0",
"Accept": "text/event-stream",
@@ -32,6 +33,7 @@ class GptGod(AsyncGeneratorProvider):
"Pragma": "no-cache",
"Cache-Control": "no-cache",
}
+
async with ClientSession(headers=headers) as session:
prompt = format_prompt(messages)
data = {
@@ -42,6 +44,8 @@ class GptGod(AsyncGeneratorProvider):
response.raise_for_status()
event = None
async for line in response.content:
+ print(line)
+
if line.startswith(b'event: '):
event = line[7:-1]
elif event == b"data" and line.startswith(b"data: "):