langchain 0.3.29 → 0.3.30

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.
Files changed (110) hide show
  1. package/README.md +15 -12
  2. package/dist/agents/agent.cjs +1 -1
  3. package/dist/agents/agent.d.ts +1 -1
  4. package/dist/agents/agent.js +1 -1
  5. package/dist/agents/mrkl/index.cjs +1 -1
  6. package/dist/agents/mrkl/index.d.ts +1 -1
  7. package/dist/agents/mrkl/index.js +1 -1
  8. package/dist/agents/openai_functions/index.cjs +1 -0
  9. package/dist/agents/openai_functions/index.d.ts +1 -0
  10. package/dist/agents/openai_functions/index.js +1 -0
  11. package/dist/agents/openai_functions/output_parser.cjs +1 -1
  12. package/dist/agents/openai_functions/output_parser.d.ts +1 -1
  13. package/dist/agents/openai_functions/output_parser.js +1 -1
  14. package/dist/agents/openai_tools/index.cjs +1 -1
  15. package/dist/agents/openai_tools/index.d.ts +1 -1
  16. package/dist/agents/openai_tools/index.js +1 -1
  17. package/dist/agents/openai_tools/output_parser.cjs +1 -1
  18. package/dist/agents/openai_tools/output_parser.d.ts +1 -1
  19. package/dist/agents/openai_tools/output_parser.js +1 -1
  20. package/dist/agents/structured_chat/index.cjs +1 -1
  21. package/dist/agents/structured_chat/index.d.ts +1 -1
  22. package/dist/agents/structured_chat/index.js +1 -1
  23. package/dist/agents/structured_chat/outputParser.cjs +1 -1
  24. package/dist/agents/structured_chat/outputParser.d.ts +1 -1
  25. package/dist/agents/structured_chat/outputParser.js +1 -1
  26. package/dist/agents/toolkits/openapi/openapi.cjs +1 -1
  27. package/dist/agents/toolkits/openapi/openapi.d.ts +1 -1
  28. package/dist/agents/toolkits/openapi/openapi.js +1 -1
  29. package/dist/agents/toolkits/sql/sql.cjs +1 -1
  30. package/dist/agents/toolkits/sql/sql.d.ts +1 -1
  31. package/dist/agents/toolkits/sql/sql.js +1 -1
  32. package/dist/agents/toolkits/vectorstore/vectorstore.cjs +1 -1
  33. package/dist/agents/toolkits/vectorstore/vectorstore.d.ts +1 -1
  34. package/dist/agents/toolkits/vectorstore/vectorstore.js +1 -1
  35. package/dist/chains/analyze_documents_chain.cjs +1 -1
  36. package/dist/chains/analyze_documents_chain.d.ts +1 -1
  37. package/dist/chains/analyze_documents_chain.js +1 -1
  38. package/dist/chains/constitutional_ai/constitutional_principle.cjs +2 -2
  39. package/dist/chains/constitutional_ai/constitutional_principle.d.ts +2 -2
  40. package/dist/chains/constitutional_ai/constitutional_principle.js +2 -2
  41. package/dist/chains/conversation.cjs +1 -1
  42. package/dist/chains/conversation.d.ts +1 -1
  43. package/dist/chains/conversation.js +1 -1
  44. package/dist/chains/graph_qa/cypher.cjs +1 -1
  45. package/dist/chains/graph_qa/cypher.d.ts +1 -1
  46. package/dist/chains/graph_qa/cypher.js +1 -1
  47. package/dist/chains/history_aware_retriever.cjs +1 -1
  48. package/dist/chains/history_aware_retriever.d.ts +1 -1
  49. package/dist/chains/history_aware_retriever.js +1 -1
  50. package/dist/chains/llm_chain.cjs +1 -1
  51. package/dist/chains/llm_chain.d.ts +1 -1
  52. package/dist/chains/llm_chain.js +1 -1
  53. package/dist/chains/openai_functions/base.cjs +1 -1
  54. package/dist/chains/openai_functions/base.d.ts +1 -1
  55. package/dist/chains/openai_functions/base.js +1 -1
  56. package/dist/chains/openai_functions/structured_output.cjs +1 -1
  57. package/dist/chains/openai_functions/structured_output.js +1 -1
  58. package/dist/chains/retrieval.cjs +1 -1
  59. package/dist/chains/retrieval.d.ts +1 -1
  60. package/dist/chains/retrieval.js +1 -1
  61. package/dist/chains/router/multi_prompt.cjs +16 -13
  62. package/dist/chains/router/multi_prompt.d.ts +16 -13
  63. package/dist/chains/router/multi_prompt.js +16 -13
  64. package/dist/chains/router/multi_retrieval_qa.cjs +1 -1
  65. package/dist/chains/router/multi_retrieval_qa.d.ts +1 -1
  66. package/dist/chains/router/multi_retrieval_qa.js +1 -1
  67. package/dist/chains/sequential_chain.cjs +2 -2
  68. package/dist/chains/sequential_chain.d.ts +2 -2
  69. package/dist/chains/sequential_chain.js +2 -2
  70. package/dist/chains/sql_db/sql_db_chain.cjs +1 -1
  71. package/dist/chains/sql_db/sql_db_chain.d.ts +1 -1
  72. package/dist/chains/sql_db/sql_db_chain.js +1 -1
  73. package/dist/document_transformers/openai_functions.cjs +1 -1
  74. package/dist/document_transformers/openai_functions.js +1 -1
  75. package/dist/evaluation/loader.cjs +1 -1
  76. package/dist/evaluation/loader.js +1 -1
  77. package/dist/experimental/autogpt/agent.cjs +1 -1
  78. package/dist/experimental/autogpt/agent.d.ts +1 -1
  79. package/dist/experimental/autogpt/agent.js +1 -1
  80. package/dist/experimental/generative_agents/generative_agent.cjs +1 -1
  81. package/dist/experimental/generative_agents/generative_agent.d.ts +1 -1
  82. package/dist/experimental/generative_agents/generative_agent.js +1 -1
  83. package/dist/memory/buffer_memory.cjs +1 -1
  84. package/dist/memory/buffer_memory.d.ts +1 -1
  85. package/dist/memory/buffer_memory.js +1 -1
  86. package/dist/memory/buffer_token_memory.cjs +1 -1
  87. package/dist/memory/buffer_token_memory.d.ts +1 -1
  88. package/dist/memory/buffer_token_memory.js +1 -1
  89. package/dist/memory/buffer_window_memory.cjs +1 -1
  90. package/dist/memory/buffer_window_memory.d.ts +1 -1
  91. package/dist/memory/buffer_window_memory.js +1 -1
  92. package/dist/memory/entity_memory.cjs +2 -2
  93. package/dist/memory/entity_memory.d.ts +2 -2
  94. package/dist/memory/entity_memory.js +2 -2
  95. package/dist/memory/summary.cjs +2 -2
  96. package/dist/memory/summary.d.ts +2 -2
  97. package/dist/memory/summary.js +2 -2
  98. package/dist/memory/summary_buffer.cjs +2 -2
  99. package/dist/memory/summary_buffer.d.ts +2 -2
  100. package/dist/memory/summary_buffer.js +2 -2
  101. package/dist/retrievers/hyde.cjs +1 -1
  102. package/dist/retrievers/hyde.d.ts +1 -1
  103. package/dist/retrievers/hyde.js +1 -1
  104. package/dist/retrievers/self_query/index.cjs +1 -1
  105. package/dist/retrievers/self_query/index.d.ts +1 -1
  106. package/dist/retrievers/self_query/index.js +1 -1
  107. package/dist/tools/webbrowser.cjs +1 -1
  108. package/dist/tools/webbrowser.d.ts +1 -1
  109. package/dist/tools/webbrowser.js +1 -1
  110. package/package.json +4 -4
