Toggle Menu
Prev Up Next

# `langchain_core.callbacks.manager`.ahandle_event

async langchain_core.callbacks.manager.ahandle_event(handlers: List[BaseCallbackHandler], event_name: str, ignore_condition_name: Optional[str], *args: Any, **kwargs: Any) → None

  Generic event handler for AsyncCallbackManager.

  Note: This function is used by langserve to handle events.

  Parameters

    - 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 (Optional[str]) – Name of the attribute defined on handler that if True will cause the handler to be skipped for the given event

    - *args (Any) – The arguments to pass to the event handler

    - **kwargs (Any) – The keyword arguments to pass to the event handler

  Return type

    None