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.
Optional
callbackManager: 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
Optional
callbackManager: anyStatic
createCreates a prompt for the OpenAIAgent using the provided tools and fields.
The tools to be used in the prompt.
Optional
fields: OpenAIAgentCreatePromptArgsOptional fields for creating the prompt.
A BasePromptTemplate object representing the created prompt.
Static
deserializeLoad an agent from a json-like object describing it.
Static
fromLLMAndCreates an OpenAIAgent from a BaseLanguageModel and a list of tools.
The BaseLanguageModel to use.
The tools to be used by the agent.
Optional
args: OpenAIAgentCreatePromptArgs & Pick<AgentArgs, "callbacks">Optional arguments for creating the agent.
An instance of OpenAIAgent.
Static
getGet the default output parser for this agent.
Optional
_fields: OutputParserArgsStatic
validateGenerated using TypeDoc
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.
This feature is deprecated and will be removed in the future.
It is not recommended for use.