Class: LLMSingleActionAgent
agents.LLMSingleActionAgent
Hierarchy
↳
LLMSingleActionAgent
Constructors
constructor
• new LLMSingleActionAgent(input
)
Parameters
Name | Type |
---|---|
input | LLMSingleActionAgentInput |
Overrides
BaseSingleActionAgent.constructor
Defined in
langchain/src/agents/agent.ts:118
Properties
llmChain
• llmChain: LLMChain
Defined in
langchain/src/agents/agent.ts:112
outputParser
• outputParser: AgentActionOutputParser
Defined in
langchain/src/agents/agent.ts:114
stop
• Optional
stop: string
[]
Defined in
langchain/src/agents/agent.ts:116
Accessors
allowedTools
• get
allowedTools(): undefined
| string
[]
Returns
undefined
| string
[]
Inherited from
BaseSingleActionAgent.allowedTools
Defined in
langchain/src/agents/agent.ts:35
inputKeys
• get
inputKeys(): string
[]
Returns
string
[]
Overrides
BaseSingleActionAgent.inputKeys
Defined in
langchain/src/agents/agent.ts:125
returnValues
• get
returnValues(): string
[]
Returns
string
[]
Inherited from
BaseSingleActionAgent.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
BaseSingleActionAgent._agentType
Defined in
langchain/src/agents/agent.ts:42
plan
▸ 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.
Overrides
Defined in
langchain/src/agents/agent.ts:137
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
BaseSingleActionAgent.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
BaseSingleActionAgent.returnStoppedResponse
Defined in
langchain/src/agents/agent.ts:49