mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-11 20:05:19 +00:00
feat: add starter config for s3 vector
This commit is contained in:
parent
2470da8336
commit
d9f2b6b14e
4 changed files with 2238 additions and 2495 deletions
|
|
@ -1933,6 +1933,10 @@ PINECONE_DIMENSION = int(os.getenv("PINECONE_DIMENSION", 1536)) # or 3072, 1024
|
||||||
PINECONE_METRIC = os.getenv("PINECONE_METRIC", "cosine")
|
PINECONE_METRIC = os.getenv("PINECONE_METRIC", "cosine")
|
||||||
PINECONE_CLOUD = os.getenv("PINECONE_CLOUD", "aws") # or "gcp" or "azure"
|
PINECONE_CLOUD = os.getenv("PINECONE_CLOUD", "aws") # or "gcp" or "azure"
|
||||||
|
|
||||||
|
# S3 Vector
|
||||||
|
S3_VECTOR_BUCKET_NAME = os.environ.get("S3_VECTOR_BUCKET_NAME", None)
|
||||||
|
S3_VECTOR_REGION = os.environ.get("S3_VECTOR_REGION", None)
|
||||||
|
|
||||||
####################################
|
####################################
|
||||||
# Information Retrieval (RAG)
|
# Information Retrieval (RAG)
|
||||||
####################################
|
####################################
|
||||||
|
|
|
||||||
|
|
@ -28,8 +28,10 @@ class Vector:
|
||||||
return QdrantClient()
|
return QdrantClient()
|
||||||
case VectorType.PINECONE:
|
case VectorType.PINECONE:
|
||||||
from open_webui.retrieval.vector.dbs.pinecone import PineconeClient
|
from open_webui.retrieval.vector.dbs.pinecone import PineconeClient
|
||||||
|
|
||||||
return PineconeClient()
|
return PineconeClient()
|
||||||
|
case VectorType.S3VECTOR:
|
||||||
|
from open_webui.retrieval.vector.s3.s3vector import S3VectorClient
|
||||||
|
return S3VectorClient()
|
||||||
case VectorType.OPENSEARCH:
|
case VectorType.OPENSEARCH:
|
||||||
from open_webui.retrieval.vector.dbs.opensearch import OpenSearchClient
|
from open_webui.retrieval.vector.dbs.opensearch import OpenSearchClient
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,3 +9,4 @@ class VectorType(StrEnum):
|
||||||
ELASTICSEARCH = "elasticsearch"
|
ELASTICSEARCH = "elasticsearch"
|
||||||
OPENSEARCH = "opensearch"
|
OPENSEARCH = "opensearch"
|
||||||
PGVECTOR = "pgvector"
|
PGVECTOR = "pgvector"
|
||||||
|
S3VECTOR = "s3vector"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue