langchain 0.0.209 → 0.0.210

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 (114) hide show
  1. package/dist/agents/agent.d.ts +8 -8
  2. package/dist/agents/chat/index.cjs +1 -1
  3. package/dist/agents/chat/index.d.ts +7 -7
  4. package/dist/agents/chat/index.js +1 -1
  5. package/dist/agents/chat_convo/index.d.ts +6 -6
  6. package/dist/agents/chat_convo/outputParser.cjs +3 -3
  7. package/dist/agents/chat_convo/outputParser.d.ts +5 -5
  8. package/dist/agents/chat_convo/outputParser.js +3 -3
  9. package/dist/agents/executor.cjs +6 -6
  10. package/dist/agents/executor.d.ts +5 -5
  11. package/dist/agents/executor.js +1 -1
  12. package/dist/agents/helpers.d.ts +3 -3
  13. package/dist/agents/initialize.d.ts +5 -5
  14. package/dist/agents/load.d.ts +4 -4
  15. package/dist/agents/mrkl/index.d.ts +8 -8
  16. package/dist/agents/openai/index.d.ts +6 -6
  17. package/dist/agents/structured_chat/index.d.ts +6 -6
  18. package/dist/agents/structured_chat/outputParser.d.ts +2 -2
  19. package/dist/agents/toolkits/aws_sfn.d.ts +2 -2
  20. package/dist/agents/toolkits/conversational_retrieval/openai_functions.d.ts +2 -2
  21. package/dist/agents/toolkits/conversational_retrieval/tool.d.ts +2 -2
  22. package/dist/agents/toolkits/json/json.d.ts +4 -4
  23. package/dist/agents/toolkits/openapi/openapi.d.ts +5 -5
  24. package/dist/agents/toolkits/sql/sql.d.ts +5 -5
  25. package/dist/agents/toolkits/vectorstore/vectorstore.d.ts +12 -12
  26. package/dist/agents/toolkits/zapier/zapier.d.ts +2 -2
  27. package/dist/agents/xml/index.d.ts +5 -5
  28. package/dist/base_language/index.d.ts +1 -1
  29. package/dist/chains/api/api_chain.d.ts +2 -2
  30. package/dist/chains/chat_vector_db_chain.d.ts +5 -5
  31. package/dist/chains/combine_docs_chain.d.ts +1 -1
  32. package/dist/chains/constitutional_ai/constitutional_chain.d.ts +2 -2
  33. package/dist/chains/conversational_retrieval_chain.cjs +2 -2
  34. package/dist/chains/conversational_retrieval_chain.d.ts +8 -8
  35. package/dist/chains/conversational_retrieval_chain.js +2 -2
  36. package/dist/chains/graph_qa/cypher.d.ts +4 -4
  37. package/dist/chains/llm_chain.cjs +2 -2
  38. package/dist/chains/llm_chain.d.ts +8 -5
  39. package/dist/chains/llm_chain.js +1 -1
  40. package/dist/chains/query_constructor/index.d.ts +3 -3
  41. package/dist/chains/question_answering/load.d.ts +7 -7
  42. package/dist/chains/retrieval_qa.d.ts +5 -5
  43. package/dist/chains/router/llm_router.d.ts +2 -2
  44. package/dist/chains/router/multi_prompt.d.ts +3 -3
  45. package/dist/chains/router/multi_retrieval_qa.cjs +1 -1
  46. package/dist/chains/router/multi_retrieval_qa.d.ts +7 -7
  47. package/dist/chains/router/multi_retrieval_qa.js +1 -1
  48. package/dist/chains/sql_db/sql_db_chain.d.ts +3 -3
  49. package/dist/chains/summarization/load.d.ts +4 -4
  50. package/dist/chains/vector_db_qa.d.ts +5 -5
  51. package/dist/embeddings/cache_backed.cjs +2 -2
  52. package/dist/embeddings/cache_backed.d.ts +4 -4
  53. package/dist/embeddings/cache_backed.js +1 -1
  54. package/dist/evaluation/agents/trajectory.d.ts +4 -4
  55. package/dist/evaluation/base.d.ts +4 -4
  56. package/dist/evaluation/comparison/pairwise.d.ts +4 -4
  57. package/dist/evaluation/criteria/criteria.d.ts +4 -4
  58. package/dist/evaluation/embedding_distance/base.d.ts +4 -4
  59. package/dist/evaluation/loader.d.ts +4 -4
  60. package/dist/evaluation/qa/eval_chain.d.ts +2 -2
  61. package/dist/experimental/autogpt/agent.d.ts +3 -3
  62. package/dist/experimental/autogpt/prompt.d.ts +2 -2
  63. package/dist/experimental/babyagi/agent.d.ts +5 -5
  64. package/dist/experimental/chains/violation_of_expectations/violation_of_expectations_chain.d.ts +4 -4
  65. package/dist/experimental/chat_models/anthropic_functions.d.ts +2 -2
  66. package/dist/experimental/generative_agents/generative_agent.d.ts +3 -3
  67. package/dist/experimental/generative_agents/generative_agent_memory.d.ts +5 -5
  68. package/dist/experimental/hubs/makersuite/googlemakersuitehub.d.ts +1 -1
  69. package/dist/experimental/plan_and_execute/agent_executor.d.ts +4 -4
  70. package/dist/llms/load.cjs +2 -2
  71. package/dist/llms/load.d.ts +1 -1
  72. package/dist/llms/load.js +1 -1
  73. package/dist/memory/buffer_token_memory.d.ts +3 -3
  74. package/dist/memory/entity_memory.d.ts +3 -3
  75. package/dist/memory/summary.d.ts +3 -3
  76. package/dist/memory/vector_store.d.ts +3 -3
  77. package/dist/output_parsers/fix.d.ts +2 -2
  78. package/dist/retrievers/contextual_compression.cjs +2 -2
  79. package/dist/retrievers/contextual_compression.d.ts +5 -5
  80. package/dist/retrievers/contextual_compression.js +1 -1
  81. package/dist/retrievers/document_compressors/chain_extract.cjs +2 -2
  82. package/dist/retrievers/document_compressors/chain_extract.d.ts +6 -6
  83. package/dist/retrievers/document_compressors/chain_extract.js +1 -1
  84. package/dist/retrievers/document_compressors/embeddings_filter.d.ts +5 -5
  85. package/dist/retrievers/document_compressors/index.d.ts +3 -3
  86. package/dist/retrievers/hyde.d.ts +3 -3
  87. package/dist/retrievers/multi_query.cjs +2 -2
  88. package/dist/retrievers/multi_query.d.ts +4 -4
  89. package/dist/retrievers/multi_query.js +1 -1
  90. package/dist/retrievers/multi_vector.cjs +2 -2
  91. package/dist/retrievers/multi_vector.d.ts +4 -4
  92. package/dist/retrievers/multi_vector.js +1 -1
  93. package/dist/retrievers/parent_document.d.ts +4 -4
  94. package/dist/retrievers/remote/base.cjs +2 -2
  95. package/dist/retrievers/remote/base.d.ts +1 -1
  96. package/dist/retrievers/remote/base.js +1 -1
  97. package/dist/retrievers/self_query/index.cjs +2 -2
  98. package/dist/retrievers/self_query/index.d.ts +1 -1
  99. package/dist/retrievers/self_query/index.js +1 -1
  100. package/dist/retrievers/time_weighted.cjs +2 -2
  101. package/dist/retrievers/time_weighted.d.ts +9 -9
  102. package/dist/retrievers/time_weighted.js +1 -1
  103. package/dist/schema/runnable/base.d.ts +1 -1
  104. package/dist/tools/convert_to_openai.d.ts +4 -4
  105. package/dist/tools/render.d.ts +3 -3
  106. package/dist/tools/sql.d.ts +2 -2
  107. package/dist/tools/vectorstore.d.ts +6 -6
  108. package/dist/tools/webbrowser.cjs +4 -4
  109. package/dist/tools/webbrowser.d.ts +4 -4
  110. package/dist/tools/webbrowser.js +1 -1
  111. package/dist/util/googlevertexai-connection.d.ts +1 -1
  112. package/dist/vectorstores/memory.d.ts +5 -5
  113. package/dist/vectorstores/mongo.d.ts +4 -4
  114. package/package.json +4 -4
