LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
    • Overview
    • Caches
    • Callbacks
    • Documents
    • Document loaders
    • Embeddings
    • Exceptions
    • Language models
    • Serialization
    • Output parsers
    • Prompts
    • Rate limiters
    • Retrievers
    • Runnables
    • Utilities
    • Vector stores
    MCP Adapters
    Standard Tests
    Text Splitters
    ⌘I

    LangChain Assistant

    Ask a question to get started

    Enter to send•Shift+Enter new line

    Menu

    OverviewCachesCallbacksDocumentsDocument loadersEmbeddingsExceptionsLanguage modelsSerializationOutput parsersPromptsRate limitersRetrieversRunnablesUtilitiesVector stores
    MCP Adapters
    Standard Tests
    Text Splitters
    Language
    Theme
    Pythonlangchain-corecallbacksmanagerhandle_event
    Function●Since v0.1

    handle_event

    Generic event handler for CallbackManager.

    Copy
    handle_event(
      handlers: list[BaseCallbackHandler],
      event_name: str,
      ignore_condition_name: str | None,
      *args: Any = (),
      **kwargs: Any = {}
    ) -> None

    Parameters

    NameTypeDescription
    handlers*list[BaseCallbackHandler]

    The list of handlers that will handle the event.

    event_name*str

    The name of the event (e.g., 'on_llm_start').

    ignore_condition_name*str | None

    Name of the attribute defined on handler that if True will cause the handler to be skipped for the given event.

    *argsAny
    Default:()

    The arguments to pass to the event handler.

    **kwargsAny
    Default:{}

    The keyword arguments to pass to the event handler

    View source on GitHub