LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
    • Overview
    • Caches
    • Callbacks
    • Documents
    • Document loaders
    • Embeddings
    • Exceptions
    • Language models
    • Serialization
    • Output parsers
    • Prompts
    • Rate limiters
    • Retrievers
    • Runnables
    • Utilities
    • Vector stores
    MCP Adapters
    Standard Tests
    Text Splitters
    ⌘I

    LangChain Assistant

    Ask a question to get started

    Enter to send•Shift+Enter new line

    Menu

    OverviewCachesCallbacksDocumentsDocument loadersEmbeddingsExceptionsLanguage modelsSerializationOutput parsersPromptsRate limitersRetrieversRunnablesUtilitiesVector stores
    MCP Adapters
    Standard Tests
    Text Splitters
    Language
    Theme
    Pythonlangchain-corerunnablesbaseRunnableastream_log
    Method●Since v0.1

    astream_log

    Copy
    astream_log(
      self,
      input: Any,
      config: RunnableConfig | None = None,
      
    View source on GitHub
    *
    ,
    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
    ]

    Parameters

    NameTypeDescription
    input*Any

    The input to the Runnable.

    configRunnableConfig | None
    Default:None

    The config to use for the Runnable.

    diffbool
    Default:True

    Whether to yield diffs between each step or the current state.

    with_streamed_output_listbool
    Default:True
    include_namesSequence[str] | None
    Default:None
    include_typesSequence[str] | None
    Default:None
    include_tagsSequence[str] | None
    Default:None
    exclude_namesSequence[str] | None
    Default:None
    exclude_typesSequence[str] | None
    Default:None
    exclude_tagsSequence[str] | None
    Default:None
    **kwargsAny
    Default:{}

    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.

    Whether to yield the streamed_output list.

    Only include logs with these names.

    Only include logs with these types.

    Only include logs with these tags.

    Exclude logs with these names.

    Exclude logs with these types.

    Exclude logs with these tags.

    Additional keyword arguments to pass to the Runnable.