base.py 787 B

123456789101112131415161718192021
  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, model: Optional[str] = None, deployment_name: Optional[str] = None, api_key: Optional[str] = None
  7. ):
  8. """
  9. Initialize a new instance of an embedder config class.
  10. :param model: model name of the llm embedding model (not applicable to all providers), defaults to None
  11. :type model: Optional[str], optional
  12. :param deployment_name: deployment name for llm embedding model, defaults to None
  13. :type deployment_name: Optional[str], optional
  14. """
  15. self.model = model
  16. self.deployment_name = deployment_name
  17. self.api_key = api_key