PerplexityApi.py 588 B

12345678910111213141516171819
  1. from __future__ import annotations
  2. from .OpenaiAPI import OpenaiAPI
  3. class PerplexityApi(OpenaiAPI):
  4. label = "Perplexity API"
  5. url = "https://www.perplexity.ai"
  6. login_url = "https://www.perplexity.ai/settings/api"
  7. working = True
  8. api_base = "https://api.perplexity.ai"
  9. default_model = "llama-3-sonar-large-32k-online"
  10. models = [
  11. "llama-3-sonar-small-32k-chat",
  12. "llama-3-sonar-small-32k-online",
  13. "llama-3-sonar-large-32k-chat",
  14. "llama-3-sonar-large-32k-online",
  15. "llama-3-8b-instruct",
  16. "llama-3-70b-instruct",
  17. ]