mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-05 02:41:56 +00:00
(sap) fix after bot review
This commit is contained in:
parent
bde544cad7
commit
4630ef90c5
2 changed files with 6 additions and 2 deletions
|
|
@ -285,7 +285,11 @@ class GenAIHubOrchestrationConfig(OpenAIGPTConfig):
|
|||
|
||||
for modules_dict in fallback_modules:
|
||||
modules_dict = dict(modules_dict)
|
||||
fallback_model = modules_dict.pop("model")
|
||||
fallback_model = modules_dict.pop("model", None)
|
||||
if fallback_model is None:
|
||||
raise ValueError(
|
||||
"Each entry in `fallback_sap_modules` must include a 'model' key."
|
||||
)
|
||||
if fallback_model.startswith("sap/"):
|
||||
fallback_model = fallback_model[4:]
|
||||
fallback_template = modules_dict.pop("messages", [])
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ class GenAIHubEmbeddingConfig(BaseEmbeddingConfig):
|
|||
model_dict["params"] = optional_params.get("parameters", {})
|
||||
if optional_params.get("timeout", None):
|
||||
model_dict["timeout"] = optional_params.get("timeout")
|
||||
if optional_params.get("max_retries", None):
|
||||
if optional_params.get("max_retries", None) is not None:
|
||||
model_dict["max_retries"] = optional_params.get("max_retries")
|
||||
input_dict = {"text": input}
|
||||
if optional_params.get("type"):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue