mirror of
https://github.com/xtekky/gpt4free.git
synced 2026-02-12 10:42:51 -08:00
- Changed `api_base` to `base_url` in multiple provider files for consistency. - Updated method signatures and internal references to use `base_url` instead of `api_base`. - Adjusted the `OpenaiTemplate` class to accommodate the new `base_url` parameter. - Enhanced the `ClientFactory` to support custom provider creation with `base_url`. - Modified API request handling in the backend to align with the new naming convention.
20 lines
No EOL
601 B
Python
20 lines
No EOL
601 B
Python
from __future__ import annotations
|
|
|
|
from ..template import OpenaiTemplate
|
|
|
|
class PerplexityApi(OpenaiTemplate):
|
|
label = "Perplexity API"
|
|
url = "https://www.perplexity.ai"
|
|
login_url = "https://www.perplexity.ai/settings/api"
|
|
working = True
|
|
needs_auth = True
|
|
base_url = "https://api.perplexity.ai"
|
|
default_model = "llama-3-sonar-large-32k-online"
|
|
models = [
|
|
"llama-3-sonar-small-32k-chat",
|
|
default_model,
|
|
"llama-3-sonar-large-32k-chat",
|
|
"llama-3-sonar-large-32k-online",
|
|
"llama-3-8b-instruct",
|
|
"llama-3-70b-instruct",
|
|
] |