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

XFEstudio/gpt4free

Update the models of PerplexityLabs provider

3b97e69b
repsac-by <repsac@duck.com>
提交于

代码差异

1 个文件 +12 -3
Modified g4f/Provider/PerplexityLabs.py +12 -3
@@ -11,11 +11,20 @@ API_URL = "https://www.perplexity.ai/socket.io/"
11 11 WS_URL = "wss://www.perplexity.ai/socket.io/"
12 12
13 13 class PerplexityLabs(AsyncGeneratorProvider, ProviderModelMixin):
14 url = "https://labs.perplexity.ai"
14 url = "https://labs.perplexity.ai"
15 15 working = True
16 16 default_model = "mixtral-8x7b-instruct"
17 17 models = [
18 "llama-3-sonar-large-32k-online", "llama-3-sonar-small-32k-online", "llama-3-sonar-large-32k-chat", "llama-3-sonar-small-32k-chat", "llama-3-8b-instruct", "llama-3-70b-instruct", "gemma-2-9b-it", "gemma-2-27b-it", "nemotron-4-340b-instruct", "mixtral-8x7b-instruct",
18 "llama-3.1-sonar-large-128k-online",
19 "llama-3.1-sonar-small-128k-online",
20 "llama-3.1-sonar-large-128k-chat",
21 "llama-3.1-sonar-small-128k-chat",
22 "llama-3.1-8b-instruct",
23 "llama-3.1-70b-instruct",
24 "gemma-2-9b-it",
25 "gemma-2-27b-it",
26 "nemotron-4-340b-instruct",
27 "mixtral-8x7b-instruct"
19 28 ]
20 29
21 30 @classmethod
@@ -54,7 +63,7 @@ class PerplexityLabs(AsyncGeneratorProvider, ProviderModelMixin):
54 63 data=post_data
55 64 ) as response:
56 65 await raise_for_status(response)
57 assert await response.text() == "OK"
66 assert await response.text() == "OK"
58 67 async with session.ws_connect(f"{WS_URL}?EIO=4&transport=websocket&sid={sid}", autoping=False) as ws:
59 68 await ws.send_str("2probe")
60 69 assert(await ws.receive_str() == "3probe")