Interface BaseAdvisor

All Superinterfaces:
Advisor, CallAdvisor, org.springframework.core.Ordered, StreamAdvisor
All Known Subinterfaces:
BaseChatMemoryAdvisor
All Known Implementing Classes:
MessageChatMemoryAdvisor, PromptChatMemoryAdvisor

public interface BaseAdvisor extends CallAdvisor, StreamAdvisor
Base advisor that implements common aspects of the CallAdvisor and StreamAdvisor, reducing the boilerplate code needed to implement an advisor.

It provides default implementations for the adviseCall(ChatClientRequest, CallAdvisorChain) and adviseStream(ChatClientRequest, StreamAdvisorChain) methods, delegating the actual logic to the before(ChatClientRequest, AdvisorChain advisorChain) and after(ChatClientResponse, AdvisorChain advisorChain) methods.

Since:
1.0.0
Author:
Thomas Vitale