Skip to content

Commit 3fbb8f0

Browse files
Backport: docs: correct textEmbeddingModel method (#9399)
This is an automated backport of #9283 to the release-v5.0 branch. Co-authored-by: Juan Uicich <juan@bardo.se>
1 parent 4baff5e commit 3fbb8f0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

content/providers/01-ai-sdk-providers/16-google-vertex.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -591,10 +591,10 @@ The following Zod features are known to not work with Google Vertex:
591591

592592
### Embedding Models
593593

594-
You can create models that call the Google Vertex AI embeddings API using the `.textEmbedding()` factory method:
594+
You can create models that call the Google Vertex AI embeddings API using the `.textEmbeddingModel()` factory method:
595595

596596
```ts
597-
const model = vertex.textEmbedding('text-embedding-004');
597+
const model = vertex.textEmbeddingModel('text-embedding-004');
598598
```
599599

600600
Google Vertex AI embedding models support additional settings. You can pass them as an options argument:
@@ -603,7 +603,7 @@ Google Vertex AI embedding models support additional settings. You can pass them
603603
import { vertex } from '@ai-sdk/google-vertex';
604604
import { embed } from 'ai';
605605

606-
const model = vertex.textEmbedding('text-embedding-004');
606+
const model = vertex.textEmbeddingModel('text-embedding-004');
607607

608608
const { embedding } = await embed({
609609
model,

0 commit comments

Comments
 (0)