Skip to content

Commit 099ed34

Browse files
Backport: docs(tools): update multi-modal tool results providers and example (#9570)
This is an automated backport of #9529 to the release-v5.0 branch. Co-authored-by: Ellis Driscoll <[email protected]>
1 parent 951ad41 commit 099ed34

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

content/docs/03-ai-sdk-core/15-tools-and-tool-calling.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,8 @@ const { text } = await generateText({
752752
## Multi-modal Tool Results
753753

754754
<Note type="warning">
755-
Multi-modal tool results are experimental and only supported by Anthropic.
755+
Multi-modal tool results are experimental and only supported by Anthropic and
756+
OpenAI.
756757
</Note>
757758

758759
In order to send multi-modal tool results, e.g. screenshots, back to the model,
@@ -792,7 +793,7 @@ const result = await generateText({
792793
value:
793794
typeof result === 'string'
794795
? [{ type: 'text', text: result }]
795-
: [{ type: 'image', data: result.data, mediaType: 'image/png' }],
796+
: [{ type: 'media', data: result.data, mediaType: 'image/png' }],
796797
};
797798
},
798799
}),

0 commit comments

Comments
 (0)