AppConfig.py 929 B

123456789101112131415161718192021222324252627
  1. from typing import Optional
  2. from embedchain.helper_classes.json_serializable import register_deserializable
  3. from .BaseAppConfig import BaseAppConfig
  4. @register_deserializable
  5. class AppConfig(BaseAppConfig):
  6. """
  7. Config to initialize an embedchain custom `App` instance, with extra config options.
  8. """
  9. def __init__(
  10. self,
  11. log_level=None,
  12. id=None,
  13. collect_metrics: Optional[bool] = None,
  14. collection_name: Optional[str] = None,
  15. ):
  16. """
  17. :param log_level: Optional. (String) Debug level
  18. ['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'].
  19. :param id: Optional. ID of the app. Document metadata will have this id.
  20. :param collect_metrics: Defaults to True. Send anonymous telemetry to improve embedchain.
  21. """
  22. super().__init__(log_level=log_level, id=id, collect_metrics=collect_metrics, collection_name=collection_name)