langchain_core.callbacks.manager
.handle_event¶
- langchain_core.callbacks.manager.handle_event(handlers: List[BaseCallbackHandler], event_name: str, ignore_condition_name: Optional[str], *args: Any, **kwargs: Any) None [source]¶
Generic event handler for CallbackManager.
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