Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ import { GoogleGenerativeAIEmbeddings } from "@langchain/google-genai";
import { TaskType } from "@google/generative-ai";

const embeddings = new GoogleGenerativeAIEmbeddings({
model: "text-embedding-004", // 768 dimensions
model: "gemini-embedding-001", // 768 dimensions
taskType: TaskType.RETRIEVAL_DOCUMENT,
title: "Document title",
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ import { VertexAIEmbeddings } from "@langchain/google-vertexai";
// import { VertexAIEmbeddings } from "@langchain/google-vertexai-web"

const embeddings = new VertexAIEmbeddings({
model: "text-embedding-004",
model: "gemini-embedding-001",
// ...
});
```
Expand Down
2 changes: 1 addition & 1 deletion src/oss/javascript/integrations/text_embedding/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ GOOGLE_APPLICATION_CREDENTIALS=credentials.json
import { VertexAIEmbeddings } from "@langchain/google-vertexai";

const embeddings = new VertexAIEmbeddings({
model: "text-embedding-004"
model: "gemini-embedding-001"
});
```

Expand Down
2 changes: 1 addition & 1 deletion src/oss/javascript/integrations/vectorstores/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ GOOGLE_APPLICATION_CREDENTIALS=credentials.json
import { VertexAIEmbeddings } from "@langchain/google-vertexai";

const embeddings = new VertexAIEmbeddings({
model: "text-embedding-004"
model: "gemini-embedding-001"
});
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Now we can instantiate our model object and generate embeddings:
from langchain_google_vertexai import VertexAIEmbeddings

# Initialize the a specific Embeddings Model version
embeddings = VertexAIEmbeddings(model_name="text-embedding-004")
embeddings = VertexAIEmbeddings(model_name="gemini-embedding-001")
```

## Indexing and Retrieval
Expand Down
2 changes: 1 addition & 1 deletion src/snippets/embeddings-tabs-js.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
import { VertexAIEmbeddings } from "@langchain/google-vertexai";

const embeddings = new VertexAIEmbeddings({
model: "text-embedding-004"
model: "gemini-embedding-001"
});
```
</Tab>
Expand Down