- Introduce AdvisedResponse to encapsulate ChatResponse and advice context
- Refactor RequestAdvisor and ResponseAdvisor interface to use AdvisedRequest/AdvisedResponse records
- Update DefaultAroundAdvisorChain to work with new advisor interfaces
- Modify DefaultChatClient to use new advisor framework
- Adjust MessageChatMemoryAdvisor for compatibility with new advisor structure
-
Update integration tests to reflect changes in advisor framework
-
Update AdvisedRequest to include adviseContext and add toPrompt() method
- Modify advisor interfaces to remove explicit context parameter
- Introduce AdvisedResponse to encapsulate ChatResponse with adviseContext
- Update DefaultChatClient to use new advisor interfaces and AdvisedResponse
- Adjust integration tests in OpenAiPaymentTransactionIT and VertexAiGeminiPaymentTransactionIT
- Refactor the RequestResponseAdvisor interface to make it a backward compatible adabror for ReqeustAdvisor and ResponseAdvisors. Aslo mark it as deprecated.
- Update various advisor implementations to work with new AdvisedRequest and AdvisedResponse
- Modify AroundAdvisorChain to use AdvisedResponse in both call and stream methods
- Implement new adviseResponse method for streaming responses in RequestResponseAdvisor
- Update MessageChatMemoryAdvisor, PromptChatMemoryAdvisor, QuestionAnswerAdvisor, SimpleLoggerAdvisor, and VectorStoreChatMemoryAdvisor to use new advisor interfaces
- Add new AdvisedResponse class to encapsulate ChatResponse with advice context
- Update CallAroundAdvisor, StreamAroundAdvisor, RequestAdvisor, and ResponseAdvisor interfaces to use AdvisedResponse and remove adviceContext parameter
- Modify CacheAroundAdvisor and SafeGuardAroundAdvisor to work with new advisor interfaces and AdvisedResponse
- Update AdvisorObservableHelper to use AdvisedResponse and remove explicit context parameter
- Refactor MessageAggregator to support aggregation of AdvisedResponse objects
- Rename extractRequestAdvisors and extractResponseAdvisors methods to requestAdvisors and responseAdvisors in AdvisorObservableHelper
- Add null checks and return empty lists for advisors in AdvisorObservableHelper
Comment From: tzolov
Replaced by #1422