Constructs a scratch pad from a list of agent steps.
The steps to include in the scratch pad.
A string or a list of BaseMessages representing the constructed scratch pad.
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: CallbackManagerOptional CallbackManager to use in planning.
A Promise that resolves to an AgentAction or AgentFinish object representing the planned action or finish state.
Prepare the agent for output, if needed
Return response when agent has been stopped due to max iterations
Optional
callbackManager: CallbackManagerStatic
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
validate
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 method instead.