feat(vectordb): Milvus vector db Integration (#1996)

* integrate Milvus into Private GPT

* adjust milvus settings

* update doc info and reformat

* adjust milvus initialization

* adjust import error

* mionr update

* adjust format

* adjust the db storing path

* update doc
This commit is contained in:
Jackson 2024-07-18 16:55:45 +08:00 committed by GitHub
parent 4523a30c8f
commit 43cc31f740
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 173 additions and 6 deletions

82
poetry.lock generated
View file

@ -1,4 +1,4 @@
# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand.
# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand.
[[package]]
name = "aiofiles"
@ -1182,6 +1182,27 @@ files = [
dnspython = ">=2.0.0"
idna = ">=2.0.0"
[[package]]
name = "environs"
version = "9.5.0"
description = "simplified environment variable parsing"
optional = true
python-versions = ">=3.6"
files = [
{file = "environs-9.5.0-py2.py3-none-any.whl", hash = "sha256:1e549569a3de49c05f856f40bce86979e7d5ffbbc4398e7f338574c220189124"},
{file = "environs-9.5.0.tar.gz", hash = "sha256:a76307b36fbe856bdca7ee9161e6c466fd7fcffc297109a118c59b54e27e30c9"},
]
[package.dependencies]
marshmallow = ">=3.0.0"
python-dotenv = "*"
[package.extras]
dev = ["dj-database-url", "dj-email-url", "django-cache-url", "flake8 (==4.0.1)", "flake8-bugbear (==21.9.2)", "mypy (==0.910)", "pre-commit (>=2.4,<3.0)", "pytest", "tox"]
django = ["dj-database-url", "dj-email-url", "django-cache-url"]
lint = ["flake8 (==4.0.1)", "flake8-bugbear (==21.9.2)", "mypy (==0.910)", "pre-commit (>=2.4,<3.0)"]
tests = ["dj-database-url", "dj-email-url", "django-cache-url", "pytest"]
[[package]]
name = "fastapi"
version = "0.111.0"
@ -2735,6 +2756,21 @@ files = [
clickhouse-connect = ">=0.7.0,<0.8.0"
llama-index-core = ">=0.10.5,<0.11.0"
[[package]]
name = "llama-index-vector-stores-milvus"
version = "0.1.20"
description = "llama-index vector_stores milvus integration"
optional = true
python-versions = "<4.0,>=3.8.1"
files = [
{file = "llama_index_vector_stores_milvus-0.1.20-py3-none-any.whl", hash = "sha256:27a61fd237e67b648f36964c2e25275df4cb20dd740d111f0b75db477259ef5b"},
{file = "llama_index_vector_stores_milvus-0.1.20.tar.gz", hash = "sha256:461bccce036be7bb739e57eb3855f64557c506023febfc08f98899778d460602"},
]
[package.dependencies]
llama-index-core = ">=0.10.1,<0.11.0"
pymilvus = ">=2.3.6,<3.0.0"
[[package]]
name = "llama-index-vector-stores-postgres"
version = "0.1.11"
@ -2991,6 +3027,22 @@ files = [
{file = "mdurl-0.1.2.tar.gz", hash = "sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba"},
]
[[package]]
name = "milvus-lite"
version = "2.4.8"
description = "A lightweight version of Milvus wrapped with Python."
optional = true
python-versions = ">=3.7"
files = [
{file = "milvus_lite-2.4.8-py3-none-macosx_10_9_x86_64.whl", hash = "sha256:b7e90b34b214884cd44cdc112ab243d4cb197b775498355e2437b6cafea025fe"},
{file = "milvus_lite-2.4.8-py3-none-macosx_11_0_arm64.whl", hash = "sha256:519dfc62709d8f642d98a1c5b1dcde7080d107e6e312d677fef5a3412a40ac08"},
{file = "milvus_lite-2.4.8-py3-none-manylinux2014_aarch64.whl", hash = "sha256:b21f36d24cbb0e920b4faad607019bb28c1b2c88b4d04680ac8c7697a4ae8a4d"},
{file = "milvus_lite-2.4.8-py3-none-manylinux2014_x86_64.whl", hash = "sha256:08332a2b9abfe7c4e1d7926068937e46f8fb81f2707928b7bc02c9dc99cebe41"},
]
[package.dependencies]
tqdm = "*"
[[package]]
name = "minijinja"
version = "2.0.1"
@ -4578,6 +4630,31 @@ dev = ["coverage[toml] (==5.0.4)", "cryptography (>=3.4.0)", "pre-commit", "pyte
docs = ["sphinx (>=4.5.0,<5.0.0)", "sphinx-rtd-theme", "zope.interface"]
tests = ["coverage[toml] (==5.0.4)", "pytest (>=6.0.0,<7.0.0)"]
[[package]]
name = "pymilvus"
version = "2.4.4"
description = "Python Sdk for Milvus"
optional = true
python-versions = ">=3.8"
files = [
{file = "pymilvus-2.4.4-py3-none-any.whl", hash = "sha256:073b76bc36f6f4e70f0f0a0023a53324f0ba8ef9a60883f87cd30a44b6c6f2b5"},
{file = "pymilvus-2.4.4.tar.gz", hash = "sha256:50c53eb103e034fbffe936fe942751ea3dbd2452e18cf79acc52360ed4987fb7"},
]
[package.dependencies]
environs = "<=9.5.0"
grpcio = ">=1.49.1,<=1.63.0"
milvus-lite = {version = ">=2.4.0,<2.5.0", markers = "sys_platform != \"win32\""}
pandas = ">=1.2.4"
protobuf = ">=3.20.0"
setuptools = ">=67"
ujson = ">=2.0.0"
[package.extras]
bulk-writer = ["azure-storage-blob", "minio (>=7.0.0)", "pyarrow (>=12.0.0)", "requests"]
dev = ["black", "grpcio (==1.62.2)", "grpcio-testing (==1.62.2)", "grpcio-tools (==1.62.2)", "pytest (>=5.3.4)", "pytest-cov (>=2.8.1)", "pytest-timeout (>=1.3.4)", "ruff (>0.4.0)"]
model = ["milvus-model (>=0.1.0)"]
[[package]]
name = "pyparsing"
version = "3.1.1"
@ -6777,10 +6854,11 @@ storage-nodestore-postgres = ["asyncpg", "llama-index-storage-docstore-postgres"
ui = ["gradio"]
vector-stores-chroma = ["llama-index-vector-stores-chroma"]
vector-stores-clickhouse = ["clickhouse-connect", "llama-index-vector-stores-clickhouse"]
vector-stores-milvus = ["llama-index-vector-stores-milvus"]
vector-stores-postgres = ["llama-index-vector-stores-postgres"]
vector-stores-qdrant = ["llama-index-vector-stores-qdrant"]
[metadata]
lock-version = "2.0"
python-versions = ">=3.11,<3.12"
content-hash = "5a2ffe28c38fe59d64fcbf2094b804da8e3f784dc42e1926eb7bd8bcd9dc6056"
content-hash = "5e916cce1a7805965795dbaee0e2d24612e54305af4b1936d6bc1fa469b8012f"