mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +00:00
fix(vertex_ai_partner.py): default vertex ai llama3.1 api to use all openai params
Poor vertex docs - not clear what can/can't work Fixes https://github.com/BerriAI/litellm/issues/5090
This commit is contained in:
parent
7e0cd39de7
commit
2f402b1cdd
1 changed files with 6 additions and 10 deletions
|
@ -94,18 +94,14 @@ class VertexAILlama3Config:
|
|||
}
|
||||
|
||||
def get_supported_openai_params(self):
|
||||
return [
|
||||
"max_tokens",
|
||||
"stream",
|
||||
]
|
||||
return litellm.OpenAIConfig().get_supported_openai_params(model="gpt-3.5-turbo")
|
||||
|
||||
def map_openai_params(self, non_default_params: dict, optional_params: dict):
|
||||
for param, value in non_default_params.items():
|
||||
if param == "max_tokens":
|
||||
optional_params["max_tokens"] = value
|
||||
if param == "stream":
|
||||
optional_params["stream"] = value
|
||||
return optional_params
|
||||
return litellm.OpenAIConfig().map_openai_params(
|
||||
non_default_params=non_default_params,
|
||||
optional_params=optional_params,
|
||||
model="gpt-3.5-turbo",
|
||||
)
|
||||
|
||||
|
||||
class VertexAIPartnerModels(BaseLLM):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue