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

    Chat LangChain

    What can I help with?

    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 v1.8

    handle_event

    Copy
    handle_event(
      handlers: list[BaseCallbackHandler],
      event_name: str,
      ignore_condition_name: str 
    View source on GitHub
    |
    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:()
    **kwargsAny
    Default:{}

    Generic event handler for CallbackManager.

    The arguments to pass to the event handler.

    The keyword arguments to pass to the event handler