Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions .github/workflows/docker-build-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,8 @@ jobs:
context: .
file: ${{ matrix.file }}
push: true
# tags: |
# ghcr.io/${{ github.repository_owner }}/${{ matrix.image_name }}:${{ github.sha }}
# ghcr.io/${{ github.repository_owner }}/${{ matrix.image_name }}:${{ inputs.tag }}
tags: |
ghcr.io/denispalnitsky/${{ matrix.image_name }}:${{ github.sha }}
ghcr.io/denispalnitsky/${{ matrix.image_name }}:${{ inputs.tag }}
ghcr.io/${{ github.repository_owner }}/${{ matrix.image_name }}:${{ github.sha }}
ghcr.io/${{ github.repository_owner }}/${{ matrix.image_name }}:${{ inputs.tag }}
platforms: linux/amd64,linux/arm64
target: ${{ matrix.target }}
6 changes: 5 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@ on:
tags:
- '*'

permissions:
contents: read
packages: write

jobs:
call-docker-build:
uses: ./.github/workflows/docker-build-workflow.yaml
with:
tag: ${{ github.ref_name }}
tag: ${{ github.ref_name }}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Danny Avila

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ The `ATLAS_MONGO_DB_URI` could be the same or different from what is used by Lib
}
```

Follw one of the [four documented methods](https://www.mongodb.com/docs/atlas/atlas-vector-search/create-index/#procedure) to create the vector index.
Follow one of the [four documented methods](https://www.mongodb.com/docs/atlas/atlas-vector-search/create-index/#procedure) to create the vector index.


### Cloud Installation Settings:
Expand Down
3 changes: 3 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
UnstructuredXMLLoader,
UnstructuredRSTLoader,
UnstructuredExcelLoader,
UnstructuredPowerPointLoader,
)

from models import (
Expand Down Expand Up @@ -285,6 +286,8 @@ def get_loader(filename: str, file_content_type: str, filepath: str):
loader = UnstructuredRSTLoader(filepath, mode="elements")
elif file_ext == "xml":
loader = UnstructuredXMLLoader(filepath)
elif file_ext == "pptx":
loader = UnstructuredPowerPointLoader(filepath)
elif file_ext == "md":
loader = UnstructuredMarkdownLoader(filepath)
elif file_content_type == "application/epub+zip":
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ opencv-python-headless==4.9.0.80
pymongo==4.6.3
langchain-mongodb==0.1.3
cryptography==42.0.7
python-magic==0.4.27
python-pptx==0.6.23
2 changes: 1 addition & 1 deletion store_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def get_vector_store(
elif mode == "atlas-mongo":
mongo_db = MongoClient(connection_string).get_database()
mong_collection = mongo_db[collection_name]
return AtlasMongoVector(collection=mong_collection, embedding=embeddings)
return AtlasMongoVector(collection=mong_collection, embedding=embeddings, index_name=collection_name)

else:
raise ValueError("Invalid mode specified. Choose 'sync' or 'async'.")
Expand Down