From 0232201b7b9f928b4f99a3780e1703e07670e6ac Mon Sep 17 00:00:00 2001 From: Sydney Runkle Date: Tue, 22 Jul 2025 13:28:27 -0400 Subject: [PATCH] improving docs for context --- libs/langgraph/langgraph/pregel/main.py | 8 ++++++++ libs/langgraph/langgraph/runtime.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/libs/langgraph/langgraph/pregel/main.py b/libs/langgraph/langgraph/pregel/main.py index 1aec1da33..a402d7cf4 100644 --- a/libs/langgraph/langgraph/pregel/main.py +++ b/libs/langgraph/langgraph/pregel/main.py @@ -2438,6 +2438,8 @@ class Pregel( Args: input: The input to the graph. config: The configuration to use for the run. + context: The static context to use for the run. + !!! version-added "Added in version 0.6.0." stream_mode: The mode to stream output, defaults to `self.stream_mode`. Options are: @@ -2694,6 +2696,8 @@ class Pregel( Args: input: The input to the graph. config: The configuration to use for the run. + context: The static context to use for the run. + !!! version-added "Added in version 0.6.0." stream_mode: The mode to stream output, defaults to `self.stream_mode`. Options are: @@ -2981,6 +2985,8 @@ class Pregel( Args: input: The input data for the graph. It can be a dictionary or any other type. config: Optional. The configuration for the graph run. + context: The static context to use for the run. + !!! version-added "Added in version 0.6.0." stream_mode: Optional[str]. The stream mode for the graph run. Default is "values". print_mode: Accepts the same values as `stream_mode`, but only prints the output to the console, for debugging purposes. Does not affect the output of the graph in any way. output_keys: Optional. The output keys to retrieve from the graph run. @@ -3058,6 +3064,8 @@ class Pregel( Args: input: The input data for the computation. It can be a dictionary or any other type. config: Optional. The configuration for the computation. + context: The static context to use for the run. + !!! version-added "Added in version 0.6.0." stream_mode: Optional. The stream mode for the computation. Default is "values". print_mode: Accepts the same values as `stream_mode`, but only prints the output to the console, for debugging purposes. Does not affect the output of the graph in any way. output_keys: Optional. The output keys to include in the result. Default is None. diff --git a/libs/langgraph/langgraph/runtime.py b/libs/langgraph/langgraph/runtime.py index c819f1d4e..b5d7cdfdd 100644 --- a/libs/langgraph/langgraph/runtime.py +++ b/libs/langgraph/langgraph/runtime.py @@ -26,7 +26,7 @@ class _RuntimeOverrides(TypedDict, Generic[ContextT], total=False): class Runtime(Generic[ContextT]): """Convenience class that bundles run-scoped context and graph configuration. - !!! version-added "Added in version 1.0.0." + !!! version-added "Added in version 0.6.0." """ context: ContextT = field(default=None) # type: ignore[assignment]