mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-04 02:31:27 +00:00
(sap) fix after bot review
This commit is contained in:
parent
4630ef90c5
commit
3a9610fcf8
1 changed files with 4 additions and 4 deletions
|
|
@ -34,7 +34,7 @@ from .models import ResponseFormatJSONSchema, ResponseFormat, OrchestrationReque
|
|||
from .handler import GenAIHubOrchestrationError, AsyncSAPStreamIterator, SAPStreamIterator
|
||||
|
||||
def validate_dict(data: dict, model) -> dict:
|
||||
return model(**data).model_dump(by_alias=True)
|
||||
return model(**data).model_dump(by_alias=True, exclude_none=True)
|
||||
|
||||
|
||||
class GenAIHubOrchestrationConfig(OpenAIGPTConfig):
|
||||
|
|
@ -240,7 +240,7 @@ class GenAIHubOrchestrationConfig(OpenAIGPTConfig):
|
|||
optional_modules = {}
|
||||
optional_modules_lst = ["grounding", "masking", "filtering", "translation"]
|
||||
for module in optional_modules_lst:
|
||||
if params.get(module, None):
|
||||
if params.get(module, None) is None:
|
||||
optional_modules[module] = params.pop(module)
|
||||
|
||||
return {
|
||||
|
|
@ -315,9 +315,9 @@ class GenAIHubOrchestrationConfig(OpenAIGPTConfig):
|
|||
**placeholder_values,
|
||||
}
|
||||
|
||||
validate_dict(request_body, OrchestrationRequest)
|
||||
body = validate_dict(request_body, OrchestrationRequest)
|
||||
|
||||
return request_body
|
||||
return body
|
||||
|
||||
def transform_response(
|
||||
self,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue