base.py 909 B

1234567891011121314151617181920212223242526
  1. from typing import Optional
  2. from embedchain.helpers.json_serializable import register_deserializable
  3. @register_deserializable
  4. class BaseEmbedderConfig:
  5. def __init__(
  6. self,
  7. model: Optional[str] = None,
  8. deployment_name: Optional[str] = None,
  9. vector_dimension: Optional[int] = None,
  10. api_key: Optional[str] = None,
  11. ):
  12. """
  13. Initialize a new instance of an embedder config class.
  14. :param model: model name of the llm embedding model (not applicable to all providers), defaults to None
  15. :type model: Optional[str], optional
  16. :param deployment_name: deployment name for llm embedding model, defaults to None
  17. :type deployment_name: Optional[str], optional
  18. """
  19. self.model = model
  20. self.deployment_name = deployment_name
  21. self.vector_dimension = vector_dimension
  22. self.api_key = api_key