@@ -1,10 +1,10 @@
1
- import { BaseLanguageModel } from "../base_language/index.js";
1
+ import type { StructuredToolInterface, ToolInterface } from "@langchain/core/tools";
2
+ import type { BaseLanguageModelInterface } from "@langchain/core/language_models/base";
2
3
  import { CallbackManager, Callbacks } from "../callbacks/manager.js";
3
4
  import { LLMChain } from "../chains/llm_chain.js";
4
5
  import { BasePromptTemplate } from "../prompts/base.js";
5
6
  import { AgentAction, AgentFinish, AgentStep, BaseMessage, ChainValues } from "../schema/index.js";
6
7
  import { Serializable } from "../load/serializable.js";
7
- import { StructuredTool, Tool } from "../tools/base.js";
8
8
  import { AgentActionOutputParser, AgentInput, RunnableAgentInput, SerializedAgent, StoppingMethod } from "./types.js";
9
9
  import { Runnable } from "../schema/runnable/base.js";
10
10
  /**
@@ -16,7 +16,7 @@ export type OutputParserArgs = Record<string, any>;
16
16
  * functionality for agents, such as handling inputs and outputs.
17
17
  */
18
18
  export declare abstract class BaseAgent extends Serializable {
19
- ToolType: StructuredTool;
19
+ ToolType: StructuredToolInterface;
20
20
  abstract get inputKeys(): string[];
21
21
  get returnValues(): string[];
22
22
  get allowedTools(): string[] | undefined;
@@ -193,13 +193,13 @@ export declare abstract class Agent extends BaseSingleActionAgent {
193
193
  *
194
194
  * @returns A PromptTemplate assembled from the given tools and fields.
195
195
  * */
196
- static createPrompt(_tools: StructuredTool[], _fields?: Record<string, any>): BasePromptTemplate;
196
+ static createPrompt(_tools: StructuredToolInterface[], _fields?: Record<string, any>): BasePromptTemplate;
197
197
  /** Construct an agent from an LLM and a list of tools */
198
- static fromLLMAndTools(_llm: BaseLanguageModel, _tools: StructuredTool[], _args?: AgentArgs): Agent;
198
+ static fromLLMAndTools(_llm: BaseLanguageModelInterface, _tools: StructuredToolInterface[], _args?: AgentArgs): Agent;
199
199
  /**
200
200
  * Validate that appropriate tools are passed in
201
201
  */
202
- static validateTools(_tools: StructuredTool[]): void;
202
+ static validateTools(_tools: StructuredToolInterface[]): void;
203
203
  _stop(): string[];
204
204
  /**
205
205
  * Name of tool to use to terminate the chain.
@@ -228,7 +228,7 @@ export declare abstract class Agent extends BaseSingleActionAgent {
228
228
  * Load an agent from a json-like object describing it.
229
229
  */
230
230
  static deserialize(data: SerializedAgent & {
231
- llm?: BaseLanguageModel;
232
- tools?: Tool[];
231
+ llm?: BaseLanguageModelInterface;
232
+ tools?: ToolInterface[];
233
233
  }): Promise<Agent>;
234
234
  }
@@ -97,7 +97,7 @@ class ChatAgent extends agent_js_1.Agent {
97
97
  /**
98
98
  * Creates a ChatAgent instance using a language model, tools, and
99
99
  * optional arguments.
100
- * @param llm BaseLanguageModel instance to use in the agent.
100
+ * @param llm BaseLanguageModelInterface instance to use in the agent.
101
101
  * @param tools Array of Tool instances to include in the agent.
102
102
  * @param args Optional arguments to customize the agent and prompt.
103
103
  * @returns ChatAgent instance
@@ -1,7 +1,7 @@
1
- import { BaseLanguageModel } from "../../base_language/index.js";
1
+ import type { BaseLanguageModelInterface } from "@langchain/core/language_models/base";
2
+ import type { ToolInterface } from "@langchain/core/tools";
2
3
  import { ChatPromptTemplate } from "../../prompts/chat.js";
3
4
  import { AgentStep } from "../../schema/index.js";
4
- import { Tool } from "../../tools/base.js";
5
5
  import { Optional } from "../../types/type-utils.js";
6
6
  import { Agent, AgentArgs, OutputParserArgs } from "../agent.js";
7
7
  import { AgentInput } from "../types.js";
@@ -33,7 +33,7 @@ export type ChatAgentInput = Optional<AgentInput, "outputParser">;
33
33
  export declare class ChatAgent extends Agent {
34
34
  static lc_name(): string;
35
35
  lc_namespace: string[];
36
- ToolType: Tool;
36
+ ToolType: ToolInterface;
37
37
  constructor(input: ChatAgentInput);
38
38
  _agentType(): "chat-zero-shot-react-description";
39
39
  observationPrefix(): string;
@@ -45,7 +45,7 @@ export declare class ChatAgent extends Agent {
45
45
  * @param tools Array of Tool instances to validate.
46
46
  * @returns void
47
47
  */
48
- static validateTools(tools: Tool[]): void;
48
+ static validateTools(tools: ToolInterface[]): void;
49
49
  /**
50
50
  * Returns a default output parser for the ChatAgent.
51
51
  * @param _fields Optional OutputParserArgs to customize the output parser.
@@ -69,14 +69,14 @@ export declare class ChatAgent extends Agent {
69
69
  * @param args.humanMessageTemplate - String to use directly as the human message template
70
70
  * @param args.formatInstructions - Formattable string to use as the instructions template
71
71
  */
72
- static createPrompt(tools: Tool[], args?: ChatCreatePromptArgs): ChatPromptTemplate<any, any>;
72
+ static createPrompt(tools: ToolInterface[], args?: ChatCreatePromptArgs): ChatPromptTemplate<any, any>;
73
73
  /**
74
74
  * Creates a ChatAgent instance using a language model, tools, and
75
75
  * optional arguments.
76
- * @param llm BaseLanguageModel instance to use in the agent.
76
+ * @param llm BaseLanguageModelInterface instance to use in the agent.
77
77
  * @param tools Array of Tool instances to include in the agent.
78
78
  * @param args Optional arguments to customize the agent and prompt.
79
79
  * @returns ChatAgent instance
80
80
  */
81
- static fromLLMAndTools(llm: BaseLanguageModel, tools: Tool[], args?: ChatCreatePromptArgs & AgentArgs): ChatAgent;
81
+ static fromLLMAndTools(llm: BaseLanguageModelInterface, tools: ToolInterface[], args?: ChatCreatePromptArgs & AgentArgs): ChatAgent;
82
82
  }
@@ -94,7 +94,7 @@ export class ChatAgent extends Agent {
94
94
  /**
95
95
  * Creates a ChatAgent instance using a language model, tools, and
96
96
  * optional arguments.
97
- * @param llm BaseLanguageModel instance to use in the agent.
97
+ * @param llm BaseLanguageModelInterface instance to use in the agent.
98
98
  * @param tools Array of Tool instances to include in the agent.
99
99
  * @param args Optional arguments to customize the agent and prompt.
100
100
  * @returns ChatAgent instance
@@ -1,7 +1,7 @@
1
- import { BaseLanguageModel } from "../../base_language/index.js";
1
+ import type { BaseLanguageModelInterface } from "@langchain/core/language_models/base";
2
+ import type { ToolInterface } from "@langchain/core/tools";
2
3
  import { ChatPromptTemplate } from "../../prompts/chat.js";
3
4
  import { AgentStep, BaseMessage } from "../../schema/index.js";
4
- import { Tool } from "../../tools/base.js";
5
5
  import { Optional } from "../../types/type-utils.js";
6
6
  import { Agent, AgentArgs, OutputParserArgs } from "../agent.js";
7
7
  import { AgentActionOutputParser, AgentInput } from "../types.js";
@@ -32,13 +32,13 @@ export type ChatConversationalAgentInput = Optional<AgentInput, "outputParser">;
32
32
  export declare class ChatConversationalAgent extends Agent {
33
33
  static lc_name(): string;
34
34
  lc_namespace: string[];
35
- ToolType: Tool;
35
+ ToolType: ToolInterface;
36
36
  constructor(input: ChatConversationalAgentInput);
37
37
  _agentType(): "chat-conversational-react-description";
38
38
  observationPrefix(): string;
39
39
  llmPrefix(): string;
40
40
  _stop(): string[];
41
- static validateTools(tools: Tool[]): void;
41
+ static validateTools(tools: ToolInterface[]): void;
42
42
  /**
43
43
  * Constructs the agent scratchpad based on the agent steps. It returns an
44
44
  * array of base messages representing the thoughts of the agent.
@@ -65,7 +65,7 @@ export declare class ChatConversationalAgent extends Agent {
65
65
  * @param args.humanMessage - String to put after the list of tools.
66
66
  * @param args.outputParser - Output parser to use for formatting.
67
67
  */
68
- static createPrompt(tools: Tool[], args?: ChatConversationalCreatePromptArgs): ChatPromptTemplate<any, any>;
68
+ static createPrompt(tools: ToolInterface[], args?: ChatConversationalCreatePromptArgs): ChatPromptTemplate<any, any>;
69
69
  /**
70
70
  * Creates an instance of the ChatConversationalAgent class from a
71
71
  * BaseLanguageModel and a set of tools. It takes optional arguments to
@@ -75,5 +75,5 @@ export declare class ChatConversationalAgent extends Agent {
75
75
  * @param args Optional arguments to customize the agent.
76
76
  * @returns An instance of the ChatConversationalAgent class.
77
77
  */
78
- static fromLLMAndTools(llm: BaseLanguageModel, tools: Tool[], args?: ChatConversationalCreatePromptArgs & AgentArgs): ChatConversationalAgent;
78
+ static fromLLMAndTools(llm: BaseLanguageModelInterface, tools: ToolInterface[], args?: ChatConversationalCreatePromptArgs & AgentArgs): ChatConversationalAgent;
79
79
  }
@@ -139,11 +139,11 @@ class ChatConversationalAgentOutputParserWithRetries extends types_js_1.AgentAct
139
139
  }
