langchain 0.3.9 → 0.3.11
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.
|
@@ -10,6 +10,8 @@ const _SUPPORTED_PROVIDERS = [
|
|
|
10
10
|
"azure_openai",
|
|
11
11
|
"cohere",
|
|
12
12
|
"google-vertexai",
|
|
13
|
+
"google-vertexai-web",
|
|
14
|
+
"google-genai",
|
|
13
15
|
"google-genai",
|
|
14
16
|
"ollama",
|
|
15
17
|
"together",
|
|
@@ -48,6 +50,10 @@ params = {}) {
|
|
|
48
50
|
const { ChatVertexAI } = await import("@langchain/google-vertexai");
|
|
49
51
|
return new ChatVertexAI({ model, ...passedParams });
|
|
50
52
|
}
|
|
53
|
+
case "google-vertexai-web": {
|
|
54
|
+
const { ChatVertexAI } = await import("@langchain/google-vertexai-web");
|
|
55
|
+
return new ChatVertexAI({ model, ...passedParams });
|
|
56
|
+
}
|
|
51
57
|
case "google-genai": {
|
|
52
58
|
const { ChatGoogleGenerativeAI } = await import("@langchain/google-genai");
|
|
53
59
|
return new ChatGoogleGenerativeAI({ model, ...passedParams });
|
|
@@ -378,6 +384,7 @@ class _ConfigurableModel extends chat_models_1.BaseChatModel {
|
|
|
378
384
|
* - anthropic (@langchain/anthropic)
|
|
379
385
|
* - azure_openai (@langchain/openai)
|
|
380
386
|
* - google-vertexai (@langchain/google-vertexai)
|
|
387
|
+
* - google-vertexai-web (@langchain/google-vertexai-web)
|
|
381
388
|
* - google-genai (@langchain/google-genai)
|
|
382
389
|
* - bedrock (@langchain/aws)
|
|
383
390
|
* - cohere (@langchain/cohere)
|
|
@@ -9,7 +9,7 @@ import { CallbackManagerForLLMRun } from "@langchain/core/callbacks/manager";
|
|
|
9
9
|
import { ChatResult } from "@langchain/core/outputs";
|
|
10
10
|
interface EventStreamCallbackHandlerInput extends Omit<LogStreamCallbackHandlerInput, "_schemaFormat"> {
|
|
11
11
|
}
|
|
12
|
-
declare const _SUPPORTED_PROVIDERS: readonly ["openai", "anthropic", "azure_openai", "cohere", "google-vertexai", "google-genai", "ollama", "together", "fireworks", "mistralai", "groq", "bedrock"];
|
|
12
|
+
declare const _SUPPORTED_PROVIDERS: readonly ["openai", "anthropic", "azure_openai", "cohere", "google-vertexai", "google-vertexai-web", "google-genai", "google-genai", "ollama", "together", "fireworks", "mistralai", "groq", "bedrock"];
|
|
13
13
|
export type ChatModelProvider = (typeof _SUPPORTED_PROVIDERS)[number];
|
|
14
14
|
export interface ConfigurableChatModelCallOptions extends BaseChatModelCallOptions {
|
|
15
15
|
tools?: (StructuredToolInterface | Record<string, unknown> | ToolDefinition | RunnableToolLike)[];
|
|
@@ -7,6 +7,8 @@ const _SUPPORTED_PROVIDERS = [
|
|
|
7
7
|
"azure_openai",
|
|
8
8
|
"cohere",
|
|
9
9
|
"google-vertexai",
|
|
10
|
+
"google-vertexai-web",
|
|
11
|
+
"google-genai",
|
|
10
12
|
"google-genai",
|
|
11
13
|
"ollama",
|
|
12
14
|
"together",
|
|
@@ -45,6 +47,10 @@ params = {}) {
|
|
|
45
47
|
const { ChatVertexAI } = await import("@langchain/google-vertexai");
|
|
46
48
|
return new ChatVertexAI({ model, ...passedParams });
|
|
47
49
|
}
|
|
50
|
+
case "google-vertexai-web": {
|
|
51
|
+
const { ChatVertexAI } = await import("@langchain/google-vertexai-web");
|
|
52
|
+
return new ChatVertexAI({ model, ...passedParams });
|
|
53
|
+
}
|
|
48
54
|
case "google-genai": {
|
|
49
55
|
const { ChatGoogleGenerativeAI } = await import("@langchain/google-genai");
|
|
50
56
|
return new ChatGoogleGenerativeAI({ model, ...passedParams });
|
|
@@ -374,6 +380,7 @@ class _ConfigurableModel extends BaseChatModel {
|
|
|
374
380
|
* - anthropic (@langchain/anthropic)
|
|
375
381
|
* - azure_openai (@langchain/openai)
|
|
376
382
|
* - google-vertexai (@langchain/google-vertexai)
|
|
383
|
+
* - google-vertexai-web (@langchain/google-vertexai-web)
|
|
377
384
|
* - google-genai (@langchain/google-genai)
|
|
378
385
|
* - bedrock (@langchain/aws)
|
|
379
386
|
* - cohere (@langchain/cohere)
|
package/dist/hub.cjs
CHANGED
|
@@ -32,9 +32,21 @@ exports.push = push;
|
|
|
32
32
|
*/
|
|
33
33
|
async function pull(ownerRepoCommit, options) {
|
|
34
34
|
const client = new langsmith_1.Client(options);
|
|
35
|
-
const
|
|
35
|
+
const promptObject = await client.pullPromptCommit(ownerRepoCommit, {
|
|
36
36
|
includeModel: options?.includeModel,
|
|
37
37
|
});
|
|
38
|
-
|
|
38
|
+
if (promptObject.manifest.kwargs?.metadata === undefined) {
|
|
39
|
+
promptObject.manifest.kwargs = {
|
|
40
|
+
...promptObject.manifest.kwargs,
|
|
41
|
+
metadata: {},
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
promptObject.manifest.kwargs.metadata = {
|
|
45
|
+
...promptObject.manifest.kwargs.metadata,
|
|
46
|
+
lc_hub_owner: promptObject.owner,
|
|
47
|
+
lc_hub_repo: promptObject.repo,
|
|
48
|
+
lc_hub_commit_hash: promptObject.commit_hash,
|
|
49
|
+
};
|
|
50
|
+
return (0, index_js_1.load)(JSON.stringify(promptObject.manifest));
|
|
39
51
|
}
|
|
40
52
|
exports.pull = pull;
|
package/dist/hub.js
CHANGED
|
@@ -28,8 +28,20 @@ export async function push(repoFullName, runnable, options) {
|
|
|
28
28
|
*/
|
|
29
29
|
export async function pull(ownerRepoCommit, options) {
|
|
30
30
|
const client = new Client(options);
|
|
31
|
-
const
|
|
31
|
+
const promptObject = await client.pullPromptCommit(ownerRepoCommit, {
|
|
32
32
|
includeModel: options?.includeModel,
|
|
33
33
|
});
|
|
34
|
-
|
|
34
|
+
if (promptObject.manifest.kwargs?.metadata === undefined) {
|
|
35
|
+
promptObject.manifest.kwargs = {
|
|
36
|
+
...promptObject.manifest.kwargs,
|
|
37
|
+
metadata: {},
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
promptObject.manifest.kwargs.metadata = {
|
|
41
|
+
...promptObject.manifest.kwargs.metadata,
|
|
42
|
+
lc_hub_owner: promptObject.owner,
|
|
43
|
+
lc_hub_repo: promptObject.repo,
|
|
44
|
+
lc_hub_commit_hash: promptObject.commit_hash,
|
|
45
|
+
};
|
|
46
|
+
return load(JSON.stringify(promptObject.manifest));
|
|
35
47
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "langchain",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.11",
|
|
4
4
|
"description": "Typescript bindings for langchain",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -418,6 +418,7 @@
|
|
|
418
418
|
"@langchain/core": "workspace:*",
|
|
419
419
|
"@langchain/google-genai": "*",
|
|
420
420
|
"@langchain/google-vertexai": "*",
|
|
421
|
+
"@langchain/google-vertexai-web": "*",
|
|
421
422
|
"@langchain/groq": "*",
|
|
422
423
|
"@langchain/mistralai": "*",
|
|
423
424
|
"@langchain/ollama": "*",
|
|
@@ -466,6 +467,7 @@
|
|
|
466
467
|
"@langchain/core": ">=0.2.21 <0.4.0",
|
|
467
468
|
"@langchain/google-genai": "*",
|
|
468
469
|
"@langchain/google-vertexai": "*",
|
|
470
|
+
"@langchain/google-vertexai-web": "*",
|
|
469
471
|
"@langchain/groq": "*",
|
|
470
472
|
"@langchain/mistralai": "*",
|
|
471
473
|
"@langchain/ollama": "*",
|
|
@@ -494,6 +496,9 @@
|
|
|
494
496
|
"@langchain/google-vertexai": {
|
|
495
497
|
"optional": true
|
|
496
498
|
},
|
|
499
|
+
"@langchain/google-vertexai-web": {
|
|
500
|
+
"optional": true
|
|
501
|
+
},
|
|
497
502
|
"@langchain/groq": {
|
|
498
503
|
"optional": true
|
|
499
504
|
},
|