feat: support perplexity (#444)

pull/445/head
sigoden 2 weeks ago committed by GitHub
parent 503ec98bd1
commit a21e1213cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -65,6 +65,10 @@ clients:
- type: cohere
api_key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# See https://docs.perplexity.ai/docs/getting-started
- type: perplexity
api_key: pplx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# See https://console.groq.com/docs/quickstart
- type: groq
api_key: gsk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

@ -28,6 +28,7 @@ register_client!(
(claude, "claude", ClaudeConfig, ClaudeClient),
(mistral, "mistral", MistralConfig, MistralClient),
(cohere, "cohere", CohereConfig, CohereClient),
(perplexity, "perplexity", PerplexityConfig, PerplexityClient),
(groq, "groq", GroqConfig, GroqClient),
(ollama, "ollama", OllamaConfig, OllamaClient),
(ernie, "ernie", ErnieConfig, ErnieClient),

@ -0,0 +1,19 @@
openai_compatible_module!(
PerplexityConfig,
PerplexityClient,
"https://api.perplexity.ai",
[
// https://docs.perplexity.ai/docs/model-cards
("sonar-small-chat", "text", 16384),
("sonar-small-online", "text", 12000),
("sonar-medium-chat", "text", 16384),
("sonar-medium-online", "text", 12000),
("llama-3-8b-instruct", "text", 8192),
("llama-3-70b-instruct", "text", 8192),
("codellama-70b-instruct", "text", 16384),
("mistral-7b-instruct", "text", 16384),
("mixtral-8x7b-instruct", "text", 16384),
("mixtral-8x22b-instruct", "text", 16384),
]
);
Loading…
Cancel
Save