summaryrefslogtreecommitdiffstats
path: root/g4f/Provider
diff options
context:
space:
mode:
authorTekky <98614666+xtekky@users.noreply.github.com>2024-08-05 04:09:41 +0200
committerGitHub <noreply@github.com>2024-08-05 04:09:41 +0200
commitd0e9f09533a7b8100ba3e0047eb80cb0b420585c (patch)
tree1316b218e3322e8ce68793701694fdb32af15a47 /g4f/Provider
parentMerge pull request #2132 from baysonfox/main (diff)
parentUpdate the models of PerplexityLabs provider (diff)
downloadgpt4free-d0e9f09533a7b8100ba3e0047eb80cb0b420585c.tar
gpt4free-d0e9f09533a7b8100ba3e0047eb80cb0b420585c.tar.gz
gpt4free-d0e9f09533a7b8100ba3e0047eb80cb0b420585c.tar.bz2
gpt4free-d0e9f09533a7b8100ba3e0047eb80cb0b420585c.tar.lz
gpt4free-d0e9f09533a7b8100ba3e0047eb80cb0b420585c.tar.xz
gpt4free-d0e9f09533a7b8100ba3e0047eb80cb0b420585c.tar.zst
gpt4free-d0e9f09533a7b8100ba3e0047eb80cb0b420585c.zip
Diffstat (limited to '')
-rw-r--r--g4f/Provider/PerplexityLabs.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/g4f/Provider/PerplexityLabs.py b/g4f/Provider/PerplexityLabs.py
index 0a298e55..7f4587e1 100644
--- a/g4f/Provider/PerplexityLabs.py
+++ b/g4f/Provider/PerplexityLabs.py
@@ -11,11 +11,20 @@ API_URL = "https://www.perplexity.ai/socket.io/"
WS_URL = "wss://www.perplexity.ai/socket.io/"
class PerplexityLabs(AsyncGeneratorProvider, ProviderModelMixin):
- url = "https://labs.perplexity.ai"
+ url = "https://labs.perplexity.ai"
working = True
default_model = "mixtral-8x7b-instruct"
models = [
- "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",
+ "llama-3.1-sonar-large-128k-online",
+ "llama-3.1-sonar-small-128k-online",
+ "llama-3.1-sonar-large-128k-chat",
+ "llama-3.1-sonar-small-128k-chat",
+ "llama-3.1-8b-instruct",
+ "llama-3.1-70b-instruct",
+ "gemma-2-9b-it",
+ "gemma-2-27b-it",
+ "nemotron-4-340b-instruct",
+ "mixtral-8x7b-instruct"
]
@classmethod
@@ -54,7 +63,7 @@ class PerplexityLabs(AsyncGeneratorProvider, ProviderModelMixin):
data=post_data
) as response:
await raise_for_status(response)
- assert await response.text() == "OK"
+ assert await response.text() == "OK"
async with session.ws_connect(f"{WS_URL}?EIO=4&transport=websocket&sid={sid}", autoping=False) as ws:
await ws.send_str("2probe")
assert(await ws.receive_str() == "3probe")