mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-25 01:02:15 +00:00
fix(fal_ai): keep image data serializer none safe
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
531d54097f
commit
4545e78001
1 changed files with 2 additions and 2 deletions
|
|
@ -2551,8 +2551,8 @@ class ImageResponse(OpenAIImageResponse, BaseLiteLLMOpenAIResponseObject):
|
|||
model_config = ConfigDict(extra="allow", protected_namespaces=())
|
||||
|
||||
@field_serializer("data")
|
||||
def _serialize_image_data(self, data: list[OpenAIImage]) -> list[dict[str, object]]:
|
||||
return [image.model_dump() for image in data]
|
||||
def _serialize_image_data(self, data: list[OpenAIImage] | None) -> list[dict[str, object]] | None:
|
||||
return None if data is None else [image.model_dump() for image in data]
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue