2024-05-15 22:07:49 +03:00
|
|
|
from __future__ import annotations
|
|
|
|
|
2024-11-09 10:48:34 +03:00
|
|
|
from .OpenaiAPI import OpenaiAPI
|
2024-05-15 22:07:49 +03:00
|
|
|
|
2024-11-09 10:48:34 +03:00
|
|
|
class PerplexityApi(OpenaiAPI):
|
2024-05-15 22:07:49 +03:00
|
|
|
label = "Perplexity API"
|
|
|
|
url = "https://www.perplexity.ai"
|
|
|
|
working = True
|
2024-12-16 21:07:41 +03:00
|
|
|
api_base = "https://api.perplexity.ai"
|
2024-05-15 22:07:49 +03:00
|
|
|
default_model = "llama-3-sonar-large-32k-online"
|
|
|
|
models = [
|
|
|
|
"llama-3-sonar-small-32k-chat",
|
|
|
|
"llama-3-sonar-small-32k-online",
|
|
|
|
"llama-3-sonar-large-32k-chat",
|
|
|
|
"llama-3-sonar-large-32k-online",
|
|
|
|
"llama-3-8b-instruct",
|
|
|
|
"llama-3-70b-instruct",
|
2024-12-16 21:07:41 +03:00
|
|
|
]
|