140
140
  /**
141
141
  * Static method to create a new
142
- * ChatConversationalAgentOutputParserWithRetries from a BaseLanguageModel
142
+ * ChatConversationalAgentOutputParserWithRetries from a BaseLanguageModelInterface
143
143
  * and options. If no base parser is provided in the options, a new
144
144
  * ChatConversationalAgentOutputParser is created. An OutputFixingParser
145
- * is also created from the BaseLanguageModel and the base parser.
146
- * @param llm BaseLanguageModel instance used to create the OutputFixingParser.
145
+ * is also created from the BaseLanguageModelInterface and the base parser.
146
+ * @param llm BaseLanguageModelInterface instance used to create the OutputFixingParser.
147
147
  * @param options Options for creating the ChatConversationalAgentOutputParserWithRetries instance.
148
148
  * @returns A new instance of ChatConversationalAgentOutputParserWithRetries.
149
149
  */
@@ -1,8 +1,8 @@
1
+ import type { BaseLanguageModelInterface } from "@langchain/core/language_models/base";
1
2
  import { FormatInstructionsOptions } from "../../schema/output_parser.js";
2
3
  import { AgentActionOutputParser } from "../types.js";
3
4
  import { AgentAction, AgentFinish } from "../../schema/index.js";
4
5
  import { OutputFixingParser } from "../../output_parsers/fix.js";
