AOSSIE-Org / AOSSIE-Org/BabyNest
BUG: Backend: Agent Handlers Cause Stale Context by Not Updating Cache
- Ngôn ngữ chính
- JavaScript
- Star
- 56
- Fork
- 124
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
### Is there an existing issue for this?
- [x] I have searched the existing issues
### What happened?
## 📌 Issue Overview
When a user updates their data (weight, symptoms, appointments) using natural language chat (via the Agent), the changes are committed to the database, but the Agent's context cache is not updated. This results in the Agent having "stale" knowledge of the user's state until the cache expires or the server restarts.
## 🔍 Steps to Reproduce
1. Send a POST request to `/agent` with the query: "Log my weight as 95kg".
2. Immediately send a follow-up POST request to `/agent` what is my current weight
## 🎯 Expected Behavior
The Agent should respond referencing the newly logged weight of 95kg.
## 🚨 Actual Behavior
The Agent responds using the old weight (from the previous cache state), ignoring the update just made.
## 📷 Screenshot
## 💡 Suggested Improvements
Update the handlers in handlers folder to trigger a cache update upon successful database insertion.
### Record
- [x] I agree to follow this project's Code of Conduct
- [x] I want to work on this issue
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.