diff options
author | Heiner Lohaus <hlohaus@users.noreply.github.com> | 2023-11-22 21:20:46 +0100 |
---|---|---|
committer | Heiner Lohaus <hlohaus@users.noreply.github.com> | 2023-11-22 21:20:46 +0100 |
commit | fc74c8f3505e75fd12efadb9583865a6afcea72f (patch) | |
tree | 711c23b7843d12663fd34d886558da74ab6f5abc | |
parent | Fix Phind and GptGo Provider (diff) | |
download | gpt4free-fc74c8f3505e75fd12efadb9583865a6afcea72f.tar gpt4free-fc74c8f3505e75fd12efadb9583865a6afcea72f.tar.gz gpt4free-fc74c8f3505e75fd12efadb9583865a6afcea72f.tar.bz2 gpt4free-fc74c8f3505e75fd12efadb9583865a6afcea72f.tar.lz gpt4free-fc74c8f3505e75fd12efadb9583865a6afcea72f.tar.xz gpt4free-fc74c8f3505e75fd12efadb9583865a6afcea72f.tar.zst gpt4free-fc74c8f3505e75fd12efadb9583865a6afcea72f.zip |
-rw-r--r-- | g4f/Provider/Berlin.py | 2 | ||||
-rw-r--r-- | g4f/Provider/ChatAnywhere.py | 7 | ||||
-rw-r--r-- | g4f/Provider/ChatgptDemoAi.py | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/g4f/Provider/Berlin.py b/g4f/Provider/Berlin.py index bfdb1ef0..ac376fab 100644 --- a/g4f/Provider/Berlin.py +++ b/g4f/Provider/Berlin.py @@ -12,7 +12,7 @@ from .helper import format_prompt class Berlin(AsyncGeneratorProvider): url = "https://ai.berlin4h.top" - working = True + working = False supports_gpt_35_turbo = True _token = None diff --git a/g4f/Provider/ChatAnywhere.py b/g4f/Provider/ChatAnywhere.py index 704544e9..5f5f15de 100644 --- a/g4f/Provider/ChatAnywhere.py +++ b/g4f/Provider/ChatAnywhere.py @@ -1,6 +1,6 @@ from __future__ import annotations -from aiohttp import ClientSession +from aiohttp import ClientSession, ClientTimeout from ..typing import AsyncResult, Messages from .base_provider import AsyncGeneratorProvider @@ -10,7 +10,7 @@ class ChatAnywhere(AsyncGeneratorProvider): url = "https://chatanywhere.cn" supports_gpt_35_turbo = True supports_message_history = True - working = True + working = False @classmethod async def create_async_generator( @@ -18,6 +18,7 @@ class ChatAnywhere(AsyncGeneratorProvider): model: str, messages: Messages, proxy: str = None, + timeout: int = 120, temperature: float = 0.5, **kwargs ) -> AsyncResult: @@ -36,7 +37,7 @@ class ChatAnywhere(AsyncGeneratorProvider): "Connection": "keep-alive", "TE": "trailers" } - async with ClientSession(headers=headers) as session: + async with ClientSession(headers=headers, timeout=ClientTimeout(timeout)) as session: data = { "list": messages, "id": "s1_qYuOLXjI3rEpc7WHfQ", diff --git a/g4f/Provider/ChatgptDemoAi.py b/g4f/Provider/ChatgptDemoAi.py index 90d0c096..a8c98b65 100644 --- a/g4f/Provider/ChatgptDemoAi.py +++ b/g4f/Provider/ChatgptDemoAi.py @@ -9,7 +9,7 @@ from .helper import get_random_string class ChatgptDemoAi(AsyncGeneratorProvider): url = "https://chat.chatgptdemo.ai" - working = True + working = False supports_gpt_35_turbo = True supports_message_history = True |