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 (str) – The scope.
- Returns
The context scope.
- Return type
- static getter(key: Union[str, List[str]], /) ContextGet [source]¶
- Parameters
key (Union[str, List[str]]) –
- Return type
- 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]¶
- Parameters
- Return type