add-function-examples
Original:🇺🇸 English
Translated
Guide for adding new AI function examples, for testing specific features against the actual provider APIs.
13installs
Sourcevercel/ai
Added on
NPX Install
npx skill4agent add vercel/ai add-function-examplesTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Adding Function Examples
Review the changes in the current branch, and identify new or modified features or bug fixes that would benefit from having an example in the directory. These examples are used for testing specific features against the actual provider APIs, and can also serve as documentation for users.
examples/ai-functionsDetermine for which kind of model and top-level function the example should be added. For a language model, the example should be added in two variants, one for and one for . For any other models kinds, add the example for the relevant top-level function (e.g. , ).
generateTextstreamTextgenerateImagegenerateSpeechAfter creating the example, run ; fix any errors encountered.
pnpm type-check:full