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.
- package/README.md +15 -12
- package/dist/agents/agent.cjs +1 -1
- package/dist/agents/agent.d.ts +1 -1
- package/dist/agents/agent.js +1 -1
- package/dist/agents/mrkl/index.cjs +1 -1
- package/dist/agents/mrkl/index.d.ts +1 -1
- package/dist/agents/mrkl/index.js +1 -1
- package/dist/agents/openai_functions/index.cjs +1 -0
- package/dist/agents/openai_functions/index.d.ts +1 -0
- package/dist/agents/openai_functions/index.js +1 -0
- package/dist/agents/openai_functions/output_parser.cjs +1 -1
- package/dist/agents/openai_functions/output_parser.d.ts +1 -1
- package/dist/agents/openai_functions/output_parser.js +1 -1
- package/dist/agents/openai_tools/index.cjs +1 -1
- package/dist/agents/openai_tools/index.d.ts +1 -1
- package/dist/agents/openai_tools/index.js +1 -1
- package/dist/agents/openai_tools/output_parser.cjs +1 -1
- package/dist/agents/openai_tools/output_parser.d.ts +1 -1
- package/dist/agents/openai_tools/output_parser.js +1 -1
- package/dist/agents/structured_chat/index.cjs +1 -1
- package/dist/agents/structured_chat/index.d.ts +1 -1
- package/dist/agents/structured_chat/index.js +1 -1
- package/dist/agents/structured_chat/outputParser.cjs +1 -1
- package/dist/agents/structured_chat/outputParser.d.ts +1 -1
- package/dist/agents/structured_chat/outputParser.js +1 -1
- package/dist/agents/toolkits/openapi/openapi.cjs +1 -1
- package/dist/agents/toolkits/openapi/openapi.d.ts +1 -1
- package/dist/agents/toolkits/openapi/openapi.js +1 -1
- package/dist/agents/toolkits/sql/sql.cjs +1 -1
- package/dist/agents/toolkits/sql/sql.d.ts +1 -1
- package/dist/agents/toolkits/sql/sql.js +1 -1
- package/dist/agents/toolkits/vectorstore/vectorstore.cjs +1 -1
- package/dist/agents/toolkits/vectorstore/vectorstore.d.ts +1 -1
- package/dist/agents/toolkits/vectorstore/vectorstore.js +1 -1
- package/dist/chains/analyze_documents_chain.cjs +1 -1
- package/dist/chains/analyze_documents_chain.d.ts +1 -1
- package/dist/chains/analyze_documents_chain.js +1 -1
- package/dist/chains/constitutional_ai/constitutional_principle.cjs +2 -2
- package/dist/chains/constitutional_ai/constitutional_principle.d.ts +2 -2
- package/dist/chains/constitutional_ai/constitutional_principle.js +2 -2
- package/dist/chains/conversation.cjs +1 -1
- package/dist/chains/conversation.d.ts +1 -1
- package/dist/chains/conversation.js +1 -1
- package/dist/chains/graph_qa/cypher.cjs +1 -1
- package/dist/chains/graph_qa/cypher.d.ts +1 -1
- package/dist/chains/graph_qa/cypher.js +1 -1
- package/dist/chains/history_aware_retriever.cjs +1 -1
- package/dist/chains/history_aware_retriever.d.ts +1 -1
- package/dist/chains/history_aware_retriever.js +1 -1
- package/dist/chains/llm_chain.cjs +1 -1
- package/dist/chains/llm_chain.d.ts +1 -1
- package/dist/chains/llm_chain.js +1 -1
- package/dist/chains/openai_functions/base.cjs +1 -1
- package/dist/chains/openai_functions/base.d.ts +1 -1
- package/dist/chains/openai_functions/base.js +1 -1
- package/dist/chains/openai_functions/structured_output.cjs +1 -1
- package/dist/chains/openai_functions/structured_output.js +1 -1
- package/dist/chains/retrieval.cjs +1 -1
- package/dist/chains/retrieval.d.ts +1 -1
- package/dist/chains/retrieval.js +1 -1
- package/dist/chains/router/multi_prompt.cjs +16 -13
- package/dist/chains/router/multi_prompt.d.ts +16 -13
- package/dist/chains/router/multi_prompt.js +16 -13
- package/dist/chains/router/multi_retrieval_qa.cjs +1 -1
- package/dist/chains/router/multi_retrieval_qa.d.ts +1 -1
- package/dist/chains/router/multi_retrieval_qa.js +1 -1
- package/dist/chains/sequential_chain.cjs +2 -2
- package/dist/chains/sequential_chain.d.ts +2 -2
- package/dist/chains/sequential_chain.js +2 -2
- package/dist/chains/sql_db/sql_db_chain.cjs +1 -1
- package/dist/chains/sql_db/sql_db_chain.d.ts +1 -1
- package/dist/chains/sql_db/sql_db_chain.js +1 -1
- package/dist/document_transformers/openai_functions.cjs +1 -1
- package/dist/document_transformers/openai_functions.js +1 -1
- package/dist/evaluation/loader.cjs +1 -1
- package/dist/evaluation/loader.js +1 -1
- package/dist/experimental/autogpt/agent.cjs +1 -1
- package/dist/experimental/autogpt/agent.d.ts +1 -1
- package/dist/experimental/autogpt/agent.js +1 -1
- package/dist/experimental/generative_agents/generative_agent.cjs +1 -1
- package/dist/experimental/generative_agents/generative_agent.d.ts +1 -1
- package/dist/experimental/generative_agents/generative_agent.js +1 -1
- package/dist/memory/buffer_memory.cjs +1 -1
- package/dist/memory/buffer_memory.d.ts +1 -1
- package/dist/memory/buffer_memory.js +1 -1
- package/dist/memory/buffer_token_memory.cjs +1 -1
- package/dist/memory/buffer_token_memory.d.ts +1 -1
- package/dist/memory/buffer_token_memory.js +1 -1
- package/dist/memory/buffer_window_memory.cjs +1 -1
- package/dist/memory/buffer_window_memory.d.ts +1 -1
- package/dist/memory/buffer_window_memory.js +1 -1
- package/dist/memory/entity_memory.cjs +2 -2
- package/dist/memory/entity_memory.d.ts +2 -2
- package/dist/memory/entity_memory.js +2 -2
- package/dist/memory/summary.cjs +2 -2
- package/dist/memory/summary.d.ts +2 -2
- package/dist/memory/summary.js +2 -2
- package/dist/memory/summary_buffer.cjs +2 -2
- package/dist/memory/summary_buffer.d.ts +2 -2
- package/dist/memory/summary_buffer.js +2 -2
- package/dist/retrievers/hyde.cjs +1 -1
- package/dist/retrievers/hyde.d.ts +1 -1
- package/dist/retrievers/hyde.js +1 -1
- package/dist/retrievers/self_query/index.cjs +1 -1
- package/dist/retrievers/self_query/index.d.ts +1 -1
- package/dist/retrievers/self_query/index.js +1 -1
- package/dist/tools/webbrowser.cjs +1 -1
- package/dist/tools/webbrowser.d.ts +1 -1
- package/dist/tools/webbrowser.js +1 -1
- 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({
|
|
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
|
* });
|
package/dist/retrievers/hyde.cjs
CHANGED
|
@@ -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(
|
package/dist/retrievers/hyde.js
CHANGED
|
@@ -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");
|
package/dist/tools/webbrowser.js
CHANGED
|
@@ -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.
|
|
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": "
|
|
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.
|
|
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
|
+
}
|