langchain 0.3.19 → 0.3.20

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/hub/base.cjs CHANGED
@@ -74,7 +74,10 @@ modelClass) {
74
74
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
75
75
  const modelLcName = modelClass?.lc_name();
76
76
  let importMapKey;
77
- if (modelLcName === "ChatAnthropic") {
77
+ if (modelLcName === "ChatOpenAI") {
78
+ importMapKey = "chat_models__openai";
79
+ }
80
+ else if (modelLcName === "ChatAnthropic") {
78
81
  importMapKey = "chat_models__anthropic";
79
82
  }
80
83
  else if (modelLcName === "ChatAzureOpenAI") {
@@ -99,7 +102,7 @@ modelClass) {
99
102
  importMapKey = "chat_models__groq";
100
103
  }
101
104
  else {
102
- throw new Error("Received unsupport model class when pulling prompt.");
105
+ throw new Error("Received unsupported model class when pulling prompt.");
103
106
  }
104
107
  modelImportMap[importMapKey] = {
105
108
  ...modelImportMap[importMapKey],
package/dist/hub/base.js CHANGED
@@ -69,7 +69,10 @@ modelClass) {
69
69
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
70
70
  const modelLcName = modelClass?.lc_name();
71
71
  let importMapKey;
72
- if (modelLcName === "ChatAnthropic") {
72
+ if (modelLcName === "ChatOpenAI") {
73
+ importMapKey = "chat_models__openai";
74
+ }
75
+ else if (modelLcName === "ChatAnthropic") {
73
76
  importMapKey = "chat_models__anthropic";
74
77
  }
75
78
  else if (modelLcName === "ChatAzureOpenAI") {
@@ -94,7 +97,7 @@ modelClass) {
94
97
  importMapKey = "chat_models__groq";
95
98
  }
96
99
  else {
97
- throw new Error("Received unsupport model class when pulling prompt.");
100
+ throw new Error("Received unsupported model class when pulling prompt.");
98
101
  }
99
102
  modelImportMap[importMapKey] = {
100
103
  ...modelImportMap[importMapKey],
package/dist/hub/node.cjs CHANGED
@@ -20,7 +20,10 @@ async function pull(ownerRepoCommit, options) {
20
20
  if (options?.includeModel) {
21
21
  if (Array.isArray(promptObject.manifest.kwargs?.last?.kwargs?.bound?.id)) {
22
22
  const modelName = promptObject.manifest.kwargs?.last?.kwargs?.bound?.id.at(-1);
23
- if (modelName === "ChatAnthropic") {
23
+ if (modelName === "ChatOpenAI") {
24
+ modelClass = (await import("@langchain/openai")).ChatOpenAI;
25
+ }
26
+ else if (modelName === "ChatAnthropic") {
24
27
  modelClass = (await import("@langchain/anthropic")).ChatAnthropic;
25
28
  }
26
29
  else if (modelName === "ChatAzureOpenAI") {
package/dist/hub/node.js CHANGED
@@ -18,7 +18,10 @@ export async function pull(ownerRepoCommit, options) {
18
18
  if (options?.includeModel) {
19
19
  if (Array.isArray(promptObject.manifest.kwargs?.last?.kwargs?.bound?.id)) {
20
20
  const modelName = promptObject.manifest.kwargs?.last?.kwargs?.bound?.id.at(-1);
21
- if (modelName === "ChatAnthropic") {
21
+ if (modelName === "ChatOpenAI") {
22
+ modelClass = (await import("@langchain/openai")).ChatOpenAI;
23
+ }
24
+ else if (modelName === "ChatAnthropic") {
22
25
  modelClass = (await import("@langchain/anthropic")).ChatAnthropic;
23
26
  }
24
27
  else if (modelName === "ChatAzureOpenAI") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "langchain",
3
- "version": "0.3.19",
3
+ "version": "0.3.20",
4
4
  "description": "Typescript bindings for langchain",
5
5
  "type": "module",
6
6
  "engines": {
@@ -457,6 +457,7 @@
457
457
  "openai": "^4.41.1",
458
458
  "peggy": "^3.0.2",
459
459
  "prettier": "^2.8.3",
460
+ "reflect-metadata": "^0.2.2",
460
461
  "release-it": "^17.6.0",
461
462
  "rimraf": "^5.0.1",
462
463
  "rollup": "^3.19.1",
@@ -539,7 +540,7 @@
539
540
  }
540
541
  },
541
542
  "dependencies": {
542
- "@langchain/openai": ">=0.1.0 <0.5.0",
543
+ "@langchain/openai": ">=0.1.0 <0.6.0",
543
544
  "@langchain/textsplitters": ">=0.0.0 <0.2.0",
544
545
  "js-tiktoken": "^1.0.12",
545
546
  "js-yaml": "^4.1.0",