Interface RequestResponseAdvisor
- All Superinterfaces:
Advisor
,CallAroundAdvisor
,org.springframework.core.Ordered
,StreamAroundAdvisor
Deprecated.
Advisor called before and after the
ChatModel.call(Prompt)
and
ChatModel.stream(Prompt)
methods calls. The ChatClient
maintains a
chain of advisors with shared advise context.- Since:
- 1.0.0
- Author:
- Christian Tzolov
-
Field Summary
Fields inherited from interface org.springframework.ai.chat.client.advisor.api.Advisor
DEFAULT_CHAT_MEMORY_PRECEDENCE_ORDER
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Method Summary
Modifier and TypeMethodDescriptiondefault AdvisedRequest
adviseRequest
(AdvisedRequest request, Map<String, Object> adviseContext) Deprecated.default ChatResponse
adviseResponse
(ChatResponse response, Map<String, Object> adviseContext) Deprecated.default reactor.core.publisher.Flux<ChatResponse>
adviseResponse
(reactor.core.publisher.Flux<ChatResponse> fluxResponse, Map<String, Object> context) Deprecated.default AdvisedResponse
aroundCall
(AdvisedRequest advisedRequest, CallAroundAdvisorChain chain) Deprecated.Around advice that wraps the ChatModel#call(Prompt) method.default reactor.core.publisher.Flux<AdvisedResponse>
aroundStream
(AdvisedRequest advisedRequest, StreamAroundAdvisorChain chain) Deprecated.Around advice that wraps the invocation of the advised request.default String
getName()
Deprecated.Return the name of the advisor.Methods inherited from interface org.springframework.core.Ordered
getOrder
-
Method Details
-
getName
Deprecated.Description copied from interface:Advisor
Return the name of the advisor. -
adviseRequest
Deprecated. -
adviseResponse
Deprecated. -
adviseResponse
default reactor.core.publisher.Flux<ChatResponse> adviseResponse(reactor.core.publisher.Flux<ChatResponse> fluxResponse, Map<String, Object> context) Deprecated. -
aroundCall
Deprecated.Description copied from interface:CallAroundAdvisor
Around advice that wraps the ChatModel#call(Prompt) method.- Specified by:
aroundCall
in interfaceCallAroundAdvisor
- Parameters:
advisedRequest
- the advised requestchain
- the advisor chain- Returns:
- the response
-
aroundStream
default reactor.core.publisher.Flux<AdvisedResponse> aroundStream(AdvisedRequest advisedRequest, StreamAroundAdvisorChain chain) Deprecated.Description copied from interface:StreamAroundAdvisor
Around advice that wraps the invocation of the advised request.- Specified by:
aroundStream
in interfaceStreamAroundAdvisor
- Parameters:
advisedRequest
- the advised requestchain
- the chain of advisors to execute- Returns:
- the result of the advised request
-
CallAroundAdvisor
orStreamAroundAdvisor
instead.