@langchain/google-vertexai 0.0.24 → 0.0.26
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/dist/chat_models.cjs +280 -1
- package/dist/chat_models.d.ts +281 -2
- package/dist/chat_models.js +280 -1
- package/dist/embeddings.cjs +6 -5
- package/dist/embeddings.d.ts +4 -3
- package/dist/embeddings.js +4 -3
- package/dist/llms.cjs +2 -1
- package/dist/llms.d.ts +3 -2
- package/dist/llms.js +2 -1
- package/package.json +2 -2
package/dist/chat_models.cjs
CHANGED
|
@@ -3,7 +3,286 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ChatVertexAI = void 0;
|
|
4
4
|
const google_gauth_1 = require("@langchain/google-gauth");
|
|
5
5
|
/**
|
|
6
|
-
* Integration with
|
|
6
|
+
* Integration with Google Vertex AI chat models.
|
|
7
|
+
*
|
|
8
|
+
* Setup:
|
|
9
|
+
* Install `@langchain/google-vertexai` and set your stringified
|
|
10
|
+
* Vertex AI credentials as an environment variable named `GOOGLE_APPLICATION_CREDENTIALS`.
|
|
11
|
+
*
|
|
12
|
+
* ```bash
|
|
13
|
+
* npm install @langchain/google-vertexai
|
|
14
|
+
* export GOOGLE_APPLICATION_CREDENTIALS="path/to/credentials"
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* ## [Constructor args](https://api.js.langchain.com/classes/langchain_community_chat_models_googlevertexai_web.ChatGoogleVertexAI.html#constructor)
|
|
18
|
+
*
|
|
19
|
+
* ## [Runtime args](https://api.js.langchain.com/interfaces/langchain_google_common_types.GoogleAIBaseLanguageModelCallOptions.html)
|
|
20
|
+
*
|
|
21
|
+
* Runtime args can be passed as the second argument to any of the base runnable methods `.invoke`. `.stream`, `.batch`, etc.
|
|
22
|
+
* They can also be passed via `.bind`, or the second arg in `.bindTools`, like shown in the examples below:
|
|
23
|
+
*
|
|
24
|
+
* ```typescript
|
|
25
|
+
* // When calling `.bind`, call options should be passed via the first argument
|
|
26
|
+
* const llmWithArgsBound = llm.bind({
|
|
27
|
+
* stop: ["\n"],
|
|
28
|
+
* tools: [...],
|
|
29
|
+
* });
|
|
30
|
+
*
|
|
31
|
+
* // When calling `.bindTools`, call options should be passed via the second argument
|
|
32
|
+
* const llmWithTools = llm.bindTools(
|
|
33
|
+
* [...],
|
|
34
|
+
* {
|
|
35
|
+
* tool_choice: "auto",
|
|
36
|
+
* }
|
|
37
|
+
* );
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* ## Examples
|
|
41
|
+
*
|
|
42
|
+
* <details open>
|
|
43
|
+
* <summary><strong>Instantiate</strong></summary>
|
|
44
|
+
*
|
|
45
|
+
* ```typescript
|
|
46
|
+
* import { ChatVertexAI } from '@langchain/google-vertexai';
|
|
47
|
+
*
|
|
48
|
+
* const llm = new ChatVertexAI({
|
|
49
|
+
* model: "gemini-1.5-pro",
|
|
50
|
+
* temperature: 0,
|
|
51
|
+
* // other params...
|
|
52
|
+
* });
|
|
53
|
+
* ```
|
|
54
|
+
* </details>
|
|
55
|
+
*
|
|
56
|
+
* <br />
|
|
57
|
+
*
|
|
58
|
+
* <details>
|
|
59
|
+
* <summary><strong>Invoking</strong></summary>
|
|
60
|
+
*
|
|
61
|
+
* ```typescript
|
|
62
|
+
* const input = `Translate "I love programming" into French.`;
|
|
63
|
+
*
|
|
64
|
+
* // Models also accept a list of chat messages or a formatted prompt
|
|
65
|
+
* const result = await llm.invoke(input);
|
|
66
|
+
* console.log(result);
|
|
67
|
+
* ```
|
|
68
|
+
*
|
|
69
|
+
* ```txt
|
|
70
|
+
* AIMessageChunk {
|
|
71
|
+
* "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",
|
|
72
|
+
* "additional_kwargs": {},
|
|
73
|
+
* "response_metadata": {},
|
|
74
|
+
* "tool_calls": [],
|
|
75
|
+
* "tool_call_chunks": [],
|
|
76
|
+
* "invalid_tool_calls": [],
|
|
77
|
+
* "usage_metadata": {
|
|
78
|
+
* "input_tokens": 9,
|
|
79
|
+
* "output_tokens": 63,
|
|
80
|
+
* "total_tokens": 72
|
|
81
|
+
* }
|
|
82
|
+
* }
|
|
83
|
+
* ```
|
|
84
|
+
* </details>
|
|
85
|
+
*
|
|
86
|
+
* <br />
|
|
87
|
+
*
|
|
88
|
+
* <details>
|
|
89
|
+
* <summary><strong>Streaming Chunks</strong></summary>
|
|
90
|
+
*
|
|
91
|
+
* ```typescript
|
|
92
|
+
* for await (const chunk of await llm.stream(input)) {
|
|
93
|
+
* console.log(chunk);
|
|
94
|
+
* }
|
|
95
|
+
* ```
|
|
96
|
+
*
|
|
97
|
+
* ```txt
|
|
98
|
+
* AIMessageChunk {
|
|
99
|
+
* "content": "\"",
|
|
100
|
+
* "additional_kwargs": {},
|
|
101
|
+
* "response_metadata": {},
|
|
102
|
+
* "tool_calls": [],
|
|
103
|
+
* "tool_call_chunks": [],
|
|
104
|
+
* "invalid_tool_calls": []
|
|
105
|
+
* }
|
|
106
|
+
* AIMessageChunk {
|
|
107
|
+
* "content": "J'adore programmer\" \n",
|
|
108
|
+
* "additional_kwargs": {},
|
|
109
|
+
* "response_metadata": {},
|
|
110
|
+
* "tool_calls": [],
|
|
111
|
+
* "tool_call_chunks": [],
|
|
112
|
+
* "invalid_tool_calls": []
|
|
113
|
+
* }
|
|
114
|
+
* AIMessageChunk {
|
|
115
|
+
* "content": "",
|
|
116
|
+
* "additional_kwargs": {},
|
|
117
|
+
* "response_metadata": {},
|
|
118
|
+
* "tool_calls": [],
|
|
119
|
+
* "tool_call_chunks": [],
|
|
120
|
+
* "invalid_tool_calls": []
|
|
121
|
+
* }
|
|
122
|
+
* AIMessageChunk {
|
|
123
|
+
* "content": "",
|
|
124
|
+
* "additional_kwargs": {},
|
|
125
|
+
* "response_metadata": {
|
|
126
|
+
* "finishReason": "stop"
|
|
127
|
+
* },
|
|
128
|
+
* "tool_calls": [],
|
|
129
|
+
* "tool_call_chunks": [],
|
|
130
|
+
* "invalid_tool_calls": [],
|
|
131
|
+
* "usage_metadata": {
|
|
132
|
+
* "input_tokens": 9,
|
|
133
|
+
* "output_tokens": 8,
|
|
134
|
+
* "total_tokens": 17
|
|
135
|
+
* }
|
|
136
|
+
* }
|
|
137
|
+
* ```
|
|
138
|
+
* </details>
|
|
139
|
+
*
|
|
140
|
+
* <br />
|
|
141
|
+
*
|
|
142
|
+
* <details>
|
|
143
|
+
* <summary><strong>Aggregate Streamed Chunks</strong></summary>
|
|
144
|
+
*
|
|
145
|
+
* ```typescript
|
|
146
|
+
* import { AIMessageChunk } from '@langchain/core/messages';
|
|
147
|
+
* import { concat } from '@langchain/core/utils/stream';
|
|
148
|
+
*
|
|
149
|
+
* const stream = await llm.stream(input);
|
|
150
|
+
* let full: AIMessageChunk | undefined;
|
|
151
|
+
* for await (const chunk of stream) {
|
|
152
|
+
* full = !full ? chunk : concat(full, chunk);
|
|
153
|
+
* }
|
|
154
|
+
* console.log(full);
|
|
155
|
+
* ```
|
|
156
|
+
*
|
|
157
|
+
* ```txt
|
|
158
|
+
* AIMessageChunk {
|
|
159
|
+
* "content": "\"J'adore programmer\" \n",
|
|
160
|
+
* "additional_kwargs": {},
|
|
161
|
+
* "response_metadata": {
|
|
162
|
+
* "finishReason": "stop"
|
|
163
|
+
* },
|
|
164
|
+
* "tool_calls": [],
|
|
165
|
+
* "tool_call_chunks": [],
|
|
166
|
+
* "invalid_tool_calls": [],
|
|
167
|
+
* "usage_metadata": {
|
|
168
|
+
* "input_tokens": 9,
|
|
169
|
+
* "output_tokens": 8,
|
|
170
|
+
* "total_tokens": 17
|
|
171
|
+
* }
|
|
172
|
+
* }
|
|
173
|
+
* ```
|
|
174
|
+
* </details>
|
|
175
|
+
*
|
|
176
|
+
* <br />
|
|
177
|
+
*
|
|
178
|
+
* <details>
|
|
179
|
+
* <summary><strong>Bind tools</strong></summary>
|
|
180
|
+
*
|
|
181
|
+
* ```typescript
|
|
182
|
+
* import { z } from 'zod';
|
|
183
|
+
*
|
|
184
|
+
* const GetWeather = {
|
|
185
|
+
* name: "GetWeather",
|
|
186
|
+
* description: "Get the current weather in a given location",
|
|
187
|
+
* schema: z.object({
|
|
188
|
+
* location: z.string().describe("The city and state, e.g. San Francisco, CA")
|
|
189
|
+
* }),
|
|
190
|
+
* }
|
|
191
|
+
*
|
|
192
|
+
* const GetPopulation = {
|
|
193
|
+
* name: "GetPopulation",
|
|
194
|
+
* description: "Get the current population in a given location",
|
|
195
|
+
* schema: z.object({
|
|
196
|
+
* location: z.string().describe("The city and state, e.g. San Francisco, CA")
|
|
197
|
+
* }),
|
|
198
|
+
* }
|
|
199
|
+
*
|
|
200
|
+
* const llmWithTools = llm.bindTools([GetWeather, GetPopulation]);
|
|
201
|
+
* const aiMsg = await llmWithTools.invoke(
|
|
202
|
+
* "Which city is hotter today and which is bigger: LA or NY?"
|
|
203
|
+
* );
|
|
204
|
+
* console.log(aiMsg.tool_calls);
|
|
205
|
+
* ```
|
|
206
|
+
*
|
|
207
|
+
* ```txt
|
|
208
|
+
* [
|
|
209
|
+
* {
|
|
210
|
+
* name: 'GetPopulation',
|
|
211
|
+
* args: { location: 'New York City, NY' },
|
|
212
|
+
* id: '33c1c1f47e2f492799c77d2800a43912',
|
|
213
|
+
* type: 'tool_call'
|
|
214
|
+
* }
|
|
215
|
+
* ]
|
|
216
|
+
* ```
|
|
217
|
+
* </details>
|
|
218
|
+
*
|
|
219
|
+
* <br />
|
|
220
|
+
*
|
|
221
|
+
* <details>
|
|
222
|
+
* <summary><strong>Structured Output</strong></summary>
|
|
223
|
+
*
|
|
224
|
+
* ```typescript
|
|
225
|
+
* import { z } from 'zod';
|
|
226
|
+
*
|
|
227
|
+
* const Joke = z.object({
|
|
228
|
+
* setup: z.string().describe("The setup of the joke"),
|
|
229
|
+
* punchline: z.string().describe("The punchline to the joke"),
|
|
230
|
+
* rating: z.number().optional().describe("How funny the joke is, from 1 to 10")
|
|
231
|
+
* }).describe('Joke to tell user.');
|
|
232
|
+
*
|
|
233
|
+
* const structuredLlm = llm.withStructuredOutput(Joke, { name: "Joke" });
|
|
234
|
+
* const jokeResult = await structuredLlm.invoke("Tell me a joke about cats");
|
|
235
|
+
* console.log(jokeResult);
|
|
236
|
+
* ```
|
|
237
|
+
*
|
|
238
|
+
* ```txt
|
|
239
|
+
* {
|
|
240
|
+
* setup: 'What do you call a cat that loves to bowl?',
|
|
241
|
+
* punchline: 'An alley cat!'
|
|
242
|
+
* }
|
|
243
|
+
* ```
|
|
244
|
+
* </details>
|
|
245
|
+
*
|
|
246
|
+
* <br />
|
|
247
|
+
*
|
|
248
|
+
* <details>
|
|
249
|
+
* <summary><strong>Usage Metadata</strong></summary>
|
|
250
|
+
*
|
|
251
|
+
* ```typescript
|
|
252
|
+
* const aiMsgForMetadata = await llm.invoke(input);
|
|
253
|
+
* console.log(aiMsgForMetadata.usage_metadata);
|
|
254
|
+
* ```
|
|
255
|
+
*
|
|
256
|
+
* ```txt
|
|
257
|
+
* { input_tokens: 9, output_tokens: 8, total_tokens: 17 }
|
|
258
|
+
* ```
|
|
259
|
+
* </details>
|
|
260
|
+
*
|
|
261
|
+
* <br />
|
|
262
|
+
*
|
|
263
|
+
* <details>
|
|
264
|
+
* <summary><strong>Stream Usage Metadata</strong></summary>
|
|
265
|
+
*
|
|
266
|
+
* ```typescript
|
|
267
|
+
* const streamForMetadata = await llm.stream(
|
|
268
|
+
* input,
|
|
269
|
+
* {
|
|
270
|
+
* streamUsage: true
|
|
271
|
+
* }
|
|
272
|
+
* );
|
|
273
|
+
* let fullForMetadata: AIMessageChunk | undefined;
|
|
274
|
+
* for await (const chunk of streamForMetadata) {
|
|
275
|
+
* fullForMetadata = !fullForMetadata ? chunk : concat(fullForMetadata, chunk);
|
|
276
|
+
* }
|
|
277
|
+
* console.log(fullForMetadata?.usage_metadata);
|
|
278
|
+
* ```
|
|
279
|
+
*
|
|
280
|
+
* ```txt
|
|
281
|
+
* { input_tokens: 9, output_tokens: 8, total_tokens: 17 }
|
|
282
|
+
* ```
|
|
283
|
+
* </details>
|
|
284
|
+
*
|
|
285
|
+
* <br />
|
|
7
286
|
*/
|
|
8
287
|
class ChatVertexAI extends google_gauth_1.ChatGoogle {
|
|
9
288
|
static lc_name() {
|
package/dist/chat_models.d.ts
CHANGED
|
@@ -1,11 +1,290 @@
|
|
|
1
1
|
import { type ChatGoogleInput, ChatGoogle } from "@langchain/google-gauth";
|
|
2
2
|
/**
|
|
3
|
-
* Input to chat model class.
|
|
3
|
+
* Input to a Google Vertex AI chat model class.
|
|
4
4
|
*/
|
|
5
5
|
export interface ChatVertexAIInput extends ChatGoogleInput {
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
|
-
* Integration with
|
|
8
|
+
* Integration with Google Vertex AI chat models.
|
|
9
|
+
*
|
|
10
|
+
* Setup:
|
|
11
|
+
* Install `@langchain/google-vertexai` and set your stringified
|
|
12
|
+
* Vertex AI credentials as an environment variable named `GOOGLE_APPLICATION_CREDENTIALS`.
|
|
13
|
+
*
|
|
14
|
+
* ```bash
|
|
15
|
+
* npm install @langchain/google-vertexai
|
|
16
|
+
* export GOOGLE_APPLICATION_CREDENTIALS="path/to/credentials"
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* ## [Constructor args](https://api.js.langchain.com/classes/langchain_community_chat_models_googlevertexai_web.ChatGoogleVertexAI.html#constructor)
|
|
20
|
+
*
|
|
21
|
+
* ## [Runtime args](https://api.js.langchain.com/interfaces/langchain_google_common_types.GoogleAIBaseLanguageModelCallOptions.html)
|
|
22
|
+
*
|
|
23
|
+
* Runtime args can be passed as the second argument to any of the base runnable methods `.invoke`. `.stream`, `.batch`, etc.
|
|
24
|
+
* They can also be passed via `.bind`, or the second arg in `.bindTools`, like shown in the examples below:
|
|
25
|
+
*
|
|
26
|
+
* ```typescript
|
|
27
|
+
* // When calling `.bind`, call options should be passed via the first argument
|
|
28
|
+
* const llmWithArgsBound = llm.bind({
|
|
29
|
+
* stop: ["\n"],
|
|
30
|
+
* tools: [...],
|
|
31
|
+
* });
|
|
32
|
+
*
|
|
33
|
+
* // When calling `.bindTools`, call options should be passed via the second argument
|
|
34
|
+
* const llmWithTools = llm.bindTools(
|
|
35
|
+
* [...],
|
|
36
|
+
* {
|
|
37
|
+
* tool_choice: "auto",
|
|
38
|
+
* }
|
|
39
|
+
* );
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* ## Examples
|
|
43
|
+
*
|
|
44
|
+
* <details open>
|
|
45
|
+
* <summary><strong>Instantiate</strong></summary>
|
|
46
|
+
*
|
|
47
|
+
* ```typescript
|
|
48
|
+
* import { ChatVertexAI } from '@langchain/google-vertexai';
|
|
49
|
+
*
|
|
50
|
+
* const llm = new ChatVertexAI({
|
|
51
|
+
* model: "gemini-1.5-pro",
|
|
52
|
+
* temperature: 0,
|
|
53
|
+
* // other params...
|
|
54
|
+
* });
|
|
55
|
+
* ```
|
|
56
|
+
* </details>
|
|
57
|
+
*
|
|
58
|
+
* <br />
|
|
59
|
+
*
|
|
60
|
+
* <details>
|
|
61
|
+
* <summary><strong>Invoking</strong></summary>
|
|
62
|
+
*
|
|
63
|
+
* ```typescript
|
|
64
|
+
* const input = `Translate "I love programming" into French.`;
|
|
65
|
+
*
|
|
66
|
+
* // Models also accept a list of chat messages or a formatted prompt
|
|
67
|
+
* const result = await llm.invoke(input);
|
|
68
|
+
* console.log(result);
|
|
69
|
+
* ```
|
|
70
|
+
*
|
|
71
|
+
* ```txt
|
|
72
|
+
* AIMessageChunk {
|
|
73
|
+
* "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",
|
|
74
|
+
* "additional_kwargs": {},
|
|
75
|
+
* "response_metadata": {},
|
|
76
|
+
* "tool_calls": [],
|
|
77
|
+
* "tool_call_chunks": [],
|
|
78
|
+
* "invalid_tool_calls": [],
|
|
79
|
+
* "usage_metadata": {
|
|
80
|
+
* "input_tokens": 9,
|
|
81
|
+
* "output_tokens": 63,
|
|
82
|
+
* "total_tokens": 72
|
|
83
|
+
* }
|
|
84
|
+
* }
|
|
85
|
+
* ```
|
|
86
|
+
* </details>
|
|
87
|
+
*
|
|
88
|
+
* <br />
|
|
89
|
+
*
|
|
90
|
+
* <details>
|
|
91
|
+
* <summary><strong>Streaming Chunks</strong></summary>
|
|
92
|
+
*
|
|
93
|
+
* ```typescript
|
|
94
|
+
* for await (const chunk of await llm.stream(input)) {
|
|
95
|
+
* console.log(chunk);
|
|
96
|
+
* }
|
|
97
|
+
* ```
|
|
98
|
+
*
|
|
99
|
+
* ```txt
|
|
100
|
+
* AIMessageChunk {
|
|
101
|
+
* "content": "\"",
|
|
102
|
+
* "additional_kwargs": {},
|
|
103
|
+
* "response_metadata": {},
|
|
104
|
+
* "tool_calls": [],
|
|
105
|
+
* "tool_call_chunks": [],
|
|
106
|
+
* "invalid_tool_calls": []
|
|
107
|
+
* }
|
|
108
|
+
* AIMessageChunk {
|
|
109
|
+
* "content": "J'adore programmer\" \n",
|
|
110
|
+
* "additional_kwargs": {},
|
|
111
|
+
* "response_metadata": {},
|
|
112
|
+
* "tool_calls": [],
|
|
113
|
+
* "tool_call_chunks": [],
|
|
114
|
+
* "invalid_tool_calls": []
|
|
115
|
+
* }
|
|
116
|
+
* AIMessageChunk {
|
|
117
|
+
* "content": "",
|
|
118
|
+
* "additional_kwargs": {},
|
|
119
|
+
* "response_metadata": {},
|
|
120
|
+
* "tool_calls": [],
|
|
121
|
+
* "tool_call_chunks": [],
|
|
122
|
+
* "invalid_tool_calls": []
|
|
123
|
+
* }
|
|
124
|
+
* AIMessageChunk {
|
|
125
|
+
* "content": "",
|
|
126
|
+
* "additional_kwargs": {},
|
|
127
|
+
* "response_metadata": {
|
|
128
|
+
* "finishReason": "stop"
|
|
129
|
+
* },
|
|
130
|
+
* "tool_calls": [],
|
|
131
|
+
* "tool_call_chunks": [],
|
|
132
|
+
* "invalid_tool_calls": [],
|
|
133
|
+
* "usage_metadata": {
|
|
134
|
+
* "input_tokens": 9,
|
|
135
|
+
* "output_tokens": 8,
|
|
136
|
+
* "total_tokens": 17
|
|
137
|
+
* }
|
|
138
|
+
* }
|
|
139
|
+
* ```
|
|
140
|
+
* </details>
|
|
141
|
+
*
|
|
142
|
+
* <br />
|
|
143
|
+
*
|
|
144
|
+
* <details>
|
|
145
|
+
* <summary><strong>Aggregate Streamed Chunks</strong></summary>
|
|
146
|
+
*
|
|
147
|
+
* ```typescript
|
|
148
|
+
* import { AIMessageChunk } from '@langchain/core/messages';
|
|
149
|
+
* import { concat } from '@langchain/core/utils/stream';
|
|
150
|
+
*
|
|
151
|
+
* const stream = await llm.stream(input);
|
|
152
|
+
* let full: AIMessageChunk | undefined;
|
|
153
|
+
* for await (const chunk of stream) {
|
|
154
|
+
* full = !full ? chunk : concat(full, chunk);
|
|
155
|
+
* }
|
|
156
|
+
* console.log(full);
|
|
157
|
+
* ```
|
|
158
|
+
*
|
|
159
|
+
* ```txt
|
|
160
|
+
* AIMessageChunk {
|
|
161
|
+
* "content": "\"J'adore programmer\" \n",
|
|
162
|
+
* "additional_kwargs": {},
|
|
163
|
+
* "response_metadata": {
|
|
164
|
+
* "finishReason": "stop"
|
|
165
|
+
* },
|
|
166
|
+
* "tool_calls": [],
|
|
167
|
+
* "tool_call_chunks": [],
|
|
168
|
+
* "invalid_tool_calls": [],
|
|
169
|
+
* "usage_metadata": {
|
|
170
|
+
* "input_tokens": 9,
|
|
171
|
+
* "output_tokens": 8,
|
|
172
|
+
* "total_tokens": 17
|
|
173
|
+
* }
|
|
174
|
+
* }
|
|
175
|
+
* ```
|
|
176
|
+
* </details>
|
|
177
|
+
*
|
|
178
|
+
* <br />
|
|
179
|
+
*
|
|
180
|
+
* <details>
|
|
181
|
+
* <summary><strong>Bind tools</strong></summary>
|
|
182
|
+
*
|
|
183
|
+
* ```typescript
|
|
184
|
+
* import { z } from 'zod';
|
|
185
|
+
*
|
|
186
|
+
* const GetWeather = {
|
|
187
|
+
* name: "GetWeather",
|
|
188
|
+
* description: "Get the current weather in a given location",
|
|
189
|
+
* schema: z.object({
|
|
190
|
+
* location: z.string().describe("The city and state, e.g. San Francisco, CA")
|
|
191
|
+
* }),
|
|
192
|
+
* }
|
|
193
|
+
*
|
|
194
|
+
* const GetPopulation = {
|
|
195
|
+
* name: "GetPopulation",
|
|
196
|
+
* description: "Get the current population in a given location",
|
|
197
|
+
* schema: z.object({
|
|
198
|
+
* location: z.string().describe("The city and state, e.g. San Francisco, CA")
|
|
199
|
+
* }),
|
|
200
|
+
* }
|
|
201
|
+
*
|
|
202
|
+
* const llmWithTools = llm.bindTools([GetWeather, GetPopulation]);
|
|
203
|
+
* const aiMsg = await llmWithTools.invoke(
|
|
204
|
+
* "Which city is hotter today and which is bigger: LA or NY?"
|
|
205
|
+
* );
|
|
206
|
+
* console.log(aiMsg.tool_calls);
|
|
207
|
+
* ```
|
|
208
|
+
*
|
|
209
|
+
* ```txt
|
|
210
|
+
* [
|
|
211
|
+
* {
|
|
212
|
+
* name: 'GetPopulation',
|
|
213
|
+
* args: { location: 'New York City, NY' },
|
|
214
|
+
* id: '33c1c1f47e2f492799c77d2800a43912',
|
|
215
|
+
* type: 'tool_call'
|
|
216
|
+
* }
|
|
217
|
+
* ]
|
|
218
|
+
* ```
|
|
219
|
+
* </details>
|
|
220
|
+
*
|
|
221
|
+
* <br />
|
|
222
|
+
*
|
|
223
|
+
* <details>
|
|
224
|
+
* <summary><strong>Structured Output</strong></summary>
|
|
225
|
+
*
|
|
226
|
+
* ```typescript
|
|
227
|
+
* import { z } from 'zod';
|
|
228
|
+
*
|
|
229
|
+
* const Joke = z.object({
|
|
230
|
+
* setup: z.string().describe("The setup of the joke"),
|
|
231
|
+
* punchline: z.string().describe("The punchline to the joke"),
|
|
232
|
+
* rating: z.number().optional().describe("How funny the joke is, from 1 to 10")
|
|
233
|
+
* }).describe('Joke to tell user.');
|
|
234
|
+
*
|
|
235
|
+
* const structuredLlm = llm.withStructuredOutput(Joke, { name: "Joke" });
|
|
236
|
+
* const jokeResult = await structuredLlm.invoke("Tell me a joke about cats");
|
|
237
|
+
* console.log(jokeResult);
|
|
238
|
+
* ```
|
|
239
|
+
*
|
|
240
|
+
* ```txt
|
|
241
|
+
* {
|
|
242
|
+
* setup: 'What do you call a cat that loves to bowl?',
|
|
243
|
+
* punchline: 'An alley cat!'
|
|
244
|
+
* }
|
|
245
|
+
* ```
|
|
246
|
+
* </details>
|
|
247
|
+
*
|
|
248
|
+
* <br />
|
|
249
|
+
*
|
|
250
|
+
* <details>
|
|
251
|
+
* <summary><strong>Usage Metadata</strong></summary>
|
|
252
|
+
*
|
|
253
|
+
* ```typescript
|
|
254
|
+
* const aiMsgForMetadata = await llm.invoke(input);
|
|
255
|
+
* console.log(aiMsgForMetadata.usage_metadata);
|
|
256
|
+
* ```
|
|
257
|
+
*
|
|
258
|
+
* ```txt
|
|
259
|
+
* { input_tokens: 9, output_tokens: 8, total_tokens: 17 }
|
|
260
|
+
* ```
|
|
261
|
+
* </details>
|
|
262
|
+
*
|
|
263
|
+
* <br />
|
|
264
|
+
*
|
|
265
|
+
* <details>
|
|
266
|
+
* <summary><strong>Stream Usage Metadata</strong></summary>
|
|
267
|
+
*
|
|
268
|
+
* ```typescript
|
|
269
|
+
* const streamForMetadata = await llm.stream(
|
|
270
|
+
* input,
|
|
271
|
+
* {
|
|
272
|
+
* streamUsage: true
|
|
273
|
+
* }
|
|
274
|
+
* );
|
|
275
|
+
* let fullForMetadata: AIMessageChunk | undefined;
|
|
276
|
+
* for await (const chunk of streamForMetadata) {
|
|
277
|
+
* fullForMetadata = !fullForMetadata ? chunk : concat(fullForMetadata, chunk);
|
|
278
|
+
* }
|
|
279
|
+
* console.log(fullForMetadata?.usage_metadata);
|
|
280
|
+
* ```
|
|
281
|
+
*
|
|
282
|
+
* ```txt
|
|
283
|
+
* { input_tokens: 9, output_tokens: 8, total_tokens: 17 }
|
|
284
|
+
* ```
|
|
285
|
+
* </details>
|
|
286
|
+
*
|
|
287
|
+
* <br />
|
|
9
288
|
*/
|
|
10
289
|
export declare class ChatVertexAI extends ChatGoogle {
|
|
11
290
|
static lc_name(): string;
|
package/dist/chat_models.js
CHANGED
|
@@ -1,6 +1,285 @@
|
|
|
1
1
|
import { ChatGoogle } from "@langchain/google-gauth";
|
|
2
2
|
/**
|
|
3
|
-
* Integration with
|
|
3
|
+
* Integration with Google Vertex AI chat models.
|
|
4
|
+
*
|
|
5
|
+
* Setup:
|
|
6
|
+
* Install `@langchain/google-vertexai` and set your stringified
|
|
7
|
+
* Vertex AI credentials as an environment variable named `GOOGLE_APPLICATION_CREDENTIALS`.
|
|
8
|
+
*
|
|
9
|
+
* ```bash
|
|
10
|
+
* npm install @langchain/google-vertexai
|
|
11
|
+
* export GOOGLE_APPLICATION_CREDENTIALS="path/to/credentials"
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
* ## [Constructor args](https://api.js.langchain.com/classes/langchain_community_chat_models_googlevertexai_web.ChatGoogleVertexAI.html#constructor)
|
|
15
|
+
*
|
|
16
|
+
* ## [Runtime args](https://api.js.langchain.com/interfaces/langchain_google_common_types.GoogleAIBaseLanguageModelCallOptions.html)
|
|
17
|
+
*
|
|
18
|
+
* Runtime args can be passed as the second argument to any of the base runnable methods `.invoke`. `.stream`, `.batch`, etc.
|
|
19
|
+
* They can also be passed via `.bind`, or the second arg in `.bindTools`, like shown in the examples below:
|
|
20
|
+
*
|
|
21
|
+
* ```typescript
|
|
22
|
+
* // When calling `.bind`, call options should be passed via the first argument
|
|
23
|
+
* const llmWithArgsBound = llm.bind({
|
|
24
|
+
* stop: ["\n"],
|
|
25
|
+
* tools: [...],
|
|
26
|
+
* });
|
|
27
|
+
*
|
|
28
|
+
* // When calling `.bindTools`, call options should be passed via the second argument
|
|
29
|
+
* const llmWithTools = llm.bindTools(
|
|
30
|
+
* [...],
|
|
31
|
+
* {
|
|
32
|
+
* tool_choice: "auto",
|
|
33
|
+
* }
|
|
34
|
+
* );
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* ## Examples
|
|
38
|
+
*
|
|
39
|
+
* <details open>
|
|
40
|
+
* <summary><strong>Instantiate</strong></summary>
|
|
41
|
+
*
|
|
42
|
+
* ```typescript
|
|
43
|
+
* import { ChatVertexAI } from '@langchain/google-vertexai';
|
|
44
|
+
*
|
|
45
|
+
* const llm = new ChatVertexAI({
|
|
46
|
+
* model: "gemini-1.5-pro",
|
|
47
|
+
* temperature: 0,
|
|
48
|
+
* // other params...
|
|
49
|
+
* });
|
|
50
|
+
* ```
|
|
51
|
+
* </details>
|
|
52
|
+
*
|
|
53
|
+
* <br />
|
|
54
|
+
*
|
|
55
|
+
* <details>
|
|
56
|
+
* <summary><strong>Invoking</strong></summary>
|
|
57
|
+
*
|
|
58
|
+
* ```typescript
|
|
59
|
+
* const input = `Translate "I love programming" into French.`;
|
|
60
|
+
*
|
|
61
|
+
* // Models also accept a list of chat messages or a formatted prompt
|
|
62
|
+
* const result = await llm.invoke(input);
|
|
63
|
+
* console.log(result);
|
|
64
|
+
* ```
|
|
65
|
+
*
|
|
66
|
+
* ```txt
|
|
67
|
+
* AIMessageChunk {
|
|
68
|
+
* "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",
|
|
69
|
+
* "additional_kwargs": {},
|
|
70
|
+
* "response_metadata": {},
|
|
71
|
+
* "tool_calls": [],
|
|
72
|
+
* "tool_call_chunks": [],
|
|
73
|
+
* "invalid_tool_calls": [],
|
|
74
|
+
* "usage_metadata": {
|
|
75
|
+
* "input_tokens": 9,
|
|
76
|
+
* "output_tokens": 63,
|
|
77
|
+
* "total_tokens": 72
|
|
78
|
+
* }
|
|
79
|
+
* }
|
|
80
|
+
* ```
|
|
81
|
+
* </details>
|
|
82
|
+
*
|
|
83
|
+
* <br />
|
|
84
|
+
*
|
|
85
|
+
* <details>
|
|
86
|
+
* <summary><strong>Streaming Chunks</strong></summary>
|
|
87
|
+
*
|
|
88
|
+
* ```typescript
|
|
89
|
+
* for await (const chunk of await llm.stream(input)) {
|
|
90
|
+
* console.log(chunk);
|
|
91
|
+
* }
|
|
92
|
+
* ```
|
|
93
|
+
*
|
|
94
|
+
* ```txt
|
|
95
|
+
* AIMessageChunk {
|
|
96
|
+
* "content": "\"",
|
|
97
|
+
* "additional_kwargs": {},
|
|
98
|
+
* "response_metadata": {},
|
|
99
|
+
* "tool_calls": [],
|
|
100
|
+
* "tool_call_chunks": [],
|
|
101
|
+
* "invalid_tool_calls": []
|
|
102
|
+
* }
|
|
103
|
+
* AIMessageChunk {
|
|
104
|
+
* "content": "J'adore programmer\" \n",
|
|
105
|
+
* "additional_kwargs": {},
|
|
106
|
+
* "response_metadata": {},
|
|
107
|
+
* "tool_calls": [],
|
|
108
|
+
* "tool_call_chunks": [],
|
|
109
|
+
* "invalid_tool_calls": []
|
|
110
|
+
* }
|
|
111
|
+
* AIMessageChunk {
|
|
112
|
+
* "content": "",
|
|
113
|
+
* "additional_kwargs": {},
|
|
114
|
+
* "response_metadata": {},
|
|
115
|
+
* "tool_calls": [],
|
|
116
|
+
* "tool_call_chunks": [],
|
|
117
|
+
* "invalid_tool_calls": []
|
|
118
|
+
* }
|
|
119
|
+
* AIMessageChunk {
|
|
120
|
+
* "content": "",
|
|
121
|
+
* "additional_kwargs": {},
|
|
122
|
+
* "response_metadata": {
|
|
123
|
+
* "finishReason": "stop"
|
|
124
|
+
* },
|
|
125
|
+
* "tool_calls": [],
|
|
126
|
+
* "tool_call_chunks": [],
|
|
127
|
+
* "invalid_tool_calls": [],
|
|
128
|
+
* "usage_metadata": {
|
|
129
|
+
* "input_tokens": 9,
|
|
130
|
+
* "output_tokens": 8,
|
|
131
|
+
* "total_tokens": 17
|
|
132
|
+
* }
|
|
133
|
+
* }
|
|
134
|
+
* ```
|
|
135
|
+
* </details>
|
|
136
|
+
*
|
|
137
|
+
* <br />
|
|
138
|
+
*
|
|
139
|
+
* <details>
|
|
140
|
+
* <summary><strong>Aggregate Streamed Chunks</strong></summary>
|
|
141
|
+
*
|
|
142
|
+
* ```typescript
|
|
143
|
+
* import { AIMessageChunk } from '@langchain/core/messages';
|
|
144
|
+
* import { concat } from '@langchain/core/utils/stream';
|
|
145
|
+
*
|
|
146
|
+
* const stream = await llm.stream(input);
|
|
147
|
+
* let full: AIMessageChunk | undefined;
|
|
148
|
+
* for await (const chunk of stream) {
|
|
149
|
+
* full = !full ? chunk : concat(full, chunk);
|
|
150
|
+
* }
|
|
151
|
+
* console.log(full);
|
|
152
|
+
* ```
|
|
153
|
+
*
|
|
154
|
+
* ```txt
|
|
155
|
+
* AIMessageChunk {
|
|
156
|
+
* "content": "\"J'adore programmer\" \n",
|
|
157
|
+
* "additional_kwargs": {},
|
|
158
|
+
* "response_metadata": {
|
|
159
|
+
* "finishReason": "stop"
|
|
160
|
+
* },
|
|
161
|
+
* "tool_calls": [],
|
|
162
|
+
* "tool_call_chunks": [],
|
|
163
|
+
* "invalid_tool_calls": [],
|
|
164
|
+
* "usage_metadata": {
|
|
165
|
+
* "input_tokens": 9,
|
|
166
|
+
* "output_tokens": 8,
|
|
167
|
+
* "total_tokens": 17
|
|
168
|
+
* }
|
|
169
|
+
* }
|
|
170
|
+
* ```
|
|
171
|
+
* </details>
|
|
172
|
+
*
|
|
173
|
+
* <br />
|
|
174
|
+
*
|
|
175
|
+
* <details>
|
|
176
|
+
* <summary><strong>Bind tools</strong></summary>
|
|
177
|
+
*
|
|
178
|
+
* ```typescript
|
|
179
|
+
* import { z } from 'zod';
|
|
180
|
+
*
|
|
181
|
+
* const GetWeather = {
|
|
182
|
+
* name: "GetWeather",
|
|
183
|
+
* description: "Get the current weather in a given location",
|
|
184
|
+
* schema: z.object({
|
|
185
|
+
* location: z.string().describe("The city and state, e.g. San Francisco, CA")
|
|
186
|
+
* }),
|
|
187
|
+
* }
|
|
188
|
+
*
|
|
189
|
+
* const GetPopulation = {
|
|
190
|
+
* name: "GetPopulation",
|
|
191
|
+
* description: "Get the current population in a given location",
|
|
192
|
+
* schema: z.object({
|
|
193
|
+
* location: z.string().describe("The city and state, e.g. San Francisco, CA")
|
|
194
|
+
* }),
|
|
195
|
+
* }
|
|
196
|
+
*
|
|
197
|
+
* const llmWithTools = llm.bindTools([GetWeather, GetPopulation]);
|
|
198
|
+
* const aiMsg = await llmWithTools.invoke(
|
|
199
|
+
* "Which city is hotter today and which is bigger: LA or NY?"
|
|
200
|
+
* );
|
|
201
|
+
* console.log(aiMsg.tool_calls);
|
|
202
|
+
* ```
|
|
203
|
+
*
|
|
204
|
+
* ```txt
|
|
205
|
+
* [
|
|
206
|
+
* {
|
|
207
|
+
* name: 'GetPopulation',
|
|
208
|
+
* args: { location: 'New York City, NY' },
|
|
209
|
+
* id: '33c1c1f47e2f492799c77d2800a43912',
|
|
210
|
+
* type: 'tool_call'
|
|
211
|
+
* }
|
|
212
|
+
* ]
|
|
213
|
+
* ```
|
|
214
|
+
* </details>
|
|
215
|
+
*
|
|
216
|
+
* <br />
|
|
217
|
+
*
|
|
218
|
+
* <details>
|
|
219
|
+
* <summary><strong>Structured Output</strong></summary>
|
|
220
|
+
*
|
|
221
|
+
* ```typescript
|
|
222
|
+
* import { z } from 'zod';
|
|
223
|
+
*
|
|
224
|
+
* const Joke = z.object({
|
|
225
|
+
* setup: z.string().describe("The setup of the joke"),
|
|
226
|
+
* punchline: z.string().describe("The punchline to the joke"),
|
|
227
|
+
* rating: z.number().optional().describe("How funny the joke is, from 1 to 10")
|
|
228
|
+
* }).describe('Joke to tell user.');
|
|
229
|
+
*
|
|
230
|
+
* const structuredLlm = llm.withStructuredOutput(Joke, { name: "Joke" });
|
|
231
|
+
* const jokeResult = await structuredLlm.invoke("Tell me a joke about cats");
|
|
232
|
+
* console.log(jokeResult);
|
|
233
|
+
* ```
|
|
234
|
+
*
|
|
235
|
+
* ```txt
|
|
236
|
+
* {
|
|
237
|
+
* setup: 'What do you call a cat that loves to bowl?',
|
|
238
|
+
* punchline: 'An alley cat!'
|
|
239
|
+
* }
|
|
240
|
+
* ```
|
|
241
|
+
* </details>
|
|
242
|
+
*
|
|
243
|
+
* <br />
|
|
244
|
+
*
|
|
245
|
+
* <details>
|
|
246
|
+
* <summary><strong>Usage Metadata</strong></summary>
|
|
247
|
+
*
|
|
248
|
+
* ```typescript
|
|
249
|
+
* const aiMsgForMetadata = await llm.invoke(input);
|
|
250
|
+
* console.log(aiMsgForMetadata.usage_metadata);
|
|
251
|
+
* ```
|
|
252
|
+
*
|
|
253
|
+
* ```txt
|
|
254
|
+
* { input_tokens: 9, output_tokens: 8, total_tokens: 17 }
|
|
255
|
+
* ```
|
|
256
|
+
* </details>
|
|
257
|
+
*
|
|
258
|
+
* <br />
|
|
259
|
+
*
|
|
260
|
+
* <details>
|
|
261
|
+
* <summary><strong>Stream Usage Metadata</strong></summary>
|
|
262
|
+
*
|
|
263
|
+
* ```typescript
|
|
264
|
+
* const streamForMetadata = await llm.stream(
|
|
265
|
+
* input,
|
|
266
|
+
* {
|
|
267
|
+
* streamUsage: true
|
|
268
|
+
* }
|
|
269
|
+
* );
|
|
270
|
+
* let fullForMetadata: AIMessageChunk | undefined;
|
|
271
|
+
* for await (const chunk of streamForMetadata) {
|
|
272
|
+
* fullForMetadata = !fullForMetadata ? chunk : concat(fullForMetadata, chunk);
|
|
273
|
+
* }
|
|
274
|
+
* console.log(fullForMetadata?.usage_metadata);
|
|
275
|
+
* ```
|
|
276
|
+
*
|
|
277
|
+
* ```txt
|
|
278
|
+
* { input_tokens: 9, output_tokens: 8, total_tokens: 17 }
|
|
279
|
+
* ```
|
|
280
|
+
* </details>
|
|
281
|
+
*
|
|
282
|
+
* <br />
|
|
4
283
|
*/
|
|
5
284
|
export class ChatVertexAI extends ChatGoogle {
|
|
6
285
|
static lc_name() {
|
package/dist/embeddings.cjs
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.VertexAIEmbeddings = void 0;
|
|
4
4
|
const google_gauth_1 = require("@langchain/google-gauth");
|
|
5
5
|
/**
|
|
6
|
-
* Integration with a
|
|
6
|
+
* Integration with a Google Vertex AI embeddings model using
|
|
7
|
+
* the "@langchain/google-gauth" package for auth.
|
|
7
8
|
*/
|
|
8
|
-
class
|
|
9
|
+
class VertexAIEmbeddings extends google_gauth_1.GoogleEmbeddings {
|
|
9
10
|
static lc_name() {
|
|
10
|
-
return "
|
|
11
|
+
return "VertexAIEmbeddings";
|
|
11
12
|
}
|
|
12
13
|
constructor(fields) {
|
|
13
14
|
super({
|
|
@@ -16,4 +17,4 @@ class GoogleVertexAIEmbeddings extends google_gauth_1.GoogleEmbeddings {
|
|
|
16
17
|
});
|
|
17
18
|
}
|
|
18
19
|
}
|
|
19
|
-
exports.
|
|
20
|
+
exports.VertexAIEmbeddings = VertexAIEmbeddings;
|
package/dist/embeddings.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { type GoogleEmbeddingsInput, GoogleEmbeddings } from "@langchain/google-gauth";
|
|
2
2
|
/**
|
|
3
|
-
* Input to
|
|
3
|
+
* Input to a Google Vertex AI embeddings class.
|
|
4
4
|
*/
|
|
5
5
|
export interface GoogleVertexAIEmbeddingsInput extends GoogleEmbeddingsInput {
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
|
-
* Integration with a
|
|
8
|
+
* Integration with a Google Vertex AI embeddings model using
|
|
9
|
+
* the "@langchain/google-gauth" package for auth.
|
|
9
10
|
*/
|
|
10
|
-
export declare class
|
|
11
|
+
export declare class VertexAIEmbeddings extends GoogleEmbeddings {
|
|
11
12
|
static lc_name(): string;
|
|
12
13
|
constructor(fields: GoogleVertexAIEmbeddingsInput);
|
|
13
14
|
}
|
package/dist/embeddings.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { GoogleEmbeddings, } from "@langchain/google-gauth";
|
|
2
2
|
/**
|
|
3
|
-
* Integration with a
|
|
3
|
+
* Integration with a Google Vertex AI embeddings model using
|
|
4
|
+
* the "@langchain/google-gauth" package for auth.
|
|
4
5
|
*/
|
|
5
|
-
export class
|
|
6
|
+
export class VertexAIEmbeddings extends GoogleEmbeddings {
|
|
6
7
|
static lc_name() {
|
|
7
|
-
return "
|
|
8
|
+
return "VertexAIEmbeddings";
|
|
8
9
|
}
|
|
9
10
|
constructor(fields) {
|
|
10
11
|
super({
|
package/dist/llms.cjs
CHANGED
|
@@ -3,7 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.VertexAI = void 0;
|
|
4
4
|
const google_gauth_1 = require("@langchain/google-gauth");
|
|
5
5
|
/**
|
|
6
|
-
* Integration with a LLM
|
|
6
|
+
* Integration with a Google Vertex AI LLM using
|
|
7
|
+
* the "@langchain/google-gauth" package for auth.
|
|
7
8
|
*/
|
|
8
9
|
class VertexAI extends google_gauth_1.GoogleLLM {
|
|
9
10
|
static lc_name() {
|
package/dist/llms.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { type GoogleLLMInput, GoogleLLM } from "@langchain/google-gauth";
|
|
2
2
|
/**
|
|
3
|
-
* Input to LLM
|
|
3
|
+
* Input to a Google Vertex AI LLM class.
|
|
4
4
|
*/
|
|
5
5
|
export interface VertexAIInput extends GoogleLLMInput {
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
|
-
* Integration with a LLM
|
|
8
|
+
* Integration with a Google Vertex AI LLM using
|
|
9
|
+
* the "@langchain/google-gauth" package for auth.
|
|
9
10
|
*/
|
|
10
11
|
export declare class VertexAI extends GoogleLLM {
|
|
11
12
|
static lc_name(): string;
|
package/dist/llms.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@langchain/google-vertexai",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.26",
|
|
4
4
|
"description": "LangChain.js support for Google Vertex AI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"license": "MIT",
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@langchain/core": ">=0.2.21 <0.3.0",
|
|
47
|
-
"@langchain/google-gauth": "~0.0.
|
|
47
|
+
"@langchain/google-gauth": "~0.0.26"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@jest/globals": "^29.5.0",
|