@@ -10,7 +10,7 @@ import { BaseConversationSummaryMemory, } from "./summary.js";
10
10
  * ```typescript
11
11
  * // Initialize the memory with a specific model and token limit
12
12
  * const memory = new ConversationSummaryBufferMemory({
13
- * llm: new ChatOpenAI({ modelName: "gpt-3.5-turbo-instruct", temperature: 0 }),
13
+ * llm: new ChatOpenAI({ model: "gpt-3.5-turbo-instruct", temperature: 0 }),
14
14
  * maxTokenLimit: 10,
15
15
  * });
16
16
  *
@@ -33,7 +33,7 @@ import { BaseConversationSummaryMemory, } from "./summary.js";
33
33
  *
34
34
  * // Initialize the conversation chain with the model, memory, and prompt
35
35
  * const chain = new ConversationChain({
36
- * llm: new ChatOpenAI({ temperature: 0.9, verbose: true }),
36
+ * llm: new ChatOpenAI({ model: "gpt-4o-mini", temperature: 0.9, verbose: true }),
37
37
  * memory: memory,
38
38
  * prompt: chatPrompt,
39
39
  * });
@@ -14,7 +14,7 @@ const vectorstores_1 = require("@langchain/core/vectorstores");
14
14
  * ```typescript
15
15
  * const retriever = new HydeRetriever({
16
16
  * vectorStore: new MemoryVectorStore(new OpenAIEmbeddings()),
17
- * llm: new ChatOpenAI(),
17
+ * llm: new ChatOpenAI({ model: "gpt-4o-mini" }),
18
18
  * k: 1,
19
19
  * });
