summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/Wuguokai.py
diff options
context:
space:
mode:
authorTekky <98614666+xtekky@users.noreply.github.com>2023-09-02 03:03:10 +0200
committerGitHub <noreply@github.com>2023-09-02 03:03:10 +0200
commit9de43a0e95aa0a4cb41caaec11573e74aad117c9 (patch)
tree5dcde56297e9dc0d2645412a7a660553445d45aa /g4f/Provider/Wuguokai.py
parent~ (diff)
parentUpdate readme (diff)
downloadgpt4free-9de43a0e95aa0a4cb41caaec11573e74aad117c9.tar
gpt4free-9de43a0e95aa0a4cb41caaec11573e74aad117c9.tar.gz
gpt4free-9de43a0e95aa0a4cb41caaec11573e74aad117c9.tar.bz2
gpt4free-9de43a0e95aa0a4cb41caaec11573e74aad117c9.tar.lz
gpt4free-9de43a0e95aa0a4cb41caaec11573e74aad117c9.tar.xz
gpt4free-9de43a0e95aa0a4cb41caaec11573e74aad117c9.tar.zst
gpt4free-9de43a0e95aa0a4cb41caaec11573e74aad117c9.zip
Diffstat (limited to 'g4f/Provider/Wuguokai.py')
-rw-r--r--g4f/Provider/Wuguokai.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/g4f/Provider/Wuguokai.py b/g4f/Provider/Wuguokai.py
index 906283ad..8a5aac0d 100644
--- a/g4f/Provider/Wuguokai.py
+++ b/g4f/Provider/Wuguokai.py
@@ -1,4 +1,4 @@
-import random, requests, json
+import random, requests
from ..typing import Any, CreateResult
from .base_provider import BaseProvider
@@ -6,8 +6,6 @@ from .base_provider import BaseProvider
class Wuguokai(BaseProvider):
url = 'https://chat.wuguokai.xyz'
supports_gpt_35_turbo = True
- supports_stream = False
- needs_auth = False
working = True
@staticmethod
@@ -43,7 +41,7 @@ class Wuguokai(BaseProvider):
"userId": f"#/chat/{random.randint(1,99999999)}",
"usingContext": True
}
- response = requests.post("https://ai-api20.wuguokai.xyz/api/chat-process", headers=headers, data=json.dumps(data),proxies=kwargs['proxy'] if 'proxy' in kwargs else {})
+ response = requests.post("https://ai-api20.wuguokai.xyz/api/chat-process", headers=headers, timeout=3, json=data, proxies=kwargs['proxy'] if 'proxy' in kwargs else {})
_split = response.text.split("> 若回答失败请重试或多刷新几次界面后重试")
if response.status_code == 200:
if len(_split) > 1: