Skip to content

Conversation

@tzolov
Copy link
Contributor

@tzolov tzolov commented Sep 26, 2024

  • Replace RequestAdvisor and ResponseAdvisor with CallAroundAdvisor and StreamAroundAdvisor
  • Update AbstractChatMemoryAdvisor to implement new advisor interfaces
  • Modify DefaultChatClient to use new advisor chain approach
  • Deprecate RequestResponseAdvisor in favor of new advisor types
  • Introduce AdvisedRequest and AdvisedResponse classes for better encapsulation
  • Introduce AdvisedResponse class to encapsulate ChatResponse and advice context
  • Update AdvisedRequest to include adviseContext and add toPrompt() method
  • Remove AdvisorObservableHelper class
  • Update MessageAggregator to support AdvisedResponse
  • Refactor ChatClientAdvisorTests and add new AdvisorsTests
  • Update observation conventions and context handling in advisors
  • Improve type safety and consistency in advisor implementations
  • Update integration tests to reflect new advisor structure
  • Refactor DefaultAroundAdvisorChain for better ordering and observation
  • Update MessageChatMemoryAdvisor to use new AroundAdvisor interface
  • Revise PromptChatMemoryAdvisor for compatibility with new advisor chain
  • Refactor QuestionAnswerAdvisor to implement CallAroundAdvisor and StreamAroundAdvisor
  • Move and update SafeGuardAroundAdvisor for consistency
  • Enhance SimpleLoggerAdvisor with new AroundAdvisor capabilities
  • Modify VectorStoreChatMemoryAdvisor to use new advisor interfaces
  • Remove CacheAroundAdvisor (functionality likely moved elsewhere)
  • Make CallAroundAdvisor and StreamAroundAdvisor extend Ordered interface

@tzolov tzolov added this to the 1.0.0-M3 milestone Sep 26, 2024
@tzolov tzolov marked this pull request as ready for review September 27, 2024 12:57
@tzolov tzolov changed the title [WIP] Refactor advisor architecture in Spring AI Refactor advisor architecture in Spring AI Sep 27, 2024
@tzolov tzolov force-pushed the inline-advised-response-fluxed-3 branch 3 times, most recently from b879dbc to c171dd4 Compare September 30, 2024 08:11
@markpollack markpollack self-assigned this Sep 30, 2024
tzolov and others added 20 commits October 1, 2024 11:26
 - Replace RequestAdvisor and ResponseAdvisor with CallAroundAdvisor and StreamAroundAdvisor
 - Update AbstractChatMemoryAdvisor to implement new advisor interfaces
 - Modify DefaultChatClient to use new advisor chain approach
 - Deprecate RequestResponseAdvisor in favor of new advisor types
 - Introduce AdvisedRequest and AdvisedResponse classes for better encapsulation
 - Introduce AdvisedResponse class to encapsulate ChatResponse and advice context
 - Update AdvisedRequest to include adviseContext and add toPrompt() method
 - Remove AdvisorObservableHelper class
 - Update MessageAggregator to support AdvisedResponse
 - Refactor ChatClientAdvisorTests and add new AdvisorsTests
 - Update observation conventions and context handling in advisors
 - Improve type safety and consistency in advisor implementations
 - Update integration tests to reflect new advisor structure
 - Refactor DefaultAroundAdvisorChain for better ordering and observation
 - Update MessageChatMemoryAdvisor to use new AroundAdvisor interface
 - Revise PromptChatMemoryAdvisor for compatibility with new advisor chain
 - Refactor QuestionAnswerAdvisor to implement CallAroundAdvisor and StreamAroundAdvisor
 - Move and update SafeGuardAroundAdvisor for consistency
 - Enhance SimpleLoggerAdvisor with new AroundAdvisor capabilities
 - Modify VectorStoreChatMemoryAdvisor to use new advisor interfaces
 - Remove CacheAroundAdvisor (functionality likely moved elsewhere)
 - Make CallAroundAdvisor and StreamAroundAdvisor extend Ordered interface
…ndAdvisorChain

 - Refactor DefaultChatClient to use a builder pattern for advisor chain construction
 - Update DefaultAroundAdvisorChain to separate call and stream advisors
 - Improve advisor ordering and management in DefaultAroundAdvisorChain.Builder
 - Enhance AdvisorsTests to verify correct advisor execution order
 - Remove redundant reordering logic from DefaultAroundAdvisorChain
 - Introduce Advisor constants for precedence ordering
 - Update AbstractChatMemoryAdvisor to use new precedence constant
 - Enhance advisors documentation with order explanation and Re2 example
 - Add (experimental) Re2 advisor to enhance reasoning capabilities of LLMs
 - Add disabled Re2 test in OpenAiChatClientIT
 - Introduce 'order' field to track advisor position in chain
 - Update AdvisorObservationDocumentation with ADVISOR_ORDER
 - Modify DefaultAdvisorObservationConvention to include order in high cardinality key values
 - Update tests to reflect new order field and AROUND advisor type
@tzolov tzolov force-pushed the inline-advised-response-fluxed-3 branch from 033ccd4 to c659223 Compare October 1, 2024 09:32
@markpollack
Copy link
Member

did minor code clean up and added more into the docs along with some edits.

merged in 6fc76b7

@markpollack markpollack closed this Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants