Skip to content

Commit

Permalink
[FEATURE] tools enhanced by AOP support
Browse files Browse the repository at this point in the history
  • Loading branch information
catofdestruction committed Nov 22, 2024
1 parent 0a9b022 commit a803860
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,17 @@ void should_create_AI_service_with_tool_which_is_enhanced_by_spring_aop() {

// when
String answer = aiService.chat("Which package is the @ToolObserver annotation located in? " +
"And what is the key of the @ToolObserver annotation?");
"And what is the key of the @ToolObserver annotation?" +
"And What is the current time?");

System.out.println("Answer: " + answer);

// then should use AopEnhancedTools.getAspectPackage()
// & AopEnhancedTools.getToolObserverKey()
// & PackagePrivateTools.getCurrentTime()
assertThat(answer).contains(TOOL_OBSERVER_PACKAGE_NAME);
assertThat(answer).contains(TOOL_OBSERVER_KEY);
assertThat(answer).contains(String.valueOf(CURRENT_TIME.getMinute()));

// and AOP aspect should be called
// & only for getToolObserverKey() which is annotated with @ToolObserver
Expand Down

0 comments on commit a803860

Please sign in to comment.