EasyChromaDirectories
1.0.0
(ECD)是针对多模式文档嵌入的Chromadb的轻巧,麦克风优化的实现。该工具专门为快速抹布(检索型生成一代)管道构建,无缝处理文本,图像和混合媒体文档,并使用最少的设置处理。
配x 注意:依赖性和需求包装正在积极开发中。
requirements.txt中的其他依赖项.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 } " )不需要Python经验!使用这些简单命令来管理您的文档:
# 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的许可 - 有关详细信息,请参见许可证文件。
用❤️为文档处理社区建造