Class: ReActAgentWorker
ReAct agent worker.
Implements
Constructors
constructor
• new ReActAgentWorker(«destructured»
): ReActAgentWorker
Parameters
Name | Type |
---|---|
«destructured» | ReActAgentWorkerParams |
Returns
Defined in
packages/core/src/agent/react/worker.ts:72
Properties
_getTools
• _getTools: (message
: string
) => Promise
<BaseTool
[]>
Type declaration
▸ (message
): Promise
<BaseTool
[]>
Parameters
Name | Type |
---|---|
message | string |
Returns
Promise
<BaseTool
[]>
Defined in
packages/core/src/agent/react/worker.ts:70
llm
• llm: LLM
Defined in
packages/core/src/agent/react/worker.ts:63
maxInteractions
• maxInteractions: number
= 10
Defined in
packages/core/src/agent/react/worker.ts:66
outputParser
• outputParser: ReActOutputParser
Defined in
packages/core/src/agent/react/worker.ts:68
reactChatFormatter
• reactChatFormatter: ReActChatFormatter
Defined in
packages/core/src/agent/react/worker.ts:67
verbose
• verbose: boolean
Defined in
packages/core/src/agent/react/worker.ts:64
Methods
_getResponse
▸ _getResponse(currentReasoning
, sources
): AgentChatResponse
Get response.
Parameters
Name | Type | Description |
---|---|---|
currentReasoning | BaseReasoningStep [] | current reasoning steps |
sources | ToolOutput [] | tool outputs |
Returns
- agent chat response
Defined in
packages/core/src/agent/react/worker.ts:249
_getTaskStepResponse
▸ _getTaskStepResponse(agentResponse
, step
, isDone
): TaskStepOutput
Get task step response.
Parameters
Name | Type | Description |
---|---|---|
agentResponse | AgentChatResponse | agent chat response |
step | TaskStep | task step |
isDone | boolean | whether the task is done |
Returns
- task step output