This document outlines how Omi creates and stores embeddings for memories.
utils/memories/process_memory.py
when:
process_memory
function calls upsert_vector
in database/vector_db.py
database/vector_db.py
passes the Memory object to utils/llm.py
utils/llm.py
extracts the structured
field from the Memory objectField | Description |
---|---|
title | Memory title |
overview | Brief summary |
emoji | Representative emoji |
category | Memory category |
action_items | List of action items |
events | List of related events |
generate_embedding
function in utils/llm.py
:
database/vector_db.py
creates a metadata dictionary:Field | Description |
---|---|
memory_id | Unique ID of the memory |
uid | User ID associated with the memory |
created_at | Timestamp of embedding creation |
database/vector_db.py
:
text-embedding-3-large
modelquery_vectors
function in database/vector_db.py
retrieves memory IDs based on query embedding and filter criteria