This pull request enhances the user personalization and testing capabilities of the telegramtaskaiagent project. The changes include adding user name handling in SQL generation, improving the response format, and updating the tests to reflect these changes.
This pull request enhances the user personalization and testing capabilities of the
telegramtaskaiagent
project. The changes include adding user name handling in SQL generation, improving the response format, and updating the tests to reflect these changes.User Personalization Enhancements:
src/main/java/com/fmoreno/telegramtaskaiagent/agents/ManagerAgent.java
: Updated thebuildPrompt
method to include personalized greetings and instructions using the user's name.src/main/java/com/fmoreno/telegramtaskaiagent/agents/NL2SQLAgent.java
: Modified theprocessNaturalLanguageToSQL
method to accept auserName
parameter and include it in the generated prompt. [1] [2]src/main/java/com/fmoreno/telegramtaskaiagent/client/TelegramClientConfig.java
: Updated theconsume
method to extract the user's name from the message and pass it to theprocessNaturalLanguageToSQL
method. [1] [2] [3]Testing Improvements:
src/test/java/com/fmoreno/telegramtaskaiagent/agents/ManagerAgentTestIT.java
: Updated various test cases to include theuserName
parameter and added new test cases to validate personalized responses and task ID inclusion. [1] [2] [3] [4] [5] [6]src/test/java/com/fmoreno/telegramtaskaiagent/agents/NL2SQLAgentTestIT.java
: Modified test cases to useassertThat
from AssertJ for better assertions and updated them to include theuserName
parameter.