PerplexityApi.py 601 B

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