Class DefaultAroundAdvisorChain
java.lang.Object
org.springframework.ai.chat.client.advisor.DefaultAroundAdvisorChain
- All Implemented Interfaces:
AdvisorChain,BaseAdvisorChain,CallAdvisorChain,StreamAdvisorChain
Default implementation for the
BaseAdvisorChain. Used by the
ChatClient to delegate the call to the next
CallAdvisor or StreamAdvisor in the chain.- Since:
- 1.0.0
- Author:
- Christian Tzolov, Dariusz Jedrzejczyk, Thomas Vitale
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbuilder(io.micrometer.observation.ObservationRegistry observationRegistry) Returns the list of all theCallAdvisorinstances included in this chain at the time of its creation.io.micrometer.observation.ObservationRegistryReturns the list of all theStreamAdvisorinstances included in this chain at the time of its creation.nextCall(ChatClientRequest chatClientRequest) Invokes the nextCallAdvisorin theCallAdvisorChainwith the given request.reactor.core.publisher.Flux<ChatClientResponse>nextStream(ChatClientRequest chatClientRequest) Invokes the nextStreamAdvisorin theStreamAdvisorChainwith the given request.
-
Field Details
-
DEFAULT_OBSERVATION_CONVENTION
-
-
Method Details
-
builder
public static DefaultAroundAdvisorChain.Builder builder(io.micrometer.observation.ObservationRegistry observationRegistry) -
nextCall
Description copied from interface:CallAdvisorChainInvokes the nextCallAdvisorin theCallAdvisorChainwith the given request.- Specified by:
nextCallin interfaceCallAdvisorChain
-
nextStream
public reactor.core.publisher.Flux<ChatClientResponse> nextStream(ChatClientRequest chatClientRequest) Description copied from interface:StreamAdvisorChainInvokes the nextStreamAdvisorin theStreamAdvisorChainwith the given request.- Specified by:
nextStreamin interfaceStreamAdvisorChain
-
getCallAdvisors
Description copied from interface:CallAdvisorChainReturns the list of all theCallAdvisorinstances included in this chain at the time of its creation.- Specified by:
getCallAdvisorsin interfaceCallAdvisorChain
-
getStreamAdvisors
Description copied from interface:StreamAdvisorChainReturns the list of all theStreamAdvisorinstances included in this chain at the time of its creation.- Specified by:
getStreamAdvisorsin interfaceStreamAdvisorChain
-
getObservationRegistry
public io.micrometer.observation.ObservationRegistry getObservationRegistry()- Specified by:
getObservationRegistryin interfaceAdvisorChain
-