mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-25 14:27:26 +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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user