fed8b2eed7
Backend release / release (push) Waiting to run
Bandit Security Scan / bandit_scan (push) Waiting to run
Build and push multi-arch DocsGPT Docker image / build (linux/amd64, ubuntu-latest, amd64) (push) Waiting to run
Build and push multi-arch DocsGPT Docker image / build (linux/arm64, ubuntu-24.04-arm, arm64) (push) Waiting to run
Build and push multi-arch DocsGPT Docker image / manifest (push) Blocked by required conditions
Build and push DocsGPT FE Docker image for development / build (linux/amd64, ubuntu-latest, amd64) (push) Waiting to run
Build and push DocsGPT FE Docker image for development / build (linux/arm64, ubuntu-24.04-arm, arm64) (push) Waiting to run
Build and push DocsGPT FE Docker image for development / manifest (push) Blocked by required conditions
Python linting / ruff (push) Waiting to run
Run python tests with pytest / Run tests and count coverage (3.12) (push) Waiting to run
React Widget Build / build (push) Waiting to run
25 lines
910 B
Python
25 lines
910 B
Python
from application.vectorstore.faiss import FaissStore
|
|
from application.vectorstore.elasticsearch import ElasticsearchStore
|
|
from application.vectorstore.milvus import MilvusStore
|
|
from application.vectorstore.mongodb import MongoDBVectorStore
|
|
from application.vectorstore.qdrant import QdrantStore
|
|
from application.vectorstore.pgvector import PGVectorStore
|
|
|
|
|
|
class VectorCreator:
|
|
vectorstores = {
|
|
"faiss": FaissStore,
|
|
"elasticsearch": ElasticsearchStore,
|
|
"mongodb": MongoDBVectorStore,
|
|
"qdrant": QdrantStore,
|
|
"milvus": MilvusStore,
|
|
"pgvector": PGVectorStore
|
|
}
|
|
|
|
@classmethod
|
|
def create_vectorstore(cls, type, *args, **kwargs):
|
|
vectorstore_class = cls.vectorstores.get(type.lower())
|
|
if not vectorstore_class:
|
|
raise ValueError(f"No vectorstore class found for type {type}")
|
|
return vectorstore_class(*args, **kwargs)
|