langchain_core.tracers.context
.register_configure_hookΒΆ
- langchain_core.tracers.context.register_configure_hook(context_var: ContextVar[Optional[Any]], inheritable: bool, handle_class: Optional[Type[BaseCallbackHandler]] = None, env_var: Optional[str] = None) None [source]ΒΆ
Register a configure hook.
- Parameters
context_var (ContextVar[Optional[Any]]) β The context variable.
inheritable (bool) β Whether the context variable is inheritable.
handle_class (Optional[Type[BaseCallbackHandler]], optional) β The callback handler class. Defaults to None.
env_var (Optional[str], optional) β The environment variable. Defaults to None.
- Raises
ValueError β If env_var is set, handle_class must also be set to a non-None value.
- Return type
None