Skip to content

Commit f6b15de

Browse files
authored
docs: fix js quickstart (googleapis#1104)
Use the newly recommended `@langchain/google-genai` library to use gemini API keys.
1 parent 5bf2758 commit f6b15de

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/en/getting-started/local_quickstart_js.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ from Toolbox.
294294
295295
{{< tabpane persist=header >}}
296296
{{< tab header="LangChain" lang="bash" >}}
297-
npm install langchain @langchain/google-vertexai
297+
npm install langchain @langchain/google-genai
298298
{{< /tab >}}
299299
{{< tab header="GenkitJS" lang="bash" >}}
300300
npm install genkit @genkit-ai/vertexai
@@ -309,7 +309,7 @@ npm install llamaindex @llamaindex/google @llamaindex/workflow
309309
{{< tabpane persist=header >}}
310310
{{< tab header="LangChain" lang="js" >}}
311311
312-
import { ChatVertexAI } from "@langchain/google-vertexai";
312+
import { ChatGoogleGenerativeAI } from "@langchain/google-genai";
313313
import { ToolboxClient } from "@toolbox-sdk/core";
314314
import { tool } from "@langchain/core/tools";
315315
import { createReactAgent } from "@langchain/langgraph/prebuilt";
@@ -336,7 +336,7 @@ const queries = [
336336
];
337337
338338
async function runApplication() {
339-
const model = new ChatVertexAI({
339+
const model = new ChatGoogleGenerativeAI({
340340
model: "gemini-2.0-flash",
341341
});
342342

0 commit comments

Comments
 (0)