Class ChainWorkflowAgent<Request,Response>
java.lang.Object
com.javaaidev.agenticpatterns.core.Agent
com.javaaidev.agenticpatterns.taskexecution.TaskExecutionAgent<Request,Response>
com.javaaidev.agenticpatterns.chainworkflow.ChainWorkflowAgent<Request,Response>
- Type Parameters:
Request
- Task input typeResponse
- Task output type
- All Implemented Interfaces:
Function<Request,
Response>
Chain Workflow agent, refer to doc
-
Field Summary
Fields inherited from class com.javaaidev.agenticpatterns.taskexecution.TaskExecutionAgent
responseType
Fields inherited from class com.javaaidev.agenticpatterns.core.Agent
chatClient, observationRegistry
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ChainWorkflowAgent
(org.springframework.ai.chat.client.ChatClient chatClient, @Nullable io.micrometer.observation.ObservationRegistry observationRegistry) ChainWorkflowAgent
(org.springframework.ai.chat.client.ChatClient chatClient, @Nullable Type responseType, @Nullable io.micrometer.observation.ObservationRegistry observationRegistry) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addStep
(ChainStepAgent<Request, Response> stepAgent) Add a step in the chainprotected String
Methods inherited from class com.javaaidev.agenticpatterns.taskexecution.TaskExecutionAgent
apply, getPromptContext, instrumentedCall, updateChatClientRequest
Methods inherited from class com.javaaidev.agenticpatterns.core.Agent
getName
-
Constructor Details
-
ChainWorkflowAgent
protected ChainWorkflowAgent(org.springframework.ai.chat.client.ChatClient chatClient, @Nullable io.micrometer.observation.ObservationRegistry observationRegistry) -
ChainWorkflowAgent
public ChainWorkflowAgent(org.springframework.ai.chat.client.ChatClient chatClient, @Nullable Type responseType, @Nullable io.micrometer.observation.ObservationRegistry observationRegistry)
-
-
Method Details
-
addStep
Add a step in the chain- Parameters:
stepAgent
- A step in the chain
-
call
- Overrides:
call
in classTaskExecutionAgent<Request,
Response>
-
getPromptTemplate
- Specified by:
getPromptTemplate
in classTaskExecutionAgent<Request,
Response>
-