f3rnandomoreno / spring-ai-telegram-task-manager

A telegram task manager chatbot using openAI API
0 stars 0 forks source link

when the chatbot do a update, delete or creation then it shows again all the tasks #28

Closed f3rnandomoreno closed 2 weeks ago

f3rnandomoreno commented 2 weeks ago

When the chatbot finish to reply a user it needs not know if the reply was becuase an action like this function private String determineAction(String query) { if (query.startsWith("insert")) return "Inserción"; if (query.startsWith("update")) return "Actualización"; if (query.startsWith("delete")) return "Eliminación"; return "Operación"; } in the TaskService. So It is important to save a context of the flow of the conversation to check what was the action asked so then after do the "Inserción", "actualización" o "eliminación" we ask to the chatbot internally to "ver todas las tareas" and then it shows again all task updated.