langchain_core.beta.runnables.context
.Context¶
- class langchain_core.beta.runnables.context.Context[source]¶
Context for a runnable.
Methods
__init__
()create_scope
(scope, /)Create a context scope.
getter
(key, /)setter
([_key, _value])- __init__()¶
- static create_scope(scope: str, /) PrefixContext [source]¶
Create a context scope.
- Parameters
scope – The scope.
- Returns
The context scope.
- static getter(key: Union[str, List[str]], /) ContextGet [source]¶
- static setter(_key: Optional[str] = None, _value: Optional[Union[Runnable[Input, Output], Callable[[Input], Output], Callable[[Input], Awaitable[Output]], Any]] = None, /, **kwargs: Union[Runnable[Input, Output], Callable[[Input], Output], Callable[[Input], Awaitable[Output]], Any]) ContextSet [source]¶