def __init__(
        self,
        chain: Chain,
        config: dict[str, Any],
        run_mode: ChainRunMode = ChainRunMode.ASYNC,
        *args: Any,
        **kwargs: dict[str, Any],
    ) -> None:
        """Constructor method.

        Args:
            chain: A LangChain instance.
            config: A config dict.
            *args: Positional arguments to pass to the parent constructor.
            **kwargs: Keyword arguments to pass to the parent constructor.
        """
        super().__init__(*args, **kwargs)

        self.chain = chain
        self.config = config

        if run_mode not in list(ChainRunMode):
            raise ValueError(
                f"Invalid run mode '{run_mode}'. Must be one of {list(ChainRunMode)}"
            )

        self.run_mode = run_mode
Constructor method.

        Args:
            chain: A LangChain instance.
            config: A config dict.
            *args: Positional arguments to pass to the parent constructor.
            **kwargs: Keyword arguments to pass to the parent constructor.
        
lanarky/adapters/langchain/responses.py