mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-31 08:23:52 +00:00
remove image.data temporarily because llamastack request encoding produces data=null
This commit is contained in:
parent
77ad120403
commit
8706b08d37
4 changed files with 1 additions and 13 deletions
|
|
@ -28,7 +28,7 @@ class _URLOrData(BaseModel):
|
|||
|
||||
url: Optional[URL] = None
|
||||
# data is a base64 encoded string, hint with contentEncoding=base64
|
||||
data: Optional[str] = Field(contentEncoding="base64", default=None)
|
||||
# data: Optional[str] = Field(contentEncoding="base64", default=None)
|
||||
|
||||
@model_validator(mode="before")
|
||||
@classmethod
|
||||
|
|
|
|||
|
|
@ -142,9 +142,6 @@ async def interleaved_content_convert_to_raw(
|
|||
data = response.content
|
||||
else:
|
||||
raise ValueError("Unsupported URL type")
|
||||
elif image.data:
|
||||
# data is a base64 encoded string, decode it to bytes for RawMediaItem
|
||||
data = base64.b64decode(image.data)
|
||||
else:
|
||||
raise ValueError("No data or URL provided")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue