Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autogen mongodb atlas #1

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
28a009b
+mdb atlas
Jun 22, 2024
383168e
Update test/agentchat/contrib/vectordb/test_mongodb.py
ranfysvalle02 Jun 22, 2024
f531568
update test_mongodb.py; we dont need to do the assert .collection_nam…
Jun 22, 2024
a1c385c
Try fix mongodb service
thinkall Jun 22, 2024
bb1a183
Try fix mongodb service
thinkall Jun 22, 2024
1e30425
Update username and password
thinkall Jun 22, 2024
1d6dbaf
Merge branch 'main' into main
thinkall Jun 22, 2024
e0f3c59
Update autogen/agentchat/contrib/vectordb/mongodb.py
thinkall Jun 22, 2024
d6a1162
closer --- but im not super thrilled about the solution...
Jun 23, 2024
334cc25
Merge branch 'main' into main
thinkall Jun 24, 2024
de48057
PYTHON-4506 Expanded tests and simplified vector search pipelines
caseyclements Jun 24, 2024
f5e5fdf
Merge branch 'main' into pull/3000
ranfysvalle02 Jun 24, 2024
6245c30
Merge pull request #1 from caseyclements/pull/3000
ranfysvalle02 Jun 24, 2024
a367426
Update mongodb.py
ranfysvalle02 Jun 24, 2024
ffa3e38
Update mongodb.py - Casey
ranfysvalle02 Jun 24, 2024
d741ef6
Merge branch 'main' into main
ranfysvalle02 Jun 27, 2024
d2fbd02
Merge branch 'main' into main
ranfysvalle02 Jun 30, 2024
3646d1e
search_index_magic
Jun 30, 2024
3e0ac8e
Fix format
thinkall Jun 30, 2024
95e2f79
Fix tests
thinkall Jun 30, 2024
64a157c
hacking trying to figure this out
Jul 1, 2024
17d02d1
Merge branch 'main' of https://github.com/ranfysvalle02/autogen
Jul 1, 2024
6cfb689
Merge branch 'main' into main
thinkall Jul 2, 2024
66e46e8
Merge branch 'main' into main
thinkall Jul 2, 2024
7405463
Streamline checks for indexes in construction and restructure tests
Jibola Jul 18, 2024
7d778fe
Add tests for score_threshold, embedding inclusion, and multiple quer…
Jibola Jul 18, 2024
e1cb53b
Merge branch 'main' into autogen-mongodb-atlas
Jibola Jul 18, 2024
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: 7 additions & 0 deletions .github/workflows/contrib-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ jobs:
--health-retries 5
ports:
- 5432:5432
mongodb:
image: mongodb/mongodb-atlas-local:latest
ports:
- 27017:27017
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -104,6 +108,9 @@ jobs:
- name: Install pgvector when on linux
run: |
pip install -e .[retrievechat-pgvector]
- name: Install mongodb when on linux
run: |
pip install -e .[retrievechat-mongodb]
- name: Install unstructured when python-version is 3.9 and on linux
if: matrix.python-version == '3.9'
run: |
Expand Down
12 changes: 10 additions & 2 deletions autogen/agentchat/contrib/vectordb/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@ def get_docs_by_ids(
ids: List[ItemID] | A list of document ids. If None, will return all the documents. Default is None.
collection_name: str | The name of the collection. Default is None.
include: List[str] | The fields to include. Default is None.
If None, will include ["metadatas", "documents"], ids will always be included.
If None, will include ["metadatas", "documents"], ids will always be included. This may differ
depending on the implementation.
kwargs: dict | Additional keyword arguments.

Returns:
Expand All @@ -200,7 +201,8 @@ class VectorDBFactory:
Factory class for creating vector databases.
"""

PREDEFINED_VECTOR_DB = ["chroma", "pgvector", "qdrant"]

PREDEFINED_VECTOR_DB = ["chroma", "pgvector", "mongodb", "qdrant"]

@staticmethod
def create_vector_db(db_type: str, **kwargs) -> VectorDB:
Expand All @@ -222,6 +224,12 @@ def create_vector_db(db_type: str, **kwargs) -> VectorDB:
from .pgvectordb import PGVectorDB

return PGVectorDB(**kwargs)

if db_type.lower() in ["mdb", "mongodb", "atlas"]:
from .mongodb import MongoDBAtlasVectorDB

return MongoDBAtlasVectorDB(**kwargs)

if db_type.lower() in ["qdrant", "qdrantdb"]:
from .qdrant import QdrantVectorDB

Expand Down
Loading
Loading