mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
pplx - fix supports tool choice openai param (#8496)
This commit is contained in:
parent
faee508d1f
commit
ca7c5e8773
4 changed files with 63 additions and 81 deletions
|
@ -20,3 +20,23 @@ class PerplexityChatConfig(OpenAIGPTConfig):
|
|||
or get_secret_str("PERPLEXITY_API_KEY")
|
||||
)
|
||||
return api_base, dynamic_api_key
|
||||
|
||||
def get_supported_openai_params(self, model: str) -> list:
|
||||
"""
|
||||
Perplexity supports a subset of OpenAI params
|
||||
|
||||
Ref: https://docs.perplexity.ai/api-reference/chat-completions
|
||||
|
||||
Eg. Perplexity does not support tools, tool_choice, function_call, functions, etc.
|
||||
"""
|
||||
return [
|
||||
"frequency_penalty",
|
||||
"max_tokens",
|
||||
"max_completion_tokens",
|
||||
"presence_penalty",
|
||||
"response_format",
|
||||
"stream",
|
||||
"temperature",
|
||||
"top_p" "max_retries",
|
||||
"extra_headers",
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue