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_ORDERFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Method Summary
Modifier and TypeMethodDescriptiondefault AdvisedRequestadviseRequest(AdvisedRequest request, Map<String, Object> adviseContext) Deprecated.default ChatResponseadviseResponse(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 AdvisedResponsearoundCall(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 StringgetName()Deprecated.Return the name of the advisor.Methods inherited from interface org.springframework.core.Ordered
getOrder
-
Method Details
-
getName
Deprecated.Description copied from interface:AdvisorReturn 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:CallAroundAdvisorAround advice that wraps the ChatModel#call(Prompt) method.- Specified by:
aroundCallin 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:StreamAroundAdvisorAround advice that wraps the invocation of the advised request.- Specified by:
aroundStreamin interfaceStreamAroundAdvisor- Parameters:
advisedRequest- the advised requestchain- the chain of advisors to execute- Returns:
- the result of the advised request
-
CallAroundAdvisororStreamAroundAdvisorinstead.