mirror of
https://github.com/csunny/DB-GPT.git
synced 2026-08-08 23:54:27 +00:00
21 lines
506 B
Python
21 lines
506 B
Python
from abc import ABC, abstractmethod
|
|
|
|
|
|
class VectorStoreBase(ABC):
|
|
"""base class for vector store database"""
|
|
|
|
@abstractmethod
|
|
def load_document(self, documents) -> None:
|
|
"""load document in vector database."""
|
|
pass
|
|
|
|
@abstractmethod
|
|
def similar_search(self, text, topk) -> None:
|
|
"""similar search in vector database."""
|
|
pass
|
|
|
|
@abstractmethod
|
|
def vector_name_exists(self, text, topk) -> None:
|
|
"""is vector store name exist."""
|
|
pass
|