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[source]

Generic event handler for AsyncCallbackManager.

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

Parameters
  • handlers – The list of handlers that will handle the event

  • event_name – The name of the event (e.g., “on_llm_start”)

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

  • *args – The arguments to pass to the event handler

  • **kwargs – The keyword arguments to pass to the event handler