Interface CallAdvisorChain
- All Superinterfaces:
AdvisorChain
- All Known Subinterfaces:
BaseAdvisorChain
- All Known Implementing Classes:
DefaultAroundAdvisorChain
A chain of
CallAdvisor instances orchestrating the execution of a
ChatClientRequest on the next CallAdvisor in the chain.- Since:
- 1.0.0
- Author:
- Christian Tzolov, Dariusz Jedrzejczyk, Thomas Vitale
-
Method Summary
Modifier and TypeMethodDescriptioncopy(CallAdvisor after) Creates a new CallAdvisorChain copy that contains all advisors after the specified advisor.Returns the list of all theCallAdvisorinstances included in this chain at the time of its creation.nextCall(ChatClientRequest chatClientRequest) Invokes the nextCallAdvisorin theCallAdvisorChainwith the given request.Methods inherited from interface org.springframework.ai.chat.client.advisor.api.AdvisorChain
getObservationRegistry
-
Method Details
-
nextCall
Invokes the nextCallAdvisorin theCallAdvisorChainwith the given request. -
getCallAdvisors
List<CallAdvisor> getCallAdvisors()Returns the list of all theCallAdvisorinstances included in this chain at the time of its creation. -
copy
Creates a new CallAdvisorChain copy that contains all advisors after the specified advisor.- Parameters:
after- the CallAdvisor after which to copy the chain- Returns:
- a new CallAdvisorChain containing all advisors after the specified advisor
- Throws:
IllegalArgumentException- if the specified advisor is not part of the chain
-