@langchain/google-vertexai-web 1.0.3 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/package.json +27 -26
- package/dist/chat_models.d.cts.map +0 -1
- package/dist/chat_models.d.ts.map +0 -1
- package/dist/embeddings.d.cts.map +0 -1
- package/dist/embeddings.d.ts.map +0 -1
- package/dist/llms.d.cts.map +0 -1
- package/dist/llms.d.ts.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @langchain/google-vertexai-web
|
|
2
2
|
|
|
3
|
+
## 2.0.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#9416](https://github.com/langchain-ai/langchainjs/pull/9416) [`0fe9beb`](https://github.com/langchain-ai/langchainjs/commit/0fe9bebee6710f719e47f913eec1ec4f638e4de4) Thanks [@hntrl](https://github.com/hntrl)! - fix 'moduleResultion: "node"' compatibility
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`0fe9beb`](https://github.com/langchain-ai/langchainjs/commit/0fe9bebee6710f719e47f913eec1ec4f638e4de4)]:
|
|
10
|
+
- @langchain/google-webauth@2.0.0
|
|
11
|
+
|
|
3
12
|
## 1.0.3
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@langchain/google-vertexai-web",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "LangChain.js support for Google Vertex AI Web",
|
|
5
5
|
"author": "LangChain",
|
|
6
6
|
"license": "MIT",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-google-vertexai-web/",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@langchain/google-webauth": "
|
|
17
|
+
"@langchain/google-webauth": "2.0.0"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@jest/globals": "^29.5.0",
|
|
@@ -31,47 +31,47 @@
|
|
|
31
31
|
"ts-jest": "^29.1.0",
|
|
32
32
|
"typescript": "~5.8.3",
|
|
33
33
|
"zod": "^3.25.76",
|
|
34
|
-
"@langchain/eslint": "0.1.
|
|
35
|
-
"@langchain/google-common": "
|
|
36
|
-
"@langchain/standard-tests": "0.0.
|
|
34
|
+
"@langchain/eslint": "0.1.1",
|
|
35
|
+
"@langchain/google-common": "2.0.0",
|
|
36
|
+
"@langchain/standard-tests": "0.0.3"
|
|
37
37
|
},
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
|
-
"main": "./dist/index.
|
|
42
|
-
"types": "./dist/index.d.
|
|
41
|
+
"main": "./dist/index.cjs",
|
|
42
|
+
"types": "./dist/index.d.cts",
|
|
43
43
|
"exports": {
|
|
44
44
|
".": {
|
|
45
45
|
"input": "./src/index.ts",
|
|
46
|
-
"import": {
|
|
47
|
-
"types": "./dist/index.d.ts",
|
|
48
|
-
"default": "./dist/index.js"
|
|
49
|
-
},
|
|
50
46
|
"require": {
|
|
51
47
|
"types": "./dist/index.d.cts",
|
|
52
48
|
"default": "./dist/index.cjs"
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
"./utils": {
|
|
56
|
-
"input": "./src/utils.ts",
|
|
57
|
-
"import": {
|
|
58
|
-
"types": "./dist/utils.d.ts",
|
|
59
|
-
"default": "./dist/utils.js"
|
|
60
49
|
},
|
|
61
|
-
"
|
|
62
|
-
"types": "./dist/
|
|
63
|
-
"default": "./dist/
|
|
50
|
+
"import": {
|
|
51
|
+
"types": "./dist/index.d.ts",
|
|
52
|
+
"default": "./dist/index.js"
|
|
64
53
|
}
|
|
65
54
|
},
|
|
66
55
|
"./types": {
|
|
67
56
|
"input": "./src/types.ts",
|
|
57
|
+
"require": {
|
|
58
|
+
"types": "./dist/types.d.cts",
|
|
59
|
+
"default": "./dist/types.cjs"
|
|
60
|
+
},
|
|
68
61
|
"import": {
|
|
69
62
|
"types": "./dist/types.d.ts",
|
|
70
63
|
"default": "./dist/types.js"
|
|
71
|
-
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"./utils": {
|
|
67
|
+
"input": "./src/utils.ts",
|
|
72
68
|
"require": {
|
|
73
|
-
"types": "./dist/
|
|
74
|
-
"default": "./dist/
|
|
69
|
+
"types": "./dist/utils.d.cts",
|
|
70
|
+
"default": "./dist/utils.cjs"
|
|
71
|
+
},
|
|
72
|
+
"import": {
|
|
73
|
+
"types": "./dist/utils.d.ts",
|
|
74
|
+
"default": "./dist/utils.js"
|
|
75
75
|
}
|
|
76
76
|
},
|
|
77
77
|
"./package.json": "./package.json"
|
|
@@ -82,9 +82,10 @@
|
|
|
82
82
|
"README.md",
|
|
83
83
|
"LICENSE"
|
|
84
84
|
],
|
|
85
|
+
"module": "./dist/index.js",
|
|
85
86
|
"scripts": {
|
|
86
|
-
"build": "turbo build:compile --filter @langchain/google-vertexai-web",
|
|
87
|
-
"build:compile": "
|
|
87
|
+
"build": "turbo build:compile --filter @langchain/google-vertexai-web --output-logs new-only",
|
|
88
|
+
"build:compile": "tsdown",
|
|
88
89
|
"lint:eslint": "eslint --cache src/",
|
|
89
90
|
"lint:dpdm": "dpdm --skip-dynamic-imports circular --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts",
|
|
90
91
|
"lint": "pnpm lint:eslint && pnpm lint:dpdm",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chat_models.d.cts","names":["ChatGoogleInput","ChatGoogle","ChatVertexAIInput","ChatVertexAI"],"sources":["../src/chat_models.d.ts"],"sourcesContent":["import { type ChatGoogleInput, ChatGoogle } from \"@langchain/google-webauth\";\n/**\n * Input to a Google Vertex AI chat model class.\n */\nexport interface ChatVertexAIInput extends ChatGoogleInput {\n}\n/**\n * Integration with Google Vertex AI chat models in web environments.\n *\n * Setup:\n * Install `@langchain/google-vertexai-web` and set your stringified\n * Vertex AI credentials as an environment variable named `GOOGLE_VERTEX_AI_WEB_CREDENTIALS`.\n *\n * ```bash\n * npm install @langchain/google-vertexai-web\n * export GOOGLE_VERTEX_AI_WEB_CREDENTIALS={\"type\":\"service_account\",\"project_id\":\"YOUR_PROJECT-12345\",...}\n * ```\n *\n * ## [Constructor args](https://api.js.langchain.com/classes/_langchain_google_vertexai_web.index.ChatVertexAI.html#constructor)\n *\n * ## [Runtime args](https://api.js.langchain.com/interfaces/langchain_google_common_types.GoogleAIBaseLanguageModelCallOptions.html)\n *\n * Runtime args can be passed as the second argument to any of the base runnable methods `.invoke`. `.stream`, `.batch`, etc.\n * They can also be passed via `.withConfig`, or the second arg in `.bindTools`, like shown in the examples below:\n *\n * ```typescript\n * // If binding tools along with other options, chain `.bindTools` and `.withConfig`\n * const llmWithArgsBound = llm.bindTools([...]) // tools array\n * .withConfig({\n * stop: [\"\\n\"], // other call options\n * });\n *\n * // When calling `.bindTools`, call options should be passed via the second argument\n * const llmWithTools = llm.bindTools(\n * [...],\n * {\n * tool_choice: \"auto\",\n * }\n * );\n * ```\n *\n * ## Examples\n *\n * <details open>\n * <summary><strong>Instantiate</strong></summary>\n *\n * ```typescript\n * import { ChatVertexAI } from '@langchain/google-vertexai-web';\n *\n * const llm = new ChatVertexAI({\n * model: \"gemini-1.5-pro\",\n * temperature: 0,\n * authOptions: {\n * credentials: process.env.GOOGLE_VERTEX_AI_WEB_CREDENTIALS,\n * },\n * // other params...\n * });\n * ```\n * </details>\n *\n * <br />\n *\n * <details>\n * <summary><strong>Invoking</strong></summary>\n *\n * ```typescript\n * const input = `Translate \"I love programming\" into French.`;\n *\n * // Models also accept a list of chat messages or a formatted prompt\n * const result = await llm.invoke(input);\n * console.log(result);\n * ```\n *\n * ```txt\n * AIMessageChunk {\n * \"content\": \"\\\"J'adore programmer\\\" \\n\\nHere's why this is the best translation:\\n\\n* **J'adore** means \\\"I love\\\" and conveys a strong passion.\\n* **Programmer** is the French verb for \\\"to program.\\\"\\n\\nThis translation is natural and idiomatic in French. \\n\",\n * \"additional_kwargs\": {},\n * \"response_metadata\": {},\n * \"tool_calls\": [],\n * \"tool_call_chunks\": [],\n * \"invalid_tool_calls\": [],\n * \"usage_metadata\": {\n * \"input_tokens\": 9,\n * \"output_tokens\": 63,\n * \"total_tokens\": 72\n * }\n * }\n * ```\n * </details>\n *\n * <br />\n *\n * <details>\n * <summary><strong>Streaming Chunks</strong></summary>\n *\n * ```typescript\n * for await (const chunk of await llm.stream(input)) {\n * console.log(chunk);\n * }\n * ```\n *\n * ```txt\n * AIMessageChunk {\n * \"content\": \"\\\"\",\n * \"additional_kwargs\": {},\n * \"response_metadata\": {},\n * \"tool_calls\": [],\n * \"tool_call_chunks\": [],\n * \"invalid_tool_calls\": []\n * }\n * AIMessageChunk {\n * \"content\": \"J'adore programmer\\\" \\n\",\n * \"additional_kwargs\": {},\n * \"response_metadata\": {},\n * \"tool_calls\": [],\n * \"tool_call_chunks\": [],\n * \"invalid_tool_calls\": []\n * }\n * AIMessageChunk {\n * \"content\": \"\",\n * \"additional_kwargs\": {},\n * \"response_metadata\": {},\n * \"tool_calls\": [],\n * \"tool_call_chunks\": [],\n * \"invalid_tool_calls\": []\n * }\n * AIMessageChunk {\n * \"content\": \"\",\n * \"additional_kwargs\": {},\n * \"response_metadata\": {\n * \"finishReason\": \"stop\"\n * },\n * \"tool_calls\": [],\n * \"tool_call_chunks\": [],\n * \"invalid_tool_calls\": [],\n * \"usage_metadata\": {\n * \"input_tokens\": 9,\n * \"output_tokens\": 8,\n * \"total_tokens\": 17\n * }\n * }\n * ```\n * </details>\n *\n * <br />\n *\n * <details>\n * <summary><strong>Aggregate Streamed Chunks</strong></summary>\n *\n * ```typescript\n * import { AIMessageChunk } from '@langchain/core/messages';\n * import { concat } from '@langchain/core/utils/stream';\n *\n * const stream = await llm.stream(input);\n * let full: AIMessageChunk | undefined;\n * for await (const chunk of stream) {\n * full = !full ? chunk : concat(full, chunk);\n * }\n * console.log(full);\n * ```\n *\n * ```txt\n * AIMessageChunk {\n * \"content\": \"\\\"J'adore programmer\\\" \\n\",\n * \"additional_kwargs\": {},\n * \"response_metadata\": {\n * \"finishReason\": \"stop\"\n * },\n * \"tool_calls\": [],\n * \"tool_call_chunks\": [],\n * \"invalid_tool_calls\": [],\n * \"usage_metadata\": {\n * \"input_tokens\": 9,\n * \"output_tokens\": 8,\n * \"total_tokens\": 17\n * }\n * }\n * ```\n * </details>\n *\n * <br />\n *\n * <details>\n * <summary><strong>Bind tools</strong></summary>\n *\n * ```typescript\n * import { z } from 'zod';\n *\n * const GetWeather = {\n * name: \"GetWeather\",\n * description: \"Get the current weather in a given location\",\n * schema: z.object({\n * location: z.string().describe(\"The city and state, e.g. San Francisco, CA\")\n * }),\n * }\n *\n * const GetPopulation = {\n * name: \"GetPopulation\",\n * description: \"Get the current population in a given location\",\n * schema: z.object({\n * location: z.string().describe(\"The city and state, e.g. San Francisco, CA\")\n * }),\n * }\n *\n * const llmWithTools = llm.bindTools([GetWeather, GetPopulation]);\n * const aiMsg = await llmWithTools.invoke(\n * \"Which city is hotter today and which is bigger: LA or NY?\"\n * );\n * console.log(aiMsg.tool_calls);\n * ```\n *\n * ```txt\n * [\n * {\n * name: 'GetPopulation',\n * args: { location: 'New York City, NY' },\n * id: '33c1c1f47e2f492799c77d2800a43912',\n * type: 'tool_call'\n * }\n * ]\n * ```\n * </details>\n *\n * <br />\n *\n * <details>\n * <summary><strong>Structured Output</strong></summary>\n *\n * ```typescript\n * import { z } from 'zod';\n *\n * const Joke = z.object({\n * setup: z.string().describe(\"The setup of the joke\"),\n * punchline: z.string().describe(\"The punchline to the joke\"),\n * rating: z.number().optional().describe(\"How funny the joke is, from 1 to 10\")\n * }).describe('Joke to tell user.');\n *\n * const structuredLlm = llm.withStructuredOutput(Joke, { name: \"Joke\" });\n * const jokeResult = await structuredLlm.invoke(\"Tell me a joke about cats\");\n * console.log(jokeResult);\n * ```\n *\n * ```txt\n * {\n * setup: 'What do you call a cat that loves to bowl?',\n * punchline: 'An alley cat!'\n * }\n * ```\n * </details>\n *\n * <br />\n *\n * <details>\n * <summary><strong>Usage Metadata</strong></summary>\n *\n * ```typescript\n * const aiMsgForMetadata = await llm.invoke(input);\n * console.log(aiMsgForMetadata.usage_metadata);\n * ```\n *\n * ```txt\n * { input_tokens: 9, output_tokens: 8, total_tokens: 17 }\n * ```\n * </details>\n *\n * <br />\n *\n * <details>\n * <summary><strong>Stream Usage Metadata</strong></summary>\n *\n * ```typescript\n * const streamForMetadata = await llm.stream(\n * input,\n * {\n * streamUsage: true\n * }\n * );\n * let fullForMetadata: AIMessageChunk | undefined;\n * for await (const chunk of streamForMetadata) {\n * fullForMetadata = !fullForMetadata ? chunk : concat(fullForMetadata, chunk);\n * }\n * console.log(fullForMetadata?.usage_metadata);\n * ```\n *\n * ```txt\n * { input_tokens: 9, output_tokens: 8, total_tokens: 17 }\n * ```\n * </details>\n *\n * <br />\n */\nexport declare class ChatVertexAI extends ChatGoogle {\n lc_namespace: string[];\n static lc_name(): string;\n constructor(fields?: ChatVertexAIInput);\n}\n"],"mappings":";;;;;;AAIA;AA+RqBG,UA/RJD,iBAAAA,SAA0BF,eA+RV,CAAA;;;AAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAA/BG,YAAAA,SAAqBF,UAAAA;;;uBAGjBC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chat_models.d.ts","names":["ChatGoogleInput","ChatGoogle","ChatVertexAIInput","ChatVertexAI"],"sources":["../src/chat_models.d.ts"],"sourcesContent":["import { type ChatGoogleInput, ChatGoogle } from \"@langchain/google-webauth\";\n/**\n * Input to a Google Vertex AI chat model class.\n */\nexport interface ChatVertexAIInput extends ChatGoogleInput {\n}\n/**\n * Integration with Google Vertex AI chat models in web environments.\n *\n * Setup:\n * Install `@langchain/google-vertexai-web` and set your stringified\n * Vertex AI credentials as an environment variable named `GOOGLE_VERTEX_AI_WEB_CREDENTIALS`.\n *\n * ```bash\n * npm install @langchain/google-vertexai-web\n * export GOOGLE_VERTEX_AI_WEB_CREDENTIALS={\"type\":\"service_account\",\"project_id\":\"YOUR_PROJECT-12345\",...}\n * ```\n *\n * ## [Constructor args](https://api.js.langchain.com/classes/_langchain_google_vertexai_web.index.ChatVertexAI.html#constructor)\n *\n * ## [Runtime args](https://api.js.langchain.com/interfaces/langchain_google_common_types.GoogleAIBaseLanguageModelCallOptions.html)\n *\n * Runtime args can be passed as the second argument to any of the base runnable methods `.invoke`. `.stream`, `.batch`, etc.\n * They can also be passed via `.withConfig`, or the second arg in `.bindTools`, like shown in the examples below:\n *\n * ```typescript\n * // If binding tools along with other options, chain `.bindTools` and `.withConfig`\n * const llmWithArgsBound = llm.bindTools([...]) // tools array\n * .withConfig({\n * stop: [\"\\n\"], // other call options\n * });\n *\n * // When calling `.bindTools`, call options should be passed via the second argument\n * const llmWithTools = llm.bindTools(\n * [...],\n * {\n * tool_choice: \"auto\",\n * }\n * );\n * ```\n *\n * ## Examples\n *\n * <details open>\n * <summary><strong>Instantiate</strong></summary>\n *\n * ```typescript\n * import { ChatVertexAI } from '@langchain/google-vertexai-web';\n *\n * const llm = new ChatVertexAI({\n * model: \"gemini-1.5-pro\",\n * temperature: 0,\n * authOptions: {\n * credentials: process.env.GOOGLE_VERTEX_AI_WEB_CREDENTIALS,\n * },\n * // other params...\n * });\n * ```\n * </details>\n *\n * <br />\n *\n * <details>\n * <summary><strong>Invoking</strong></summary>\n *\n * ```typescript\n * const input = `Translate \"I love programming\" into French.`;\n *\n * // Models also accept a list of chat messages or a formatted prompt\n * const result = await llm.invoke(input);\n * console.log(result);\n * ```\n *\n * ```txt\n * AIMessageChunk {\n * \"content\": \"\\\"J'adore programmer\\\" \\n\\nHere's why this is the best translation:\\n\\n* **J'adore** means \\\"I love\\\" and conveys a strong passion.\\n* **Programmer** is the French verb for \\\"to program.\\\"\\n\\nThis translation is natural and idiomatic in French. \\n\",\n * \"additional_kwargs\": {},\n * \"response_metadata\": {},\n * \"tool_calls\": [],\n * \"tool_call_chunks\": [],\n * \"invalid_tool_calls\": [],\n * \"usage_metadata\": {\n * \"input_tokens\": 9,\n * \"output_tokens\": 63,\n * \"total_tokens\": 72\n * }\n * }\n * ```\n * </details>\n *\n * <br />\n *\n * <details>\n * <summary><strong>Streaming Chunks</strong></summary>\n *\n * ```typescript\n * for await (const chunk of await llm.stream(input)) {\n * console.log(chunk);\n * }\n * ```\n *\n * ```txt\n * AIMessageChunk {\n * \"content\": \"\\\"\",\n * \"additional_kwargs\": {},\n * \"response_metadata\": {},\n * \"tool_calls\": [],\n * \"tool_call_chunks\": [],\n * \"invalid_tool_calls\": []\n * }\n * AIMessageChunk {\n * \"content\": \"J'adore programmer\\\" \\n\",\n * \"additional_kwargs\": {},\n * \"response_metadata\": {},\n * \"tool_calls\": [],\n * \"tool_call_chunks\": [],\n * \"invalid_tool_calls\": []\n * }\n * AIMessageChunk {\n * \"content\": \"\",\n * \"additional_kwargs\": {},\n * \"response_metadata\": {},\n * \"tool_calls\": [],\n * \"tool_call_chunks\": [],\n * \"invalid_tool_calls\": []\n * }\n * AIMessageChunk {\n * \"content\": \"\",\n * \"additional_kwargs\": {},\n * \"response_metadata\": {\n * \"finishReason\": \"stop\"\n * },\n * \"tool_calls\": [],\n * \"tool_call_chunks\": [],\n * \"invalid_tool_calls\": [],\n * \"usage_metadata\": {\n * \"input_tokens\": 9,\n * \"output_tokens\": 8,\n * \"total_tokens\": 17\n * }\n * }\n * ```\n * </details>\n *\n * <br />\n *\n * <details>\n * <summary><strong>Aggregate Streamed Chunks</strong></summary>\n *\n * ```typescript\n * import { AIMessageChunk } from '@langchain/core/messages';\n * import { concat } from '@langchain/core/utils/stream';\n *\n * const stream = await llm.stream(input);\n * let full: AIMessageChunk | undefined;\n * for await (const chunk of stream) {\n * full = !full ? chunk : concat(full, chunk);\n * }\n * console.log(full);\n * ```\n *\n * ```txt\n * AIMessageChunk {\n * \"content\": \"\\\"J'adore programmer\\\" \\n\",\n * \"additional_kwargs\": {},\n * \"response_metadata\": {\n * \"finishReason\": \"stop\"\n * },\n * \"tool_calls\": [],\n * \"tool_call_chunks\": [],\n * \"invalid_tool_calls\": [],\n * \"usage_metadata\": {\n * \"input_tokens\": 9,\n * \"output_tokens\": 8,\n * \"total_tokens\": 17\n * }\n * }\n * ```\n * </details>\n *\n * <br />\n *\n * <details>\n * <summary><strong>Bind tools</strong></summary>\n *\n * ```typescript\n * import { z } from 'zod';\n *\n * const GetWeather = {\n * name: \"GetWeather\",\n * description: \"Get the current weather in a given location\",\n * schema: z.object({\n * location: z.string().describe(\"The city and state, e.g. San Francisco, CA\")\n * }),\n * }\n *\n * const GetPopulation = {\n * name: \"GetPopulation\",\n * description: \"Get the current population in a given location\",\n * schema: z.object({\n * location: z.string().describe(\"The city and state, e.g. San Francisco, CA\")\n * }),\n * }\n *\n * const llmWithTools = llm.bindTools([GetWeather, GetPopulation]);\n * const aiMsg = await llmWithTools.invoke(\n * \"Which city is hotter today and which is bigger: LA or NY?\"\n * );\n * console.log(aiMsg.tool_calls);\n * ```\n *\n * ```txt\n * [\n * {\n * name: 'GetPopulation',\n * args: { location: 'New York City, NY' },\n * id: '33c1c1f47e2f492799c77d2800a43912',\n * type: 'tool_call'\n * }\n * ]\n * ```\n * </details>\n *\n * <br />\n *\n * <details>\n * <summary><strong>Structured Output</strong></summary>\n *\n * ```typescript\n * import { z } from 'zod';\n *\n * const Joke = z.object({\n * setup: z.string().describe(\"The setup of the joke\"),\n * punchline: z.string().describe(\"The punchline to the joke\"),\n * rating: z.number().optional().describe(\"How funny the joke is, from 1 to 10\")\n * }).describe('Joke to tell user.');\n *\n * const structuredLlm = llm.withStructuredOutput(Joke, { name: \"Joke\" });\n * const jokeResult = await structuredLlm.invoke(\"Tell me a joke about cats\");\n * console.log(jokeResult);\n * ```\n *\n * ```txt\n * {\n * setup: 'What do you call a cat that loves to bowl?',\n * punchline: 'An alley cat!'\n * }\n * ```\n * </details>\n *\n * <br />\n *\n * <details>\n * <summary><strong>Usage Metadata</strong></summary>\n *\n * ```typescript\n * const aiMsgForMetadata = await llm.invoke(input);\n * console.log(aiMsgForMetadata.usage_metadata);\n * ```\n *\n * ```txt\n * { input_tokens: 9, output_tokens: 8, total_tokens: 17 }\n * ```\n * </details>\n *\n * <br />\n *\n * <details>\n * <summary><strong>Stream Usage Metadata</strong></summary>\n *\n * ```typescript\n * const streamForMetadata = await llm.stream(\n * input,\n * {\n * streamUsage: true\n * }\n * );\n * let fullForMetadata: AIMessageChunk | undefined;\n * for await (const chunk of streamForMetadata) {\n * fullForMetadata = !fullForMetadata ? chunk : concat(fullForMetadata, chunk);\n * }\n * console.log(fullForMetadata?.usage_metadata);\n * ```\n *\n * ```txt\n * { input_tokens: 9, output_tokens: 8, total_tokens: 17 }\n * ```\n * </details>\n *\n * <br />\n */\nexport declare class ChatVertexAI extends ChatGoogle {\n lc_namespace: string[];\n static lc_name(): string;\n constructor(fields?: ChatVertexAIInput);\n}\n"],"mappings":";;;;;;AAIA;AA+RqBG,UA/RJD,iBAAAA,SAA0BF,eA+RV,CAAA;;;AAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAA/BG,YAAAA,SAAqBF,UAAAA;;;uBAGjBC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"embeddings.d.cts","names":["GoogleEmbeddingsInput","GoogleEmbeddings","GoogleVertexAIEmbeddingsInput","VertexAIEmbeddings"],"sources":["../src/embeddings.d.ts"],"sourcesContent":["import { type GoogleEmbeddingsInput, GoogleEmbeddings } from \"@langchain/google-webauth\";\n/**\n * Input to a Google Vertex AI embeddings class.\n */\nexport interface GoogleVertexAIEmbeddingsInput extends GoogleEmbeddingsInput {\n}\n/**\n * Integration with a Google Vertex AI embeddings model using\n * the \"@langchain/google-webauth\" package for auth.\n */\nexport declare class VertexAIEmbeddings extends GoogleEmbeddings {\n static lc_name(): string;\n constructor(fields: GoogleVertexAIEmbeddingsInput);\n}\n"],"mappings":";;;;;;AAIA;AAMqBG,UANJD,6BAAAA,SAAsCF,qBAMhB,CAAA;;;AAAyB;;cAA3CG,kBAAAA,SAA2BF,gBAAAA;;sBAExBC"}
|
package/dist/embeddings.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"embeddings.d.ts","names":["GoogleEmbeddingsInput","GoogleEmbeddings","GoogleVertexAIEmbeddingsInput","VertexAIEmbeddings"],"sources":["../src/embeddings.d.ts"],"sourcesContent":["import { type GoogleEmbeddingsInput, GoogleEmbeddings } from \"@langchain/google-webauth\";\n/**\n * Input to a Google Vertex AI embeddings class.\n */\nexport interface GoogleVertexAIEmbeddingsInput extends GoogleEmbeddingsInput {\n}\n/**\n * Integration with a Google Vertex AI embeddings model using\n * the \"@langchain/google-webauth\" package for auth.\n */\nexport declare class VertexAIEmbeddings extends GoogleEmbeddings {\n static lc_name(): string;\n constructor(fields: GoogleVertexAIEmbeddingsInput);\n}\n"],"mappings":";;;;;;AAIA;AAMqBG,UANJD,6BAAAA,SAAsCF,qBAMhB,CAAA;;;AAAyB;;cAA3CG,kBAAAA,SAA2BF,gBAAAA;;sBAExBC"}
|
package/dist/llms.d.cts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"llms.d.cts","names":["GoogleLLMInput","GoogleLLM","VertexAIInput","VertexAI"],"sources":["../src/llms.d.ts"],"sourcesContent":["import { type GoogleLLMInput, GoogleLLM } from \"@langchain/google-webauth\";\n/**\n * Input to a Google Vertex LLM class.\n */\nexport interface VertexAIInput extends GoogleLLMInput {\n}\n/**\n * Integration with a Google Vertex AI LLM using\n * the \"@langchain/google-webauth\" package for auth.\n */\nexport declare class VertexAI extends GoogleLLM {\n lc_namespace: string[];\n static lc_name(): string;\n constructor(fields?: VertexAIInput);\n}\n"],"mappings":";;;;;;AAIA;AAMqBG,UANJD,aAAAA,SAAsBF,cAMV,CAAA;;;AAAkB;;cAA1BG,QAAAA,SAAiBF,SAAAA;;;uBAGbC"}
|
package/dist/llms.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"llms.d.ts","names":["GoogleLLMInput","GoogleLLM","VertexAIInput","VertexAI"],"sources":["../src/llms.d.ts"],"sourcesContent":["import { type GoogleLLMInput, GoogleLLM } from \"@langchain/google-webauth\";\n/**\n * Input to a Google Vertex LLM class.\n */\nexport interface VertexAIInput extends GoogleLLMInput {\n}\n/**\n * Integration with a Google Vertex AI LLM using\n * the \"@langchain/google-webauth\" package for auth.\n */\nexport declare class VertexAI extends GoogleLLM {\n lc_namespace: string[];\n static lc_name(): string;\n constructor(fields?: VertexAIInput);\n}\n"],"mappings":";;;;;;AAIA;AAMqBG,UANJD,aAAAA,SAAsBF,cAMV,CAAA;;;AAAkB;;cAA1BG,QAAAA,SAAiBF,SAAAA;;;uBAGbC"}
|