Chainlit_binder

This module contains functionality related to the the chainlit_binder module for common.bootstrap.configuration.pipeline.augmentation.chainlit.

Chainlit_binder

ChainlitBinder

Bases: BaseBinder

Binder for the Chainlit service and feedback service.

Source code in src/common/bootstrap/configuration/pipeline/augmentation/chainlit/chainlit_binder.py
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
class ChainlitBinder(BaseBinder):
    """Binder for the Chainlit service and feedback service."""

    def bind(self) -> None:
        """Bind components to the injector based on the configuration."""
        self._bind_feedback_service()
        self._bind_service()

    def _bind_feedback_service(self) -> None:
        """Bind the Chainlit feedback service."""
        self.binder.bind(
            ChainlitFeedbackService,
            to=ChainlitFeedbackServiceBuilder.build,
        )

    def _bind_service(self) -> None:
        """Bind the Chainlit service."""
        self.binder.bind(
            ChainlitService,
            to=ChainlitServiceBuilder.build,
        )

bind()

Bind components to the injector based on the configuration.

Source code in src/common/bootstrap/configuration/pipeline/augmentation/chainlit/chainlit_binder.py
13
14
15
16
def bind(self) -> None:
    """Bind components to the injector based on the configuration."""
    self._bind_feedback_service()
    self._bind_service()