Replace Embedchain with Supermemory for semantic search#12
Closed
Replace Embedchain with Supermemory for semantic search#12
Conversation
This commit completely migrates from Embedchain (Python backend) to Supermemory (npm package) for semantic search and user profile features. Key Changes: - Installed supermemory package and upgraded better-sqlite3 to v12.5.0 - Added SUPERMEMORY_API_KEY environment variable - Created Supermemory client utility module (src/lib/supermemory.ts) - Replaced Embedchain API calls in /api/note/route.ts with Supermemory's add() - Replaced Embedchain API calls in /api/search/route.ts with Supermemory's search.memories() - Updated search-results.tsx to reference Supermemory instead of Embedchain New Features: - Created /api/supermemory/setup endpoint for configuring Supermemory settings - Created /api/chat endpoint with user profile support for personalized conversations - User profiles automatically extract facts from notes (static + dynamic) - Hybrid search mode searches both memories and document chunks Benefits: - No Python backend needed - direct API calls via npm package - Edge runtime compatible - Better performance with hybrid search - Automatic user profile extraction for personalized context - Comprehensive documentation in SUPERMEMORY_INTEGRATION.md
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Major changes: - Removed embedchain Python backend (replaced with Supermemory) - Removed old nottykv-cloudflare-worker directory - Created new worker/ directory with TypeScript implementation - Implemented Durable Objects for real-time note synchronization - Added Cloudflare KV-based rate limiting - Created flexible rate limiting utility (supports both CF KV and Vercel KV) - Updated API routes to use new rate limiting system Worker Features: - NotesSync Durable Object for per-user real-time sync - WebSocket support for instant updates across devices - HTTP API for note CRUD operations - Rate limiting with configurable limits per operation type - CORS enabled for cross-origin requests - Backward-compatible legacy KV endpoints Benefits: - No Python backend needed - Real-time synchronization with WebSockets - Lower costs (~$0-5/month vs ~$10-15/month) - Better performance with edge computing - Automatic conflict resolution (last-write-wins) - Scalable architecture Documentation: - worker/README.md - Worker setup and API docs - CLOUDFLARE_MIGRATION.md - Complete migration guide - SUPERMEMORY_INTEGRATION.md - Supermemory integration guide
- Migrate Durable Objects to use SQLite storage API for persistent data - Update Next.js API routes to use Durable Objects as primary storage - Add migration utility to transfer data from KV to Durable Objects - Configure wrangler.toml with proper DO bindings and SQLite support - Update .gitignore to include worker artifacts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit completely migrates from Embedchain (Python backend) to Supermemory
(npm package) for semantic search and user profile features.
Key Changes:
New Features:
Benefits: