fix: fix issue if tool returned image and empty text and it caused api errors (#25241)
This commit is contained in:
parent
4eae8ec037
commit
563177c6ac
1 changed files with 1 additions and 1 deletions
|
|
@ -772,7 +772,7 @@ export const toModelMessagesEffect = Effect.fnUntraced(function* (
|
|||
return {
|
||||
type: "content",
|
||||
value: [
|
||||
{ type: "text", text: outputObject.text },
|
||||
...(outputObject.text ? [{ type: "text", text: outputObject.text }] : []),
|
||||
...attachments.map((attachment) => ({
|
||||
type: "media",
|
||||
mediaType: attachment.mime,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue