base.py 1.1 KB

1234567891011121314151617181920212223242526272829
  1. from typing import Optional
  2. from embedchain.config.base_config import BaseConfig
  3. class BaseVectorDbConfig(BaseConfig):
  4. def __init__(
  5. self,
  6. collection_name: Optional[str] = None,
  7. dir: str = "db",
  8. host: Optional[str] = None,
  9. port: Optional[str] = None,
  10. ):
  11. """
  12. Initializes a configuration class instance for the vector database.
  13. :param collection_name: Default name for the collection, defaults to None
  14. :type collection_name: Optional[str], optional
  15. :param dir: Path to the database directory, where the database is stored, defaults to "db"
  16. :type dir: str, optional
  17. :param host: Database connection remote host. Use this if you run Embedchain as a client, defaults to None
  18. :type host: Optional[str], optional
  19. :param host: Database connection remote port. Use this if you run Embedchain as a client, defaults to None
  20. :type port: Optional[str], optional
  21. """
  22. self.collection_name = collection_name or "embedchain_store"
  23. self.dir = dir
  24. self.host = host
  25. self.port = port