5
- import { BaseLanguageModel } from "../../base_language/index.js";
6
6
  export type ChatConversationalAgentOutputParserFormatInstructionsOptions = FormatInstructionsOptions & {
7
7
  toolNames: string[];
8
8
  raw?: boolean;
@@ -63,13 +63,13 @@ export declare class ChatConversationalAgentOutputParserWithRetries extends Agen
63
63
  parse(text: string): Promise<AgentAction | AgentFinish>;
64
64
  /**
65
65
  * Static method to create a new
66
- * ChatConversationalAgentOutputParserWithRetries from a BaseLanguageModel
66
+ * ChatConversationalAgentOutputParserWithRetries from a BaseLanguageModelInterface
67
67
  * and options. If no base parser is provided in the options, a new
68
68
  * ChatConversationalAgentOutputParser is created. An OutputFixingParser
69
- * is also created from the BaseLanguageModel and the base parser.
70
- * @param llm BaseLanguageModel instance used to create the OutputFixingParser.
69
+ * is also created from the BaseLanguageModelInterface and the base parser.
70
+ * @param llm BaseLanguageModelInterface instance used to create the OutputFixingParser.
71
71
  * @param options Options for creating the ChatConversationalAgentOutputParserWithRetries instance.
72
72
  * @returns A new instance of ChatConversationalAgentOutputParserWithRetries.
73
73
  */
74
- static fromLLM(llm: BaseLanguageModel, options: Omit<ChatConversationalAgentOutputParserArgs, "outputFixingParser">): ChatConversationalAgentOutputParserWithRetries;
74
+ static fromLLM(llm: BaseLanguageModelInterface, options: Omit<ChatConversationalAgentOutputParserArgs, "outputFixingParser">): ChatConversationalAgentOutputParserWithRetries;
75
75
  }
@@ -135,11 +135,11 @@ export class ChatConversationalAgentOutputParserWithRetries extends AgentActionO
135
135
  }
136
136
  /**
137
137
  * Static method to create a new
138
- * ChatConversationalAgentOutputParserWithRetries from a BaseLanguageModel
138
+ * ChatConversationalAgentOutputParserWithRetries from a BaseLanguageModelInterface
139
139
  * and options. If no base parser is provided in the options, a new
140
140
  * ChatConversationalAgentOutputParser is created. An OutputFixingParser
141
- * is also created from the BaseLanguageModel and the base parser.
142
- * @param llm BaseLanguageModel instance used to create the OutputFixingParser.
141
+ * is also created from the BaseLanguageModelInterface and the base parser.
142
+ * @param llm BaseLanguageModelInterface instance used to create the OutputFixingParser.
143
143
  * @param options Options for creating the ChatConversationalAgentOutputParserWithRetries instance.
144
144
  * @returns A new instance of ChatConversationalAgentOutputParserWithRetries.
145
145
  */
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AgentExecutor = exports.ExceptionTool = exports.AgentExecutorIterator = void 0;
4
+ const tools_1 = require("@langchain/core/tools");
4
5
  const base_js_1 = require("../chains/base.cjs");
5
6
  const agent_js_1 = require("./agent.cjs");
6
7
  const manager_js_1 = require("../callbacks/manager.cjs");
7
8
  const output_parser_js_1 = require("../schema/output_parser.cjs");
8
- const base_js_2 = require("../tools/base.cjs");
9
- const base_js_3 = require("../schema/runnable/base.cjs");
9
+ const base_js_2 = require("../schema/runnable/base.cjs");
10
10
  const serializable_js_1 = require("../load/serializable.cjs");
