mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-06 02:32:40 +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
5
docs/_static/llama-stack-spec.html
vendored
5
docs/_static/llama-stack-spec.html
vendored
|
@ -3911,11 +3911,6 @@
|
|||
"url": {
|
||||
"$ref": "#/components/schemas/URL",
|
||||
"description": "A URL of the image or data URL in the format of data:image/{type};base64,{data}. Note that URL could have length limits."
|
||||
},
|
||||
"data": {
|
||||
"type": "string",
|
||||
"contentEncoding": "base64",
|
||||
"description": "base64 encoded image data as string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
|
|
4
docs/_static/llama-stack-spec.yaml
vendored
4
docs/_static/llama-stack-spec.yaml
vendored
|
@ -2702,10 +2702,6 @@ components:
|
|||
description: >-
|
||||
A URL of the image or data URL in the format of data:image/{type};base64,{data}.
|
||||
Note that URL could have length limits.
|
||||
data:
|
||||
type: string
|
||||
contentEncoding: base64
|
||||
description: base64 encoded image data as string
|
||||
additionalProperties: false
|
||||
description: >-
|
||||
Image as a base64 encoded string or an URL
|
||||
|
|
|
@ -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