XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 1
返回提交历史

XFEstudio/gpt4free

Disable ChatgptDemoAi, ChatAnywhere and Berlin

fc74c8f3
Heiner Lohaus <hlohaus@users.noreply.github.com>
提交于

代码差异

3 个文件 +6 -5
Modified g4f/Provider/Berlin.py +1 -1
@@ -12,7 +12,7 @@ from .helper import format_prompt
12 12
13 13 class Berlin(AsyncGeneratorProvider):
14 14 url = "https://ai.berlin4h.top"
15 working = True
15 working = False
16 16 supports_gpt_35_turbo = True
17 17 _token = None
18 18
Modified g4f/Provider/ChatAnywhere.py +4 -3
@@ -1,6 +1,6 @@
1 1 from __future__ import annotations
2 2
3 from aiohttp import ClientSession
3 from aiohttp import ClientSession, ClientTimeout
4 4
5 5 from ..typing import AsyncResult, Messages
6 6 from .base_provider import AsyncGeneratorProvider
@@ -10,7 +10,7 @@ class ChatAnywhere(AsyncGeneratorProvider):
10 10 url = "https://chatanywhere.cn"
11 11 supports_gpt_35_turbo = True
12 12 supports_message_history = True
13 working = True
13 working = False
14 14
15 15 @classmethod
16 16 async def create_async_generator(
@@ -18,6 +18,7 @@ class ChatAnywhere(AsyncGeneratorProvider):
18 18 model: str,
19 19 messages: Messages,
20 20 proxy: str = None,
21 timeout: int = 120,
21 22 temperature: float = 0.5,
22 23 **kwargs
23 24 ) -> AsyncResult:
@@ -36,7 +37,7 @@ class ChatAnywhere(AsyncGeneratorProvider):
36 37 "Connection": "keep-alive",
37 38 "TE": "trailers"
38 39 }
39 async with ClientSession(headers=headers) as session:
40 async with ClientSession(headers=headers, timeout=ClientTimeout(timeout)) as session:
40 41 data = {
41 42 "list": messages,
42 43 "id": "s1_qYuOLXjI3rEpc7WHfQ",
Modified g4f/Provider/ChatgptDemoAi.py +1 -1
@@ -9,7 +9,7 @@ from .helper import get_random_string
9 9
10 10 class ChatgptDemoAi(AsyncGeneratorProvider):
11 11 url = "https://chat.chatgptdemo.ai"
12 working = True
12 working = False
13 13 supports_gpt_35_turbo = True
14 14 supports_message_history = True
15 15