Skip to content

InquireDocs/test-chroma-db

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Test Chroma DB

This is a simple project to test Chroma DB on a local environment as part of Python app.

  1. Create a Python virtual environment
virtualenv env
source env/bin/activate
  1. Update Pip and install dependencies
pip install --upgrade pip
pip install --requirement requirements.txt
  1. Use the write.py script to write to the database stored locally in a file
python write.py
  1. Use the read.py script to make a query to the database
python read.py

Expected output:

{'ids': [['id1', 'id2']], 'distances': [[0.7111213785443223, 1.010977553098025]], 'metadatas': [[{'source': 'my_source'}, {'source': 'my_source'}]], 'embeddings': None, 'documents': [['This is a document', 'This is another document']]}