EasyChromaDirectories
1.0.0
(ECD)는 멀티 모달 문서 임베딩을 위해 설계된 가벼운 MAC에서 최적화 된 ChromADB 구현입니다. Fast Rag (검색 세대 생성) 파이프 라인을 위해 특별히 구축 된이 도구는 최소한의 설정으로 텍스트, 이미지 및 혼합 미디어 문서를 완벽하게 처리합니다.
켈 참고 : 종속성 및 요구 사항 포장은 활발한 개발 중입니다.
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 } " )파이썬 경험이 필요하지 않습니다! 이 간단한 명령을 사용하여 문서를 관리하십시오.
# 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에 따라 라이센스가 부여됩니다. 자세한 내용은 라이센스 파일을 참조하십시오.
문서 처리 커뮤니티를 위해 ❤️로 구축되었습니다