11
11
  class AgentExecutorIterator extends serializable_js_1.Serializable {
12
12
  get finalOutputs() {
@@ -214,7 +214,7 @@ exports.AgentExecutorIterator = AgentExecutorIterator;
214
214
  * Tool that just returns the query.
215
215
  * Used for exception tracking.
216
216
  */
217
- class ExceptionTool extends base_js_2.Tool {
217
+ class ExceptionTool extends tools_1.Tool {
218
218
  constructor() {
219
219
  super(...arguments);
220
220
  Object.defineProperty(this, "name", {
@@ -268,7 +268,7 @@ class AgentExecutor extends base_js_1.BaseChain {
268
268
  }
269
269
  constructor(input) {
270
270
  let agent;
271
- if (base_js_3.Runnable.isRunnable(input.agent)) {
271
+ if (base_js_2.Runnable.isRunnable(input.agent)) {
272
272
  agent = new agent_js_1.RunnableAgent({ runnable: input.agent });
273
273
  }
274
274
  else {
@@ -430,7 +430,7 @@ class AgentExecutor extends base_js_1.BaseChain {
430
430
  }
431
431
  catch (e) {
432
432
  // eslint-disable-next-line no-instanceof/no-instanceof
433
- if (e instanceof base_js_2.ToolInputParsingException) {
433
+ if (e instanceof tools_1.ToolInputParsingException) {
434
434
  if (this.handleParsingErrors === true) {
435
435
  observation =
436
436
  "Invalid or incomplete tool input. Please try again.";
@@ -525,7 +525,7 @@ class AgentExecutor extends base_js_1.BaseChain {
525
525
  }
526
526
  catch (e) {
527
527
  // eslint-disable-next-line no-instanceof/no-instanceof
528
- if (e instanceof base_js_2.ToolInputParsingException) {
528
+ if (e instanceof tools_1.ToolInputParsingException) {
529
529
  if (this.handleParsingErrors === true) {
530
530
  observation =
531
531
  "Invalid or incomplete tool input. Please try again.";
@@ -1,3 +1,4 @@
1
+ import { type StructuredToolInterface, type ToolInterface, ToolInputParsingException, Tool } from "@langchain/core/tools";
1
2
  import { BaseChain, ChainInputs } from "../chains/base.js";
2
3
  import { BaseMultiActionAgent, BaseSingleActionAgent } from "./agent.js";
3
4
  import { StoppingMethod } from "./types.js";
@@ -5,7 +6,6 @@ import { SerializedLLMChain } from "../chains/serde.js";
5
6
  import { AgentAction, ChainValues, AgentFinish, AgentStep } from "../schema/index.js";
6
7
  import { CallbackManagerForChainRun, Callbacks } from "../callbacks/manager.js";
7
8
  import { OutputParserException } from "../schema/output_parser.js";
8
- import { StructuredTool, ToolInputParsingException, Tool } from "../tools/base.js";
9
9
  import { Runnable } from "../schema/runnable/base.js";
10
10
  import { Serializable } from "../load/serializable.js";
11
11
  interface AgentExecutorIteratorInput {
@@ -32,7 +32,7 @@ export declare class AgentExecutorIterator extends Serializable implements Agent
32
32
  runManager: CallbackManagerForChainRun | undefined;
33
33
  intermediateSteps: AgentStep[];
34
34
  iterations: number;
35
- get nameToToolMap(): Record<string, Tool>;
35
+ get nameToToolMap(): Record<string, ToolInterface>;
36
36
  constructor(fields: AgentExecutorIteratorInput);
37
37
  /**
38
38
  * Reset the iterator to its initial state, clearing intermediate steps,
@@ -60,8 +60,8 @@ export declare class AgentExecutorIterator extends Serializable implements Agent
60
60
  _callNext(): Promise<Record<string, unknown>>;
61
61
  }
62
62
  type ExtractToolType<T> = T extends {
63
- ToolType: infer Tool;
64
- } ? Tool : StructuredTool;
63
+ ToolType: infer ToolInterface;
64
+ } ? ToolInterface : StructuredToolInterface;
65
65
  /**
66
66
  * Interface defining the structure of input data for creating an
67
67
  * AgentExecutor. It extends ChainInputs and includes additional
@@ -139,7 +139,7 @@ export declare class AgentExecutor extends BaseChain<ChainValues, AgentExecutorO
139
139
  private shouldContinue;
140
140
  /** @ignore */
141
141
  _call(inputs: ChainValues, runManager?: CallbackManagerForChainRun): Promise<AgentExecutorOutput>;
142
- _takeNextStep(nameToolMap: Record<string, Tool>, inputs: ChainValues, intermediateSteps: AgentStep[], runManager?: CallbackManagerForChainRun): Promise<AgentFinish | AgentStep[]>;
142
+ _takeNextStep(nameToolMap: Record<string, ToolInterface>, inputs: ChainValues, intermediateSteps: AgentStep[], runManager?: CallbackManagerForChainRun): Promise<AgentFinish | AgentStep[]>;
143
143
  _return(output: AgentFinish, intermediateSteps: AgentStep[], runManager?: CallbackManagerForChainRun): Promise<AgentExecutorOutput>;
144
144
  _getToolReturn(nextStepOutput: AgentStep): Promise<AgentFinish | null>;
145
145
  _returnStoppedResponse(earlyStoppingMethod: StoppingMethod): AgentFinish;
@@ -1,8 +1,8 @@
1
+ import { ToolInputParsingException, Tool, } from "@langchain/core/tools";
1
2
  import { BaseChain } from "../chains/base.js";
2
3
  import { RunnableAgent, } from "./agent.js";
3
4
  import { CallbackManager, } from "../callbacks/manager.js";
4
5
  import { OutputParserException } from "../schema/output_parser.js";
5
- import { ToolInputParsingException, Tool, } from "../tools/base.js";
6
6
  import { Runnable } from "../schema/runnable/base.js";
7
7
  import { Serializable } from "../load/serializable.js";
8
8
  export class AgentExecutorIterator extends Serializable {
@@ -1,4 +1,4 @@
1
+ import type { BaseLanguageModelInterface } from "@langchain/core/language_models/base";
2
+ import type { ToolInterface } from "@langchain/core/tools";
1
3
  import type { SerializedAgentT, AgentInput } from "./types.js";
2
- import { Tool } from "../tools/base.js";
3
- import { BaseLanguageModel } from "../base_language/index.js";
4
- export declare const deserializeHelper: <T extends string, U extends Record<string, unknown>, V extends AgentInput, Z>(llm: BaseLanguageModel | undefined, tools: Tool[] | undefined, data: SerializedAgentT<T, U, V>, fromLLMAndTools: (llm: BaseLanguageModel, tools: Tool[], args: U) => Z, fromConstructor: (args: V) => Z) => Promise<Z>;
4
+ export declare const deserializeHelper: <T extends string, U extends Record<string, unknown>, V extends AgentInput, Z>(llm: BaseLanguageModelInterface | undefined, tools: ToolInterface[] | undefined, data: SerializedAgentT<T, U, V>, fromLLMAndTools: (llm: BaseLanguageModelInterface, tools: ToolInterface[], args: U) => Z, fromConstructor: (args: V) => Z) => Promise<Z>;
@@ -1,6 +1,6 @@
1
- import { BaseLanguageModel } from "../base_language/index.js";
1
+ import type { BaseLanguageModelInterface } from "@langchain/core/language_models/base";
2
+ import type { StructuredToolInterface, ToolInterface } from "@langchain/core/tools";
2
3
  import { CallbackManager } from "../callbacks/manager.js";
3
- import { StructuredTool, Tool } from "../tools/base.js";
4
4
  import { ChatAgent } from "./chat/index.js";
5
5
  import { ChatConversationalAgent } from "./chat_convo/index.js";
6
6
  import { StructuredChatAgent } from "./structured_chat/index.js";
@@ -17,7 +17,7 @@ type AgentType = "zero-shot-react-description" | "chat-zero-shot-react-descripti
17
17
  /**
18
18
  * @deprecated use initializeAgentExecutorWithOptions instead
19
19
  */
20
- export declare const initializeAgentExecutor: (tools: Tool[], llm: BaseLanguageModel, _agentType?: AgentType, _verbose?: boolean, _callbackManager?: CallbackManager) => Promise<AgentExecutor>;
20
+ export declare const initializeAgentExecutor: (tools: ToolInterface[], llm: BaseLanguageModelInterface, _agentType?: AgentType, _verbose?: boolean, _callbackManager?: CallbackManager) => Promise<AgentExecutor>;
21
21
  /**
22
22
  * @interface
23
23
  */
@@ -53,6 +53,6 @@ export type InitializeAgentExecutorOptionsStructured = ({
53
53
  * @param options Options for the agent, including agentType, agentArgs, and other options for AgentExecutor.fromAgentAndTools
54
54
  * @returns AgentExecutor
55
55
  */
56
- export declare function initializeAgentExecutorWithOptions(tools: StructuredTool[], llm: BaseLanguageModel, options: InitializeAgentExecutorOptionsStructured): Promise<AgentExecutor>;
57
- export declare function initializeAgentExecutorWithOptions(tools: Tool[], llm: BaseLanguageModel, options?: InitializeAgentExecutorOptions): Promise<AgentExecutor>;
56
+ export declare function initializeAgentExecutorWithOptions(tools: StructuredToolInterface[], llm: BaseLanguageModelInterface, options: InitializeAgentExecutorOptionsStructured): Promise<AgentExecutor>;
57
+ export declare function initializeAgentExecutorWithOptions(tools: ToolInterface[], llm: BaseLanguageModelInterface, options?: InitializeAgentExecutorOptions): Promise<AgentExecutor>;
58
58
  export {};
@@ -1,7 +1,7 @@
1
+ import type { BaseLanguageModelInterface } from "@langchain/core/language_models/base";
2
+ import type { ToolInterface } from "@langchain/core/tools";
1
3
  import { Agent } from "./agent.js";
2
- import { Tool } from "../tools/base.js";
3
- import { BaseLanguageModel } from "../base_language/index.js";
4
4
  export declare const loadAgent: (uri: string, llmAndTools?: {
5
- llm?: BaseLanguageModel;
6
- tools?: Tool[];
5
+ llm?: BaseLanguageModelInterface;
6
+ tools?: ToolInterface[];
7
7
  }) => Promise<Agent>;
@@ -1,6 +1,6 @@
1
- import { BaseLanguageModel } from "../../base_language/index.js";
1
+ import type { BaseLanguageModelInterface } from "@langchain/core/language_models/base";
2
+ import { ToolInterface } from "@langchain/core/tools";
2
3
  import { PromptTemplate } from "../../prompts/prompt.js";
3
- import { Tool } from "../../tools/base.js";
4
4
  import { Optional } from "../../types/type-utils.js";
5
5
  import { Agent, AgentArgs, OutputParserArgs } from "../agent.js";
6
6
  import { AgentInput, SerializedZeroShotAgent } from "../types.js";
@@ -49,7 +49,7 @@ export type ZeroShotAgentInput = Optional<AgentInput, "outputParser">;
49
49
  export declare class ZeroShotAgent extends Agent {
50
50
  static lc_name(): string;
51
51
  lc_namespace: string[];
52
- ToolType: Tool;
52
+ ToolType: ToolInterface;
53
53
  constructor(input: ZeroShotAgentInput);
54
54
  _agentType(): "zero-shot-react-description";
55
55
  observationPrefix(): string;
@@ -65,7 +65,7 @@ export declare class ZeroShotAgent extends Agent {
65
65
  * does not have a description.
66
66
  * @param tools List of tools to validate.
67
67
  */
68
- static validateTools(tools: Tool[]): void;
68
+ static validateTools(tools: ToolInterface[]): void;
69
69
  /**
70
70
  * Create prompt in the style of the zero shot agent.
71
71
  *
@@ -75,7 +75,7 @@ export declare class ZeroShotAgent extends Agent {
75
75
  * @param args.prefix - String to put before the list of tools.
76
76
  * @param args.inputVariables - List of input variables the final prompt will expect.
77
77
  */
78
- static createPrompt(tools: Tool[], args?: ZeroShotCreatePromptArgs): PromptTemplate<any, any>;
78
+ static createPrompt(tools: ToolInterface[], args?: ZeroShotCreatePromptArgs): PromptTemplate<any, any>;
79
79
  /**
80
80
  * Creates a ZeroShotAgent from a Large Language Model and a set of tools.
81
81
  * @param llm The Large Language Model to use.
@@ -83,9 +83,9 @@ export declare class ZeroShotAgent extends Agent {
83
83
  * @param args Optional arguments for creating the agent.
84
84
  * @returns A new instance of ZeroShotAgent.
85
85
  */
86
- static fromLLMAndTools(llm: BaseLanguageModel, tools: Tool[], args?: ZeroShotCreatePromptArgs & AgentArgs): ZeroShotAgent;
86
+ static fromLLMAndTools(llm: BaseLanguageModelInterface, tools: ToolInterface[], args?: ZeroShotCreatePromptArgs & AgentArgs): ZeroShotAgent;
87
87
  static deserialize(data: SerializedZeroShotAgent & {
88
- llm?: BaseLanguageModel;
89
- tools?: Tool[];
88
+ llm?: BaseLanguageModelInterface;
89
+ tools?: ToolInterface[];
90
90
  }): Promise<ZeroShotAgent>;
91
91
  }
@@ -1,17 +1,17 @@
1
+ import type { BaseLanguageModelInterface } from "@langchain/core/language_models/base";
2
+ import type { StructuredToolInterface } from "@langchain/core/tools";
1
3
  import { CallbackManager } from "../../callbacks/manager.js";
2
4
  import { BasePromptTemplate } from "../../prompts/base.js";
3
5
  import { AgentAction, AgentFinish, AgentStep, BaseMessage, ChainValues, SystemMessage } from "../../schema/index.js";
4
- import { StructuredTool } from "../../tools/base.js";
5
6
  import { Agent, AgentArgs } from "../agent.js";
6
7
  import { AgentInput } from "../types.js";
7
- import { BaseLanguageModel } from "../../base_language/index.js";
8
8
  import { OpenAIFunctionsAgentOutputParser } from "./output_parser.js";
9
9
  export declare function _formatIntermediateSteps(intermediateSteps: AgentStep[]): BaseMessage[];
10
10
  /**
11
11
  * Interface for the input data required to create an OpenAIAgent.
12
12
  */
13
13
  export interface OpenAIAgentInput extends AgentInput {
14
- tools: StructuredTool[];
14
+ tools: StructuredToolInterface[];
15
15
  }
16
16
  /**
17
17
  * Interface for the arguments required to create a prompt for an
@@ -33,7 +33,7 @@ export declare class OpenAIAgent extends Agent {
33
33
  observationPrefix(): string;
34
34
  llmPrefix(): string;
35
35
  _stop(): string[];
36
- tools: StructuredTool[];
36
+ tools: StructuredToolInterface[];
37
37
  outputParser: OpenAIFunctionsAgentOutputParser;
38
38
  constructor(input: Omit<OpenAIAgentInput, "outputParser">);
39
39
  /**
@@ -43,7 +43,7 @@ export declare class OpenAIAgent extends Agent {
43
43
  * @param fields Optional fields for creating the prompt.
44
44
  * @returns A BasePromptTemplate object representing the created prompt.
45
45
  */
46
- static createPrompt(_tools: StructuredTool[], fields?: OpenAIAgentCreatePromptArgs): BasePromptTemplate;
46
+ static createPrompt(_tools: StructuredToolInterface[], fields?: OpenAIAgentCreatePromptArgs): BasePromptTemplate;
47
47
  /**
48
48
  * Creates an OpenAIAgent from a BaseLanguageModel and a list of tools.
49
49
  * @param llm The BaseLanguageModel to use.
@@ -51,7 +51,7 @@ export declare class OpenAIAgent extends Agent {
51
51
  * @param args Optional arguments for creating the agent.
52
52
  * @returns An instance of OpenAIAgent.
53
53
  */
54
- static fromLLMAndTools(llm: BaseLanguageModel, tools: StructuredTool[], args?: OpenAIAgentCreatePromptArgs & Pick<AgentArgs, "callbacks">): OpenAIAgent;
54
+ static fromLLMAndTools(llm: BaseLanguageModelInterface, tools: StructuredToolInterface[], args?: OpenAIAgentCreatePromptArgs & Pick<AgentArgs, "callbacks">): OpenAIAgent;
55
55
  /**
56
56
  * Constructs a scratch pad from a list of agent steps.
57
57
  * @param steps The steps to include in the scratch pad.
@@ -1,7 +1,7 @@
1
- import { BaseLanguageModel } from "../../base_language/index.js";
1
+ import type { StructuredToolInterface } from "@langchain/core/tools";
2
+ import type { BaseLanguageModelInterface } from "@langchain/core/language_models/base";
2
3
  import { BaseMessagePromptTemplate, ChatPromptTemplate } from "../../prompts/chat.js";
3
4
  import { AgentStep } from "../../schema/index.js";
4
- import { StructuredTool } from "../../tools/base.js";
5
5
  import { Optional } from "../../types/type-utils.js";
6
6
  import { Agent, AgentArgs, OutputParserArgs } from "../agent.js";
7
7
  import { AgentInput } from "../types.js";
@@ -44,7 +44,7 @@ export declare class StructuredChatAgent extends Agent {
44
44
  * if any tool lacks a description.
45
45
  * @param tools Array of StructuredTool instances to validate.
46
46
  */
47
- static validateTools(tools: StructuredTool[]): void;
47
+ static validateTools(tools: StructuredToolInterface[]): void;
48
48
  /**
49
49
  * Returns a default output parser for the StructuredChatAgent. If an LLM
50
50
  * is provided, it creates an output parser with retry logic from the LLM.
@@ -67,7 +67,7 @@ export declare class StructuredChatAgent extends Agent {
67
67
  * @param tools Array of StructuredTool instances to create the schemas string from.
68
68
  * @returns A string representing the schemas of the provided tools.
69
69
  */
70
- static createToolSchemasString(tools: StructuredTool[]): string;
70
+ static createToolSchemasString(tools: StructuredToolInterface[]): string;
71
71
  /**
72
72
  * Create prompt in the style of the agent.
73
73
  *
@@ -78,7 +78,7 @@ export declare class StructuredChatAgent extends Agent {
78
78
  * @param args.inputVariables List of input variables the final prompt will expect.
79
79
  * @param args.memoryPrompts List of historical prompts from memory.
80
80
  */
81
- static createPrompt(tools: StructuredTool[], args?: StructuredChatCreatePromptArgs): ChatPromptTemplate<any, any>;
81
+ static createPrompt(tools: StructuredToolInterface[], args?: StructuredChatCreatePromptArgs): ChatPromptTemplate<any, any>;
82
82
  /**
83
83
  * Creates a StructuredChatAgent from an LLM and a list of tools.
84
84
  * Validates the tools, creates a prompt, and sets up an LLM chain for the
@@ -88,5 +88,5 @@ export declare class StructuredChatAgent extends Agent {
88
88
  * @param args Optional arguments to customize the creation of the agent. Can include arguments for creating the prompt and AgentArgs.
89
89
  * @returns A new instance of StructuredChatAgent.
90
90
  */
91
- static fromLLMAndTools(llm: BaseLanguageModel, tools: StructuredTool[], args?: StructuredChatCreatePromptArgs & AgentArgs): StructuredChatAgent;
91
+ static fromLLMAndTools(llm: BaseLanguageModelInterface, tools: StructuredToolInterface[], args?: StructuredChatCreatePromptArgs & AgentArgs): StructuredChatAgent;
92
92
  }
@@ -1,6 +1,6 @@
1
+ import type { BaseLanguageModelInterface } from "@langchain/core/language_models/base";
1
2
  import { AgentActionOutputParser } from "../types.js";
2
3
  import { OutputFixingParser } from "../../output_parsers/fix.js";
3
- import { BaseLanguageModel } from "../../base_language/index.js";
4
4
  import { AgentAction, AgentFinish } from "../../schema/index.js";
5
5
  import { Callbacks } from "../../callbacks/manager.js";
6
6
  /**
@@ -85,5 +85,5 @@ export declare class StructuredChatOutputParserWithRetries extends AgentActionOu
85
85
  * @param options Options for creating a `StructuredChatOutputParserWithRetries` instance.
86
86
  * @returns A new `StructuredChatOutputParserWithRetries` instance.
87
87
  */
88
- static fromLLM(llm: BaseLanguageModel, options: Omit<StructuredChatOutputParserArgs, "outputFixingParser">): StructuredChatOutputParserWithRetries;
88
+ static fromLLM(llm: BaseLanguageModelInterface, options: Omit<StructuredChatOutputParserArgs, "outputFixingParser">): StructuredChatOutputParserWithRetries;
89
89
  }
@@ -1,5 +1,5 @@
1
+ import type { BaseLanguageModelInterface } from "@langchain/core/language_models/base";
1
2
  import { type AWSSfnToolkitArgs, AWSSfnToolkit } from "@langchain/community/agents/toolkits/aws_sfn";
2
- import { BaseLanguageModel } from "../../base_language/index.js";
3
3
  import { ZeroShotCreatePromptArgs } from "../mrkl/index.js";
4
4
  import { AgentExecutor } from "../executor.js";
5
5
  export { AWSSfnToolkit, type AWSSfnToolkitArgs };
@@ -7,4 +7,4 @@ export declare const SFN_PREFIX = "You are an agent designed to interact with AW
7
7
  export declare const SFN_SUFFIX = "Begin!\n\nQuestion: {input}\nThought: I should look at state machines within AWS Step Functions to see what actions I can perform.\n{agent_scratchpad}";
8
8
  export interface AWSSfnCreatePromptArgs extends ZeroShotCreatePromptArgs {
9
9
  }
10
- export declare function createAWSSfnAgent(llm: BaseLanguageModel, toolkit: AWSSfnToolkit, args?: AWSSfnCreatePromptArgs): AgentExecutor;
10
+ export declare function createAWSSfnAgent(llm: BaseLanguageModelInterface, toolkit: AWSSfnToolkit, args?: AWSSfnCreatePromptArgs): AgentExecutor;
@@ -1,5 +1,5 @@
1
+ import { StructuredToolInterface } from "@langchain/core/tools";
1
2
  import { ChatOpenAI } from "../../../chat_models/openai.js";
2
- import { StructuredTool } from "../../../tools/base.js";
3
3
  export type ConversationalRetrievalAgentOptions = {
4
4
  rememberIntermediateSteps?: boolean;
5
5
  memoryKey?: string;
@@ -17,4 +17,4 @@ export type ConversationalRetrievalAgentOptions = {
17
17
  * @param options Optional ConversationalRetrievalAgentOptions to customize the agent.
18
18
  * @returns A Promise that resolves to an initialized AgentExecutor.
19
19
  */
20
- export declare function createConversationalRetrievalAgent(llm: ChatOpenAI, tools: StructuredTool[], options?: ConversationalRetrievalAgentOptions): Promise<import("../../executor.js").AgentExecutor>;
20
+ export declare function createConversationalRetrievalAgent(llm: ChatOpenAI, tools: StructuredToolInterface[], options?: ConversationalRetrievalAgentOptions): Promise<import("../../executor.js").AgentExecutor>;
@@ -1,7 +1,7 @@
1
+ import type { BaseRetrieverInterface } from "@langchain/core/retrievers";
1
2
  import { z } from "zod";
2
- import { BaseRetriever } from "../../../schema/retriever.js";
3
3
  import { DynamicStructuredTool, DynamicStructuredToolInput } from "../../../tools/dynamic.js";
4
- export declare function createRetrieverTool(retriever: BaseRetriever, input: Omit<DynamicStructuredToolInput, "func" | "schema">): DynamicStructuredTool<z.ZodObject<{
4
+ export declare function createRetrieverTool(retriever: BaseRetrieverInterface, input: Omit<DynamicStructuredToolInput, "func" | "schema">): DynamicStructuredTool<z.ZodObject<{
5
5
  input: z.ZodString;
6
6
  }, "strip", z.ZodTypeAny, {
7
7
  input: string;
@@ -1,5 +1,5 @@
1
- import { BaseLanguageModel } from "../../../base_language/index.js";
2
- import { Tool } from "../../../tools/base.js";
1
+ import type { BaseLanguageModelInterface } from "@langchain/core/language_models/base";
2
+ import type { ToolInterface } from "@langchain/core/tools";
3
3
  import { JsonSpec } from "../../../tools/json.js";
4
4
  import { ZeroShotCreatePromptArgs } from "../../mrkl/index.js";
5
5
  import { Toolkit } from "../base.js";
@@ -18,7 +18,7 @@ import { AgentExecutor } from "../../executor.js";
18
18
  */
19
19
  export declare class JsonToolkit extends Toolkit {
20
20
  jsonSpec: JsonSpec;
21
- tools: Tool[];
21
+ tools: ToolInterface[];
22
22
  constructor(jsonSpec: JsonSpec);
23
23
  }
24
24
  /**
@@ -32,4 +32,4 @@ export declare class JsonToolkit extends Toolkit {
32
32
  * @param args Optional prompt arguments used to create the JSON agent.
33
33
  * @returns An AgentExecutor for executing the created JSON agent with the tools.
34
34
  */
35
- export declare function createJsonAgent(llm: BaseLanguageModel, toolkit: JsonToolkit, args?: ZeroShotCreatePromptArgs): AgentExecutor;
35
+ export declare function createJsonAgent(llm: BaseLanguageModelInterface, toolkit: JsonToolkit, args?: ZeroShotCreatePromptArgs): AgentExecutor;
@@ -1,5 +1,5 @@
1
- import { BaseLanguageModel } from "../../../base_language/index.js";
2
- import { Tool } from "../../../tools/base.js";
1
+ import type { BaseLanguageModelInterface } from "@langchain/core/language_models/base";
2
+ import type { ToolInterface } from "@langchain/core/tools";
3
3
  import { JsonSpec } from "../../../tools/json.js";
4
4
  import { AgentExecutor } from "../../executor.js";
5
5
  import { ZeroShotCreatePromptArgs } from "../../mrkl/index.js";
@@ -10,7 +10,7 @@ import { Headers } from "../../../tools/requests.js";
10
10
  * request tools based on the provided headers.
11
11
  */
12
12
  export declare class RequestsToolkit extends Toolkit {
13
- tools: Tool[];
13
+ tools: ToolInterface[];
14
14
  constructor(headers?: Headers);
15
15
  }
16
16
  /**
@@ -38,7 +38,7 @@ export declare class RequestsToolkit extends Toolkit {
38
38
  * ```
39
39
  */
40
40
  export declare class OpenApiToolkit extends RequestsToolkit {
41
- constructor(jsonSpec: JsonSpec, llm: BaseLanguageModel, headers?: Headers);
41
+ constructor(jsonSpec: JsonSpec, llm: BaseLanguageModelInterface, headers?: Headers);
42
42
  }
43
43
  /**
44
44
  * Creates an OpenAPI agent using a language model, an OpenAPI toolkit,
@@ -59,4 +59,4 @@ export declare class OpenApiToolkit extends RequestsToolkit {
59
59
  *
60
60
  * @link See https://js.langchain.com/docs/security for more information.
61
61
  */
62
- export declare function createOpenApiAgent(llm: BaseLanguageModel, openApiToolkit: OpenApiToolkit, args?: ZeroShotCreatePromptArgs): AgentExecutor;
62
+ export declare function createOpenApiAgent(llm: BaseLanguageModelInterface, openApiToolkit: OpenApiToolkit, args?: ZeroShotCreatePromptArgs): AgentExecutor;