langchain_core.runnables.utils.accepts_context¶

langchain_core.runnables.utils.accepts_context(callable: Callable[[...], Any]) bool[source]¶

Check if a callable accepts a context argument.

Parameters

callable (Callable[[...], Any]) – The callable to check.

Returns

True if the callable accepts a context argument, False otherwise.

Return type

bool