AOSSIE-Org / AOSSIE-Org/BabyNest
BUG: Backend: Agent Handlers Cause Stale Context by Not Updating Cache
- 主要言語
- JavaScript
- スター
- 56
- フォーク
- 124
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
### 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
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。