base_vector_db.py 379 B

12345678910111213
  1. class BaseVectorDB:
  2. """Base class for vector database."""
  3. def __init__(self):
  4. self.client = self._get_or_create_db()
  5. self.collection = self._get_or_create_collection()
  6. def _get_or_create_db(self):
  7. """Get or create the database."""
  8. raise NotImplementedError
  9. def _get_or_create_collection(self):
  10. raise NotImplementedError