Home / Class/ RunManagerMixin Class — langchain Architecture

RunManagerMixin Class — langchain Architecture

Architecture documentation for the RunManagerMixin class in base.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  ef8e2cdf_ea22_e203_4adb_464bcbd6daca["RunManagerMixin"]
  aa78d849_32e0_cbe3_8323_1a62fafa0824["base.py"]
  ef8e2cdf_ea22_e203_4adb_464bcbd6daca -->|defined in| aa78d849_32e0_cbe3_8323_1a62fafa0824
  71c6f19e_9978_90d2_fae9_7a1ef0742e94["on_text()"]
  ef8e2cdf_ea22_e203_4adb_464bcbd6daca -->|method| 71c6f19e_9978_90d2_fae9_7a1ef0742e94
  3b22d3cb_9252_f912_3d02_3f1a3384dc37["on_retry()"]
  ef8e2cdf_ea22_e203_4adb_464bcbd6daca -->|method| 3b22d3cb_9252_f912_3d02_3f1a3384dc37
  dded4ed5_11d1_1441_bbf5_ef3638447796["on_custom_event()"]
  ef8e2cdf_ea22_e203_4adb_464bcbd6daca -->|method| dded4ed5_11d1_1441_bbf5_ef3638447796

Relationship Graph

Source Code

libs/core/langchain_core/callbacks/base.py lines 374–432

class RunManagerMixin:
    """Mixin for run manager."""

    def on_text(
        self,
        text: str,
        *,
        run_id: UUID,
        parent_run_id: UUID | None = None,
        **kwargs: Any,
    ) -> Any:
        """Run on an arbitrary text.

        Args:
            text: The text.
            run_id: The ID of the current run.
            parent_run_id: The ID of the parent run.
            **kwargs: Additional keyword arguments.
        """

    def on_retry(
        self,
        retry_state: RetryCallState,
        *,
        run_id: UUID,
        parent_run_id: UUID | None = None,
        **kwargs: Any,
    ) -> Any:
        """Run on a retry event.

        Args:
            retry_state: The retry state.
            run_id: The ID of the current run.
            parent_run_id: The ID of the parent run.
            **kwargs: Additional keyword arguments.
        """

    def on_custom_event(
        self,
        name: str,
        data: Any,
        *,
        run_id: UUID,
        tags: list[str] | None = None,
        metadata: dict[str, Any] | None = None,
        **kwargs: Any,
    ) -> Any:
        """Override to define a handler for a custom event.

        Args:
            name: The name of the custom event.
            data: The data for the custom event.

                Format will match the format specified by the user.
            run_id: The ID of the run.
            tags: The tags associated with the custom event (includes inherited tags).
            metadata: The metadata associated with the custom event (includes inherited
                metadata).
        """

Frequently Asked Questions

What is the RunManagerMixin class?
RunManagerMixin is a class in the langchain codebase, defined in libs/core/langchain_core/callbacks/base.py.
Where is RunManagerMixin defined?
RunManagerMixin is defined in libs/core/langchain_core/callbacks/base.py at line 374.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free