You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: libs/langgraph/langgraph/pregel/main.py
+10-11Lines changed: 10 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -3104,31 +3104,30 @@ async def ainvoke(
3104
3104
durability: Durability|None=None,
3105
3105
**kwargs: Any,
3106
3106
) ->dict[str, Any] |Any:
3107
-
"""Asynchronously invoke the graph on a single input.
3107
+
"""Asynchronously run the graph with a single input and config.
3108
3108
3109
3109
Args:
3110
-
input: The input data for the computation. It can be a dictionary or any other type.
3111
-
config: The configuration for the computation.
3110
+
input: The input data for the graph. It can be a dictionary or any other type.
3111
+
config: The configuration for the graph run.
3112
3112
context: The static context to use for the run.
3113
3113
!!! version-added "Added in version 0.6.0"
3114
-
stream_mode: The stream mode for the computation.
3114
+
stream_mode: The stream mode for the graph run.
3115
3115
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.
3116
-
output_keys: The output keys to include in the result.
3117
-
interrupt_before: The nodes to interrupt before.
3118
-
interrupt_after: The nodes to interrupt after.
3116
+
output_keys: The output keys to retrieve from the graph run.
3117
+
interrupt_before: The nodes to interrupt the graph run before.
3118
+
interrupt_after: The nodes to interrupt the graph run after.
3119
3119
durability: The durability mode for the graph execution, defaults to `"async"`.
3120
3120
Options are:
3121
3121
3122
3122
- `"sync"`: Changes are persisted synchronously before the next step starts.
3123
3123
- `"async"`: Changes are persisted asynchronously while the next step executes.
3124
3124
- `"exit"`: Changes are persisted only when the graph exits.
3125
-
**kwargs: Additional keyword arguments.
3125
+
**kwargs: Additional keyword arguments to pass to the graph run.
3126
3126
3127
3127
Returns:
3128
-
The result of the computation. If `stream_mode` is `"values"`, it returns the latest value.
3129
-
If `stream_mode` is `"chunks"`, it returns a list of chunks.
3128
+
The output of the graph run. If `stream_mode` is `"values"`, it returns the latest output.
3129
+
If `stream_mode` is not `"values"`, it returns a list of output chunks.
0 commit comments