Class: ReActAgentWorker
ReAct agent worker.
Implements
AgentWorker
<ChatParams
>
Constructors
constructor
• new ReActAgentWorker(«destructured»
): ReActAgentWorker
Parameters
Name | Type |
---|---|
«destructured» | ReActAgentWorkerParams |
Returns
Defined in
packages/core/src/agent/react/worker.ts:70
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:68
llm
• llm: LLM
<Record
<string
, unknown
>, Record
<string
, unknown
>>
Defined in
packages/core/src/agent/react/worker.ts:62
maxInteractions
• maxInteractions: number
= 10
Defined in
packages/core/src/agent/react/worker.ts:64
outputParser
• outputParser: ReActOutputParser
Defined in
packages/core/src/agent/react/worker.ts:66
reactChatFormatter
• reactChatFormatter: ReActChatFormatter
Defined in
packages/core/src/agent/react/worker.ts:65
Methods
_getResponse
▸ _getResponse(currentReasoning
, sources
): AgentChatResponse
Parameters
Name | Type |
---|---|
currentReasoning | BaseReasoningStep [] |
sources | ToolOutput [] |
Returns
Defined in
packages/core/src/agent/react/worker.ts:221
_getTaskStepResponse
▸ _getTaskStepResponse(agentResponse
, step
, isDone
): TaskStepOutput
Parameters
Name | Type |
---|---|
agentResponse | AgentChatResponse |
step | TaskStep |
isDone | boolean |
Returns
Defined in
packages/core/src/agent/react/worker.ts:244
_processActions
▸ _processActions(task
, tools
, output
, isStreaming?
): Promise
<[BaseReasoningStep
[], boolean
]>