Skip to content

Commit

Permalink
docs: link to examples in reference pages (vercel#2679)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoalbanese authored Aug 15, 2024
1 parent 2c492cd commit 09ac68e
Showing 5 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions content/docs/07-reference/ai-sdk-core/01-generate-text.mdx
Original file line number Diff line number Diff line change
@@ -21,6 +21,8 @@ const { text } = await generateText({
console.log(text);
```

To see `generateText` in action, check out [ these examples ](#examples).

## Import

<Snippet text={`import { generateText } from "ai"`} prompt={false} />
2 changes: 2 additions & 0 deletions content/docs/07-reference/ai-sdk-core/02-stream-text.mdx
Original file line number Diff line number Diff line change
@@ -23,6 +23,8 @@ for await (const textPart of textStream) {
}
```

To see `streamText` in action, check out [ these examples ](#examples).

## Import

<Snippet text={`import { streamText } from "ai"`} prompt={false} />
2 changes: 2 additions & 0 deletions content/docs/07-reference/ai-sdk-core/03-generate-object.mdx
Original file line number Diff line number Diff line change
@@ -29,6 +29,8 @@ const { object } = await generateObject({
console.log(JSON.stringify(object, null, 2));
```

To see `generateObject` in action, check out [ these examples ](#examples).

## Import

<Snippet text={`import { generateObject } from "ai"`} prompt={false} />
2 changes: 2 additions & 0 deletions content/docs/07-reference/ai-sdk-core/04-stream-object.mdx
Original file line number Diff line number Diff line change
@@ -32,6 +32,8 @@ for await (const partialObject of partialObjectStream) {
}
```

To see `streamObject` in action, check out [ these examples ](#examples).

## Import

<Snippet text={`import { streamObject } from "ai"`} prompt={false} />
2 changes: 2 additions & 0 deletions content/docs/07-reference/ai-sdk-rsc/01-stream-ui.mdx
Original file line number Diff line number Diff line change
@@ -7,6 +7,8 @@ description: Reference for the streamUI function from the AI SDK RSC

A helper function to create a streamable UI from LLM providers. This function is similar to AI SDK Core APIs and supports the same model interfaces.

To see `streamUI` in action, check out [ these examples ](#examples).

## Import

<Snippet text={`import { streamUI } from "ai/rsc"`} prompt={false} />

0 comments on commit 09ac68e

Please sign in to comment.