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的許可 - 有關詳細信息,請參見許可證文件。
用❤️為文檔處理社區建造