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-corecallbacksmanagerAsyncCallbackManagerForLLMRun
    Class●Since v0.1

    AsyncCallbackManagerForLLMRun

    Async callback manager for LLM run.

    Copy
    AsyncCallbackManagerForLLMRun(
      self,
      *,
      run_id: UUID,
      handlers: list[BaseCallbackHandler],
      inheritable_handlers: list[BaseCallbackHandler],
      parent_run_id: UUID | None = None,
      tags: list[str] | None = None,
      inheritable_tags: list[str] | None = None,
      metadata: dict[str, Any] | None = None,
      inheritable_metadata: dict[str, Any] | None = None
    )

    Bases

    AsyncRunManagerLLMManagerMixin

    Methods

    method
    get_sync

    Get the equivalent sync RunManager.

    method
    on_llm_new_token

    Run when LLM generates a new token.

    method
    on_llm_end

    Run when LLM ends running.

    method
    on_llm_error

    Run when LLM errors.

    Inherited fromAsyncRunManager

    Methods

    Mon_text
    —

    Run on an arbitrary text.

    Mon_retry
    —

    Run on retry.

    Inherited fromBaseRunManager

    Attributes

    Arun_id: UUID
    —

    A unique identifier for the model or chain run.

    Ahandlers: handlersAinheritable_handlers: inheritable_handlersAparent_run_id: UUID | None
    —

    The ID of the parent run.

    Atags: list[str] | None
    —

    Optional list of tags associated with the retriever.

    Ainheritable_tagsAmetadata: dict[str, Any] | None
    —

    Optional metadata associated with the retriever.

    Ainheritable_metadata

    Methods

    Mget_noop_manager
    —

    Return a manager that doesn't perform any operations.

    Inherited fromRunManagerMixin

    Methods

    Mon_text
    —

    Run on an arbitrary text.

    Mon_retry
    —

    Run on retry.

    Mon_custom_event
    —

    Generate a custom astream event.

    View source on GitHub