Class: BaseSingleActionAgent
agents.BaseSingleActionAgent
Hierarchy
BaseSingleActionAgent
↳
Agent
Constructors
constructor
• new BaseSingleActionAgent()
Accessors
allowedTools
• get
allowedTools(): undefined
| string
[]
Returns
undefined
| string
[]
Defined in
langchain/src/agents/agent.ts:35
inputKeys
• Abstract
get
inputKeys(): string
[]
Returns
string
[]
Defined in
langchain/src/agents/agent.ts:29
returnValues
• get
returnValues(): string
[]
Returns
string
[]
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
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:54
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
>>
Defined in
langchain/src/agents/agent.ts:80
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
>
Defined in
langchain/src/agents/agent.ts:62