invoke(
self,
input: InputT | Command | None,
config: RunnableConfig| Name | Type | Description |
|---|---|---|
input* | InputT | Command | None | The input data for the graph. It can be a dictionary or any other type. |
config | RunnableConfig | None | Default: NoneThe configuration for the graph run. |
context | ContextT | None | Default: None |
stream_mode | StreamMode | Default: 'values' |
print_mode | StreamMode | Sequence[StreamMode] | Default: () |
output_keys | str | Sequence[str] | None | Default: None |
interrupt_before | All | Sequence[str] | None | Default: None |
interrupt_after | All | Sequence[str] | None | Default: None |
durability | Durability | None | Default: None |
control | RunControl | None | Default: None |
version | Literal['v1', 'v2'] | Default: 'v1' |
**kwargs | Any | Default: {} |
Run the graph with a single input and config.
The static context to use for the run.
The stream mode for the graph run.
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.
The output keys to retrieve from the graph run.
The nodes to interrupt the graph run before.
The nodes to interrupt the graph run after.
The durability mode for the graph execution, defaults to "async".
Options are:
"sync": Changes are persisted synchronously before the next step starts."async": Changes are persisted asynchronously while the next step executes."exit": Changes are persisted only when the graph exits.Optional run control used to request cooperative drain.
The streaming format version. "v1" (default) returns the
traditional format, "v2" returns StreamPart typed dicts when
stream_mode is not "values".
Additional keyword arguments to pass to the graph run.