Plans the next action or finish state of the agent based on the provided steps, inputs, and optional callback manager.
The steps to consider in planning.
The inputs to consider in planning.
OptionalcallbackManager: anyOptional CallbackManager to use in planning.
A Promise that resolves to an AgentAction or AgentFinish object representing the planned action or finish state.
Return response when agent has been stopped due to max iterations
OptionalcallbackManager: anyStaticcreateCreates a prompt for the OpenAIAgent using the provided tools and fields.
The tools to be used in the prompt.
Optionalfields: OpenAIAgentCreatePromptArgsOptional fields for creating the prompt.
A BasePromptTemplate object representing the created prompt.
StaticdeserializeLoad an agent from a json-like object describing it.
StaticfromLLMAndCreates an OpenAIAgent from a BaseLanguageModel and a list of tools.
The BaseLanguageModel to use.
The tools to be used by the agent.
Optionalargs: OpenAIAgentCreatePromptArgs & Pick<AgentArgs, "callbacks">Optional arguments for creating the agent.
An instance of OpenAIAgent.
StaticgetGet the default output parser for this agent.
Optional_fields: OutputParserArgsStaticvalidate
Class representing an agent for the OpenAI chat model in LangChain. It extends the Agent class and provides additional functionality specific to the OpenAIAgent type.
Deprecated
Use the createOpenAIFunctionsAgent method instead.