Skip to content

diskflip/memory-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Memory API

API that extracts important details from text, stores them as vector embeddings, and retrieves them with semantic search.

Use Cases

  • Add long-term memory to any chatbot
  • Query memories with natural language

Quick Start

git clone https://github.com/diskflip/memory-api.git
cd memory-api
python -m venv venv
source venv/bin/activate
pip install requests
python demo.py

Installation

git clone https://github.com/diskflip/memory-api.git
cd memory-api
python3 -m venv venv

Activate virtual environment:

  • macOS/Linux: source venv/bin/activate
  • Windows: venv\Scripts\activate
pip install -r requirements.txt

Configuration

Rename .env.example to .env and add your keys.

Run

fastapi dev app/main.py

API docs: https://jwi5433-memory-api.hf.space/docs

Using Other Providers

This setup uses Gemini for embeddings and Supabase for vector storage, but you can swap them:

Embeddings: Replace create_embedding() in app/main.py with any embedding API. Match the dimensionality in your database (default 1536).

Database: Replace the Supabase calls with any vector database.

About

Microservice that stores and retrieves important chat memories

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages