(ECD) представляет собой легкую, оптимизированную MAC реализацию ChromADB, предназначенную для мультимодальных документов. Построенный специально для трубопроводов Fast Rag (извлеченные авторские работы), этот инструмент плавно обрабатывает текст, изображения и документы смешанных средств с минимальной установкой.
️ Примечание . Зависимости и требования упаковки находятся в активной разработке.
requirements.txt # Install Xcode Command Line Tools
xcode-select --install
# Install Homebrew
/bin/bash -c " $( curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh ) "git clone https://github.com/yourusername/EasyChromaDirectories.git
cd EasyChromaDirectories
pip install -r requirements.txt? Уведомление о разработке : Управление пакетами и разрешение зависимости активно улучшается. Некоторая ручная настройка может потребоваться.
from easychromadb import DocumentEncoder
encoder = DocumentEncoder ( collection_name = "assets" ) # Process a single document
encoder . process_file ( "path/to/document.txt" )
# Process an entire directory
encoder . process_directory ( "path/to/documents/" ) results = encoder . query ( "your search query here" )
for result in results :
print ( f"Document: { result . name } " )
print ( f"Similarity: { result . score } " )Опыт питона не требуется! Используйте эти простые команды для управления вашими документами:
# Process a directory of documents
python Chromav4_Encode_documents.py your_directory/
# Example:
python Chromav4_Encode_documents.py assets_ChromaDB_Vec/ # List all documents in the collection
python Chromav4_Encode_documents.py your_directory/ --list
# Example output:
# Collection: assets
# Total Documents: 6
# +-----+----------------+--------+---------------+
# | # | ID | Type | Name |
# +=====+================+========+===============+
# | 1 | txt_0_2288d1ca | TEXT | doc1.txt |
# | 2 | txt_1_c2ecec13 | TEXT | doc2.txt |
# ... # Search with a query and specify number of results
python Chromav4_Encode_documents.py your_directory/ --query " your search query " --n_results 2
# Example:
python Chromav4_Encode_documents.py assets_ChromaDB_Vec/ --query " Why is the sky blue? " --n_results 2 # Partial word matching
python Chromav4_Encode_documents.py your_directory/ --query " Who's the _____ uncle " --n_results 1
# Image and text combined search
python Chromav4_Encode_documents.py your_directory/ --query " Find similar images and text about nature "CLI будет автоматически:
Проект включает в себя комплексные тесты, охватывающие:
Запустите тесты, используя:
pytest test_Chromav4_Encode_documents.pyВзносы приветствуются! Пожалуйста, следуйте этим шагам:
git checkout -b feature/amazing-feature )git commit -m 'Add amazing feature' )git push origin feature/amazing-feature )Этот проект лицензирован по лицензии Apache 2.0 - см. Файл лицензии для получения подробной информации.
Построен с ❤ для сообщества обработки документов