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

XFEstudio/gpt4free

Enable Liaobots, disable Phind provider

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

代码差异

8 个文件 +17 -13
Modified README.md +3 -3
@@ -235,10 +235,10 @@ set G4F_PROXY=http://host:port
235 235 | ------ | ------- | ------- | ----- | ------ | ------ | ---- |
236 236 | [bing.com](https://bing.com/chat) | `g4f.Provider.Bing` | ❌ | ✔️ | ✔️ | ![Active](https://img.shields.io/badge/Active-brightgreen) | ❌ |
237 237 | [chat.openai.com](https://chat.openai.com) | `g4f.Provider.OpenaiChat` | ✔️ | ✔️ | ✔️ | ![Unknown](https://img.shields.io/badge/Active-brightgreen) | ✔️ |
238 | [raycast.com](https://raycast.com) | `g4f.Provider.Raycast` | ✔️ | ✔️ | ✔️ | ![Unknown](https://img.shields.io/badge/Unknown-grey) | ✔️ |
239 238 | [you.com](https://you.com) | `g4f.Provider.You` | ✔️ | ✔️ | ✔️ | ![Active](https://img.shields.io/badge/Active-brightgreen) | ❌ |
239 | [liaobots.site](https://liaobots.site) | `g4f.Provider.Liaobots` | ✔️ | ✔️ | ✔️ | ![Active](https://img.shields.io/badge/Active-brightgreen) | ❌ |
240 | [raycast.com](https://raycast.com) | `g4f.Provider.Raycast` | ✔️ | ✔️ | ✔️ | ![Unknown](https://img.shields.io/badge/Unknown-grey) | ✔️ |
240 241 | [chat.geekgpt.org](https://chat.geekgpt.org) | `g4f.Provider.GeekGpt` | ✔️ | ✔️ | ✔️ | ![Inactive](https://img.shields.io/badge/Inactive-red) | ❌ |
241 | [liaobots.site](https://liaobots.site) | `g4f.Provider.Liaobots` | ✔️ | ✔️ | ✔️ | ![Inactive](https://img.shields.io/badge/Inactive-red) | ❌ |
242 242
243 243 ### GPT-3.5
244 244
@@ -293,11 +293,11 @@ set G4F_PROXY=http://host:port
293 293 | [huggingface.co](https://huggingface.co/chat) | `g4f.Provider.HuggingChat` | ❌ | ❌ | ✔️ | ![Unknown](https://img.shields.io/badge/Unknown-grey) | ❌ |
294 294 | [llama2.ai](https://www.llama2.ai) | `g4f.Provider.Llama2` | ❌ | ❌ | ✔️ | ![Active](https://img.shields.io/badge/Active-brightgreen) | ❌ |
295 295 | [labs.perplexity.ai](https://labs.perplexity.ai) | `g4f.Provider.PerplexityLabs` | ❌ | ❌ | ✔️ | ![Active](https://img.shields.io/badge/Active-brightgreen) | ❌ |
296 | [phind.com](https://www.phind.com) | `g4f.Provider.Phind` | ❌ | ❌ | ✔️ | ![Unknown](https://img.shields.io/badge/Active-brightgreen) | ❌ |
297 296 | [pi.ai](https://pi.ai/talk) | `g4f.Provider.Pi` | ❌ | ❌ | ✔️ | ![Unknown](https://img.shields.io/badge/Active-brightgreen) | ❌ |
298 297 | [beta.theb.ai](https://beta.theb.ai) | `g4f.Provider.Theb` | ✔️ | ✔️ | ✔️ | ![Unknown](https://img.shields.io/badge/Unknown-grey) | ❌ |
299 298 | [free.chatgpt.org.uk](https://free.chatgpt.org.uk) | `g4f.Provider.FreeChatgpt` | ✔️ | ✔️ | ✔️ | ![Unknown](https://img.shields.io/badge/Unknown-grey) | ❌ |
300 299 | [theb.ai](https://theb.ai) | `g4f.Provider.ThebApi` | ❌ | ❌ | ❌ | ![Unknown](https://img.shields.io/badge/Unknown-grey) | ✔️ |
300 | [phind.com](https://www.phind.com) | `g4f.Provider.Phind` | ❌ | ❌ | ✔️ | ![Inactive](https://img.shields.io/badge/Inactive-red) | ❌
301 301 | [open-assistant.io](https://open-assistant.io/chat) | `g4f.Provider.OpenAssistant` | ❌ | ❌ | ✔️ | ![Inactive](https://img.shields.io/badge/Inactive-red) | ✔️ |
302 302
303 303 ### Models
Modified g4f/Provider/FlowGpt.py +0 -2
@@ -10,11 +10,9 @@ class FlowGpt(AsyncGeneratorProvider, ProviderModelMixin):
10 10 url = "https://flowgpt.com/chat"
11 11 working = True
12 12 supports_gpt_35_turbo = True
13 supports_gpt_4 = True
14 13 supports_message_history = True
15 14 default_model = "gpt-3.5-turbo"
16 15 models = [
17 "gpt-4",
18 16 "gpt-3.5-turbo",
19 17 "gpt-3.5-long",
20 18 "google-gemini",
Modified g4f/Provider/Liaobots.py +4 -1
@@ -7,6 +7,7 @@ from aiohttp import ClientSession, BaseConnector
7 7 from ..typing import AsyncResult, Messages
8 8 from .base_provider import AsyncGeneratorProvider, ProviderModelMixin
9 9 from .helper import get_connector
10 from ..errors import RateLimitError
10 11
11 12 models = {
12 13 "gpt-4": {
@@ -73,7 +74,7 @@ models = {
73 74
74 75 class Liaobots(AsyncGeneratorProvider, ProviderModelMixin):
75 76 url = "https://liaobots.site"
76 working = False
77 working = True
77 78 supports_message_history = True
78 79 supports_gpt_35_turbo = True
79 80 supports_gpt_4 = True
@@ -122,6 +123,8 @@ class Liaobots(AsyncGeneratorProvider, ProviderModelMixin):
122 123 json={"authcode": ""},
123 124 verify_ssl=False
124 125 ) as response:
126 if response.status == 401:
127 raise RateLimitError("Rate limit reached. Use a other provider or ip address")
125 128 response.raise_for_status()
126 129 cls._auth_code = (await response.json(content_type=None))["authCode"]
127 130 cls._cookie_jar = session.cookie_jar
Modified g4f/Provider/__init__.py +0 -1
@@ -51,7 +51,6 @@ from .Liaobots import Liaobots
51 51 from .Llama2 import Llama2
52 52 from .OnlineGpt import OnlineGpt
53 53 from .PerplexityLabs import PerplexityLabs
54 from .Phind import Phind
55 54 from .Pi import Pi
56 55 from .Vercel import Vercel
57 56 from .Ylokh import Ylokh
Renamed g4f/Provider/deprecated/Phind.py +5 -4
@@ -5,13 +5,14 @@ import json
5 5 from urllib import parse
6 6 from datetime import datetime
7 7
8 from ..typing import AsyncResult, Messages
9 from .base_provider import AsyncGeneratorProvider
10 from ..requests import StreamSession
8 from ...typing import AsyncResult, Messages
9 from ..base_provider import AsyncGeneratorProvider
10 from ...requests import StreamSession
11 11
12 12 class Phind(AsyncGeneratorProvider):
13 13 url = "https://www.phind.com"
14 working = True
14 working = False
15 lockdown = True
15 16 supports_stream = True
16 17 supports_message_history = True
17 18
Modified g4f/Provider/deprecated/__init__.py +2 -1
@@ -22,4 +22,5 @@ from .Cromicle import Cromicle
22 22 from .Opchatgpts import Opchatgpts
23 23 from .Yqcloud import Yqcloud
24 24 from .Aichat import Aichat
25 from .Berlin import Berlin
25 from .Berlin import Berlin
26 from .Phind import Phind
Modified g4f/errors.py +3 -0
@@ -35,4 +35,7 @@ class MissingAuthError(Exception):
35 35 ...
36 36
37 37 class NoImageResponseError(Exception):
38 ...
39
40 class RateLimitError(Exception):
38 41 ...
Modified g4f/gui/client/html/index.html +0 -1
@@ -183,7 +183,6 @@
183 183 <option value="OpenaiChat">OpenaiChat</option>
184 184 <option value="Gemini">Gemini</option>
185 185 <option value="Liaobots">Liaobots</option>
186 <option value="Phind">Phind</option>
187 186 <option value="You">You</option>
188 187 <option value="">----</option>
189 188 </select>