diff options
| author | sohamd22 <[email protected]> | 2025-10-11 03:45:06 +0000 |
|---|---|---|
| committer | sohamd22 <[email protected]> | 2025-10-11 03:45:06 +0000 |
| commit | 91a2aa5fdb9a5308eb0f2bffc35aebcf186f18db (patch) | |
| tree | 214b180e73bc7e75195289a076160212d496668c /apps/docs/memory-api/track-progress.mdx | |
| parent | Merge pull request #475 from Mikethebot44/feature/add-memory-dialog-ux (diff) | |
| download | supermemory-91a2aa5fdb9a5308eb0f2bffc35aebcf186f18db.tar.xz supermemory-91a2aa5fdb9a5308eb0f2bffc35aebcf186f18db.zip | |
create memory adding option in vercel sdk (#484)
### TL;DR
Added support for automatically saving user messages to Supermemory.
### What changed?
- Added a new `addMemory` option to `wrapVercelLanguageModel` that accepts either "always" or "never" (defaults to "never")
- Implemented the `addMemoryTool` function to save user messages to Supermemory
- Modified the middleware to check the `addMemory` setting and save the last user message when appropriate
- Initialized the Supermemory client in the middleware to enable memory storage
### How to test?
1. Set the `SUPERMEMORY_API_KEY` environment variable
2. Use the `wrapVercelLanguageModel` function with the new `addMemory: "always"` option
3. Send a user message through the model
4. Verify that the message is saved to Supermemory with the specified container tag
### Why make this change?
This change enables automatic memory creation from user messages, which improves the system's ability to build a knowledge base without requiring explicit memory creation calls. This is particularly useful for applications that want to automatically capture and store user interactions for future reference.
Diffstat (limited to 'apps/docs/memory-api/track-progress.mdx')
0 files changed, 0 insertions, 0 deletions