Home / Function/ on_custom_event() — langchain Function Reference

on_custom_event() — langchain Function Reference

Architecture documentation for the on_custom_event() function in test_dispatch_custom_event.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  a755f762_be6b_b572_cf25_0a2f3e072485["on_custom_event()"]
  c84d6c92_845a_a39a_576f_9a87cc933867["AsyncCustomCallbackHandler"]
  a755f762_be6b_b572_cf25_0a2f3e072485 -->|defined in| c84d6c92_845a_a39a_576f_9a87cc933867
  69abfcaa_2265_6f22_e92f_293002c66609["on_custom_event()"]
  69abfcaa_2265_6f22_e92f_293002c66609 -->|calls| a755f762_be6b_b572_cf25_0a2f3e072485
  69abfcaa_2265_6f22_e92f_293002c66609["on_custom_event()"]
  a755f762_be6b_b572_cf25_0a2f3e072485 -->|calls| 69abfcaa_2265_6f22_e92f_293002c66609
  style a755f762_be6b_b572_cf25_0a2f3e072485 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/callbacks/test_dispatch_custom_event.py lines 21–40

    async 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,
    ) -> None:
        assert kwargs == {}
        self.events.append(
            (
                name,
                data,
                run_id,
                tags,
                metadata,
            )
        )

Domain

Subdomains

Called By

Frequently Asked Questions

What does on_custom_event() do?
on_custom_event() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/callbacks/test_dispatch_custom_event.py.
Where is on_custom_event() defined?
on_custom_event() is defined in libs/core/tests/unit_tests/callbacks/test_dispatch_custom_event.py at line 21.
What does on_custom_event() call?
on_custom_event() calls 1 function(s): on_custom_event.
What calls on_custom_event()?
on_custom_event() is called by 1 function(s): on_custom_event.

Analyze Your Own Codebase

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

Try Supermodel Free