LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • MCP Adapters
    • Overview
    • Agents
    • Callbacks
    • Chains
    • Chat models
    • Embeddings
    • Evaluation
    • Globals
    • Hub
    • Memory
    • Output parsers
    • Retrievers
    • Runnables
    • LangSmith
    • Storage
    Standard Tests
    Text Splitters
    ⌘I

    LangChain Assistant

    Ask a question to get started

    Enter to send•Shift+Enter new line

    Menu

    MCP Adapters
    OverviewAgentsCallbacksChainsChat modelsEmbeddingsEvaluationGlobalsHubMemoryOutput parsersRetrieversRunnablesLangSmithStorage
    Standard Tests
    Text Splitters
    Language
    Theme
    Pythonlangchain-classicagentsopenai_assistantbaseOpenAIAssistantRunnableinvoke
    Method●Since v1.0

    invoke

    Invoke assistant.

    Copy
    invoke(
      self,
      input: dict,
      config: RunnableConfig | None = None,
      **kwargs: Any = {}
    ) -> OutputType

    Parameters

    NameTypeDescription
    input*dict

    Runnable input dict that can have: content: User message when starting a new run. thread_id: Existing thread to use. run_id: Existing run to use. Should only be supplied when providing the tool output for a required action after an initial invocation. message_metadata: Metadata to associate with new message. thread_metadata: Metadata to associate with new thread. Only relevant when new thread being created. instructions: Additional run instructions. model: Override Assistant model for this run. tools: Override Assistant tools for this run. parallel_tool_calls: Allow Assistant to set parallel_tool_calls for this run. top_p: Override Assistant top_p for this run. temperature: Override Assistant temperature for this run. max_completion_tokens: Allow setting max_completion_tokens for this run. max_prompt_tokens: Allow setting max_prompt_tokens for this run. run_metadata: Metadata to associate with new run. attachments: A list of files attached to the message, and the tools they should be added to.

    configRunnableConfig | None
    Default:None

    Runnable config.

    **kwargsAny
    Default:{}

    Additional arguments.

    View source on GitHub