Class: BaseSingleActionAgent
agents.BaseSingleActionAgent
Hierarchy
BaseAgent
↳
BaseSingleActionAgent
↳↳
Agent
Constructors
constructor
• new BaseSingleActionAgent()
Inherited from
BaseAgent.constructor
Accessors
allowedTools
• get
allowedTools(): undefined
| string
[]
Returns
undefined
| string
[]
Inherited from
BaseAgent.allowedTools
Defined in
langchain/src/agents/agent.ts:35
inputKeys
• Abstract
get
inputKeys(): string
[]
Returns
string
[]
Inherited from
BaseAgent.inputKeys
Defined in
langchain/src/agents/agent.ts:29
returnValues
• get
returnValues(): string
[]
Returns
string
[]
Inherited from
BaseAgent.returnValues
Defined in
langchain/src/agents/agent.ts:31
Methods
_agentType
▸ _agentType(): string
Return the string type key uniquely identifying this class of agent.
Returns
string
Inherited from
BaseAgent._agentType
Defined in
langchain/src/agents/agent.ts:42
plan
▸ Abstract
plan(steps
, inputs
): Promise
<AgentAction
| AgentFinish
>
Decide what to do, given some input.
Parameters
Name | Type | Description |
---|---|---|
steps | AgentStep [] | Steps the LLM has taken so far, along with observations from each. |
inputs | ChainValues | User inputs. |
Returns
Promise
<AgentAction
| AgentFinish
>
Action specifying what tool to use.
Defined in
langchain/src/agents/agent.ts:84
prepareForOutput
▸ prepareForOutput(_returnValues
, _steps
): Promise
<Record
<string
, any
>>
Prepare the agent for output, if needed
Parameters
Name | Type |
---|---|
_returnValues | Record <string , any > |
_steps | AgentStep [] |
Returns
Promise
<Record
<string
, any
>>
Inherited from
BaseAgent.prepareForOutput
Defined in
langchain/src/agents/agent.ts:67
returnStoppedResponse
▸ returnStoppedResponse(earlyStoppingMethod
, _steps
, _inputs
): Promise
<AgentFinish
>
Return response when agent has been stopped due to max iterations
Parameters
Name | Type |
---|---|
earlyStoppingMethod | StoppingMethod |
_steps | AgentStep [] |
_inputs | ChainValues |
Returns
Promise
<AgentFinish
>
Inherited from
BaseAgent.returnStoppedResponse
Defined in
langchain/src/agents/agent.ts:49