---
name: add-function-examples
description: "Guide for adding new AI function examples, for testing specific features against the actual provider APIs."
license: "NOASSERTION"
metadata:
  decimalai-skill-id: "27169093-1726-4f10-bd7b-ba0a39dcf541"
  decimalai-version-id: "bec79249-3b5b-4a69-8277-b4740cd4af81"
  decimalai-version: "1"
  decimalai-body-sha256: "6991555aba150586a078d81cc0d8275a8bfd55a3cd0d910f652b6c212e0c62f7"
  decimalai-name: "add-function-examples"
  decimalai-format: "1"
  decimalai-invocation: "model"
  decimalai-category: "testing"
  decimalai-source: "https://app.decimal.ai/s/add-function-examples@1/SKILL.md"
---
## 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 `examples/ai-functions` directory. These examples are used for testing specific features against the actual provider APIs, and can also serve as documentation for users.

Determine 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 `generateText` and one for `streamText`. For any other models kinds, add the example for the relevant top-level function (e.g. `generateImage`, `generateSpeech`).

After creating the example, run `pnpm type-check:full`; fix any errors encountered.
