fix(chat): tolerate file part optional data field in image-media conversion
This commit is contained in:
parent
7c398cb4b1
commit
09efe47f17
@ -611,7 +611,7 @@ export async function convertMessagesWithImages(
|
||||
|
||||
const candidateImageUrl =
|
||||
part.type === "file"
|
||||
? part.url || part.data
|
||||
? part.url || (part as { data?: string | undefined }).data
|
||||
: part.type === "image"
|
||||
? part.image || part.url
|
||||
: part.type === "image_url"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user