Stream all output from a Runnable, as reported to the callback system.
This includes all inner runs of LLMs, Retrievers, Tools, etc.
Output is streamed as Log objects, which include a list of Jsonpatch ops that describe how the state of the run has changed in each step, and the final state of the run.
The Jsonpatch ops can be applied in order to construct state.
astream_log(
self,
input: Any,
config: RunnableConfig | None = None,
*,
diff: bool = True,
with_streamed_output_list: bool = True,
include_names: Sequence[str] | None = None,
include_types: Sequence[str] | None = None,
include_tags: Sequence[str] | None = None,
exclude_names: Sequence[str] | None = None,
exclude_types: Sequence[str] | None = None,
exclude_tags: Sequence[str] | None = None,
**kwargs: Any = {}
) -> AsyncIterator[RunLogPatch] | AsyncIterator[RunLog]| Name | Type | Description |
|---|---|---|
input* | Any | The input to the |
config | RunnableConfig | None | Default: NoneThe config to use for the |
diff | bool | Default: TrueWhether to yield diffs between each step or the current state. |
with_streamed_output_list | bool | Default: TrueWhether to yield the |
include_names | Sequence[str] | None | Default: NoneOnly include logs with these names. |
include_types | Sequence[str] | None | Default: NoneOnly include logs with these types. |
include_tags | Sequence[str] | None | Default: NoneOnly include logs with these tags. |
exclude_names | Sequence[str] | None | Default: NoneExclude logs with these names. |
exclude_types | Sequence[str] | None | Default: NoneExclude logs with these types. |
exclude_tags | Sequence[str] | None | Default: NoneExclude logs with these tags. |
**kwargs | Any | Default: {}Additional keyword arguments to pass to the |