aboutsummaryrefslogtreecommitdiff
path: root/packages/tools/src/vercel/index.ts
Commit message (Collapse)AuthorAgeFilesLines
* feat: allow prompt template for @supermemory/tools package (#655)01-06-feat_allow_prompt_template_for_supermemory_tools_packageMaheshtheDev2026-01-071-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | ## Add customizable prompt templates for memory injection **Changes:** - Add `promptTemplate` option to `withSupermemory()` for full control over injected memory format (XML, custom branding, etc.) - New `MemoryPromptData` interface with `userMemories` and `generalSearchMemories` fields - Exclude `system` messages from persistence to avoid storing injected prompts - Add JSDoc comments to all public interfaces for better DevEx **Usage:** ```typescript const customPrompt = (data: MemoryPromptData) => ` <user_memories> ${data.userMemories} ${data.generalSearchMemories} </user_memories> `.trim() const model = withSupermemory(openai("gpt-4"), "user-123", { promptTemplate: customPrompt, }) ```
* feat(@supermemory/tools): vercel ai sdk compatbile with v5 and v6 (#628)12-23-feat_supermemory_tools_vercel_ai_sdk_compatbile_with_v5_and_v6MaheshtheDev2025-12-241-25/+132
|
* Support for conversations in SDKs (#618)12-15-support_for_conversationsDhravya2025-12-201-1/+4
|
* feat(tools): allow passing apiKey via options for browser support (#599)Arnab Mondal2025-12-051-5/+7
| | | Co-authored-by: Mahesh Sanikommmu <[email protected]>
* chore(@supermemory/tools): fix the documentation of withSupermemory (#601)12-03-chore_supermemory_tools_fix_the_documentation_of_withsupermemoryMaheshtheDev2025-12-031-2/+2
| | | | - small docs miss match on addMemory default option
* add props interface exportMahesh Sanikommmu2025-10-221-7/+9
|
* add conversationId functionality to map to customId in ingestion (#499)sohamd222025-10-191-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ### TL;DR Added support for conversation grouping in Supermemory middleware through a new `conversationId` parameter. ### What changed? - Added a new `conversationId` option to the `withSupermemory` function to group messages into a single document for contextual memory generation - Updated the middleware to use this conversation ID when adding memories, using a `customId` format of `conversation:{conversationId}` - Created a new `getConversationContent` function that extracts the full conversation content from the prompt parameters - Enhanced memory storage to save entire conversations rather than just the last user message - Updated documentation and examples to demonstrate the new parameter usage ### How to test? 1. Import the `withSupermemory` function from the package 2. Create a model with memory using the new `conversationId` parameter: ```typescript const modelWithMemory = withSupermemory(openai("gpt-4"), "user-123", { conversationId: "conversation-456", mode: "full", addMemory: "always" }) ``` 3. Use the model in a conversation and verify that messages are grouped by the conversation ID 4. Check that memories are being stored with the custom ID format `conversation:{conversationId}` ### Why make this change? This enhancement improves the contextual understanding of the AI by allowing related messages to be grouped together as a single conversation document. By using a conversation ID, the system can maintain coherent memory across multiple interactions within the same conversation thread, providing better context retrieval and more relevant responses.
* fix: add memory code params and documentation in readmeMahesh Sanikommmu2025-10-101-0/+1
|
* create memory adding option in vercel sdk (#484)sohamd222025-10-111-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | ### 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.
* feat: ai sdk language model withSupermemory (#446)MaheshtheDev2025-10-101-0/+59