improving docs for context

This commit is contained in:
Sydney Runkle
2025-07-22 13:28:27 -04:00
parent cb918601d1
commit 0232201b7b
2 changed files with 9 additions and 1 deletions
+8
View File
@@ -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.
+1 -1
View File
@@ -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]