Commit graph

27 commits

Author SHA1 Message Date
Dhravya Shah
2f8bafac4e update quickstart 2025-11-27 09:53:11 -07:00
Shoubhit Dash
7b0baea0f2
add support for responses api in openai typescript sdk (#549) 2025-11-07 07:39:44 -07:00
MaheshtheDev
97071502a7 feat(@supermemory/tools): capture assitant responses with filtered memory (#539)
### Added streaming support to the Supermemory middleware and improved memory handling in the AI SDK integration.

### What changed?

- Refactored the middleware architecture to support both streaming and non-streaming responses
- Extracted memory prompt functionality into a separate module (`memory-prompt.ts`)
- Added memory saving capability for streaming responses
- Improved the formatting of memory content with a "User Supermemories:" prefix
- Added utility function to filter out supermemories from content
- Created a new streaming example in the test app with a dedicated route and page
- Updated version from 1.3.0 to 1.3.1 in package.json
- Simplified installation instructions in [README.m](http://README.md)d
2025-10-28 22:28:22 +00:00
MaheshtheDev
9d7f1edbfb fix: openai sdk packaging issue (#532) 2025-10-27 20:40:51 +00:00
MaheshtheDev
b3aab91489 feat: withSupermemory for openai sdk (#531)
### TL;DR

Added OpenAI SDK middleware support for SuperMemory integration, allowing direct memory injection without AI SDK dependency.

### What changed?

- Added `withSupermemory` middleware for OpenAI SDK that automatically injects relevant memories into chat completions
- Implemented memory search and injection functionality for OpenAI clients
- Restructured the OpenAI module to separate tools and middleware functionality
- Updated README with comprehensive documentation and examples for the new OpenAI middleware
- Added test implementation with a Next.js API route example
- Reorganized package exports to support the new structure
2025-10-27 20:08:11 +00:00
Mahesh Sanikommmu
4f2d839412 chat app withSupermemory test 2025-10-22 14:00:59 -07:00
Mahesh Sanikommmu
5fb33743b3 add props interface export 2025-10-22 12:31:54 -07:00
Shoubhit Dash
8436229cbb add comment 2025-10-22 23:00:08 +05:30
Shoubhit Dash
4365fbd2a2 add test 2025-10-22 22:58:32 +05:30
Shoubhit Dash
5612380dc2 fix prompt mutation in vercel middleware 2025-10-22 22:43:09 +05:30
Mahesh Sanikommmu
de6a1aef9c fix(tools): update the docs for conversational 2025-10-19 18:21:48 -07:00
sohamd22
79f3059b2a add conversationId functionality to map to customId in ingestion (#499)
### 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.
2025-10-19 22:24:00 +00:00
Mahesh Sanikommmu
3e47d9ee53 fix: side effect removal 2025-10-10 21:13:21 -07:00
Mahesh Sanikommmu
d8874e8c17 fix: add memory code params and documentation in readme 2025-10-10 21:06:52 -07:00
sohamd22
91a2aa5fdb 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.
2025-10-11 03:45:06 +00:00
MaheshtheDev
35ac9e086b feat: ai sdk language model withSupermemory (#446) 2025-10-10 05:10:03 +00:00
Dhravya Shah
1e2657cf5c
Revert "test(ai-sdk): streamText and generateText for ai sdk" (#466) 2025-10-08 15:56:03 -07:00
Mahesh Sanikommu
77b6e2b8dc
test(ai-sdk): streamText and generateText for ai sdk (#451) 2025-10-08 15:55:42 -07:00
Dhravya Shah
4d6fd37c99 fix: model names 2025-10-03 02:41:49 -07:00
Dhravya Shah
c65f4e97ac fix: docs 2025-10-03 02:37:30 -07:00
Dhravya Shah
698bd0e1cd fix: tools files 2025-10-02 17:09:27 -07:00
Dhravya Shah
5c57578573 feat: Add memory vs rag and migration section to docs 2025-10-01 18:11:37 -07:00
Dhravya Shah
53bc296155 feat: Claude memory integration 2025-09-29 13:40:56 -07:00
Dhravya Shah
3d2d3ae35c bump version 2025-09-24 21:48:56 -07:00
Dhravya Shah
90fd19f215 update: Readme 2025-09-13 22:09:40 -07:00
CodeWithShreyans
101f3817bd
feat: openai python sdk (#409) 2025-09-03 21:48:36 +00:00
CodeWithShreyans
cae7051d1a
feat: new tools package (#407)
Some checks failed
Publish AI SDK / publish (push) Has been cancelled
2025-09-02 23:11:19 +00:00