Skip to content

Commit

Permalink
docs: add embedding reference (#1584)
Browse files Browse the repository at this point in the history
  • Loading branch information
lgrammel authored May 14, 2024
1 parent c4ee139 commit 62f7896
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 4 deletions.
16 changes: 16 additions & 0 deletions content/docs/07-reference/ai-sdk-core/05-embed.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: embed
description: Embed a single value using the AI SDK Core
---

# `embed`

Generate an embedding for a single value using an embedding model.

This is ideal for use cases where you need to embed a single value to e.g. retrieve similar items or to use the embedding in a downstream task.

## Import

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

<ReferenceTable packageName="core" functionName="embed" />
14 changes: 10 additions & 4 deletions content/docs/07-reference/ai-sdk-core/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,29 @@ description: Reference documentation for the AI SDK Core
cards={[
{
title: 'generateText',
description: 'Generate text from a model.',
description: 'Generate text from a language model.',
href: '/docs/reference/ai-sdk-core/generate-text',
},
{
title: 'streamText',
description: 'Stream text generation from a model.',
description: 'Stream text generation from a language model.',
href: '/docs/reference/ai-sdk-core/stream-text',
},
{
title: 'generateObject',
description: 'Generate structured data from a model.',
description: 'Generate structured data from a language model.',
href: '/docs/reference/ai-sdk-core/generate-object',
},
{
title: 'streamObject',
description: 'Stream structured data generation from a model.',
description: 'Stream structured data generation from a language model.',
href: '/docs/reference/ai-sdk-core/stream-object',
},
{
title: 'embed',
description:
'Generate an embedding for a single value using an embedding model.',
href: '/docs/reference/ai-sdk-core/embed',
},
]}
/>

0 comments on commit 62f7896

Please sign in to comment.