20
20
  * await vectorStore.addDocuments(
@@ -25,7 +25,7 @@ export type HydeRetrieverOptions<V extends VectorStore> = VectorStoreRetrieverIn
25
25
  * ```typescript
26
26
  * const retriever = new HydeRetriever({
27
27
  * vectorStore: new MemoryVectorStore(new OpenAIEmbeddings()),
28
- * llm: new ChatOpenAI(),
28
+ * llm: new ChatOpenAI({ model: "gpt-4o-mini" }),
29
29
  * k: 1,
30
30
  * });
31
31
  * await vectorStore.addDocuments(
@@ -10,7 +10,7 @@ import { VectorStoreRetriever, } from "@langchain/core/vectorstores";
10
10
  * ```typescript
11
11
  * const retriever = new HydeRetriever({
12
12
  * vectorStore: new MemoryVectorStore(new OpenAIEmbeddings()),
13
- * llm: new ChatOpenAI(),
13
+ * llm: new ChatOpenAI({ model: "gpt-4o-mini" }),
14
14
  * k: 1,
15
15
  * });
16
16
  * await vectorStore.addDocuments(
@@ -14,7 +14,7 @@ const index_js_1 = require("../../chains/query_constructor/index.cjs");
14
14
  * @example
15
15
  * ```typescript
16
16
  * const selfQueryRetriever = SelfQueryRetriever.fromLLM({
17
- * llm: new ChatOpenAI(),
17
+ * llm: new ChatOpenAI({ model: "gpt-4o-mini" }),
18
18
  * vectorStore: await HNSWLib.fromDocuments(docs, new OpenAIEmbeddings()),
19
19
  * documentContents: "Brief summary of a movie",
20
20
  * attributeInfo: attributeInfo,
@@ -32,7 +32,7 @@ export interface SelfQueryRetrieverArgs<T extends VectorStore> extends BaseRetri
32
32
  * @example
33
33
  * ```typescript
34
34
  * const selfQueryRetriever = SelfQueryRetriever.fromLLM({
35
- * llm: new ChatOpenAI(),
35
+ * llm: new ChatOpenAI({ model: "gpt-4o-mini" }),
36
36
  * vectorStore: await HNSWLib.fromDocuments(docs, new OpenAIEmbeddings()),
37
37
  * documentContents: "Brief summary of a movie",
38
38
  * attributeInfo: attributeInfo,
@@ -9,7 +9,7 @@ export { BaseTranslator, BasicTranslator, FunctionalTranslator };
9
9
  * @example
10
10
  * ```typescript
11
11
  * const selfQueryRetriever = SelfQueryRetriever.fromLLM({
12
- * llm: new ChatOpenAI(),
12
+ * llm: new ChatOpenAI({ model: "gpt-4o-mini" }),
13
13
  * vectorStore: await HNSWLib.fromDocuments(docs, new OpenAIEmbeddings()),
14
14
  * documentContents: "Brief summary of a movie",
15
15
  * attributeInfo: attributeInfo,
@@ -154,7 +154,7 @@ const DEFAULT_HEADERS = {
154
154
  * @example
155
155
  * ```typescript
156
156
  * const browser = new WebBrowser({
157
- * model: new ChatOpenAI({ temperature: 0 }),
157
+ * model: new ChatOpenAI({ model: "gpt-4o-mini", temperature: 0 }),
158
158
  * embeddings: new OpenAIEmbeddings({}),
159
159
  * });
160
160
  * const result = await browser.invoke("https:exampleurl.com");
@@ -30,7 +30,7 @@ export interface WebBrowserArgs extends ToolParams {
30
30
  * @example
31
31
  * ```typescript
32
32
  * const browser = new WebBrowser({
33
- * model: new ChatOpenAI({ temperature: 0 }),
33
+ * model: new ChatOpenAI({ model: "gpt-4o-mini", temperature: 0 }),
34
34
  * embeddings: new OpenAIEmbeddings({}),
35
35
  * });
36
36
  * const result = await browser.invoke("https:exampleurl.com");
@@ -113,7 +113,7 @@ const DEFAULT_HEADERS = {
113
113
  * @example
114
114
  * ```typescript
115
115
  * const browser = new WebBrowser({
116
- * model: new ChatOpenAI({ temperature: 0 }),
116
+ * model: new ChatOpenAI({ model: "gpt-4o-mini", temperature: 0 }),
117
117
  * embeddings: new OpenAIEmbeddings({}),
118
118
  * });
119
119
  * const result = await browser.invoke("https:exampleurl.com");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "langchain",
3
- "version": "0.3.29",
3
+ "version": "0.3.30",
4
4
  "description": "Typescript bindings for langchain",
5
5
  "type": "module",
6
6
  "engines": {
@@ -419,7 +419,7 @@
419
419
  "@langchain/aws": "*",
420
420
  "@langchain/cerebras": "*",
421
421
  "@langchain/cohere": "*",
422
- "@langchain/core": "workspace:*",
422
+ "@langchain/core": "0.3.62",
423
423
  "@langchain/deepseek": "*",
424
424
  "@langchain/google-genai": "*",
425
425
  "@langchain/google-vertexai": "*",
@@ -540,7 +540,7 @@
540
540
  }
541
541
  },
542
542
  "dependencies": {
543
- "@langchain/openai": ">=0.1.0 <0.6.0",
543
+ "@langchain/openai": ">=0.1.0 <0.7.0",
544
544
  "@langchain/textsplitters": ">=0.0.0 <0.2.0",
545
545
  "js-tiktoken": "^1.0.12",
546
546
  "js-yaml": "^4.1.0",
@@ -1418,4 +1418,4 @@
1418
1418
  },
1419
1419
  "./package.json": "./package.json"
1420
1420
  }
1421
- }
1421
+ }