langchain.js
    Preparing search index...

    Interface ChatXAIResponsesCallOptions

    Call options for ChatXAIResponses.

    interface ChatXAIResponsesCallOptions {
        include?: "reasoning.encrypted_content"[];
        parallel_tool_calls?: boolean;
        previous_response_id?: string;
        reasoning?: XAIResponsesReasoning;
        search_parameters?: XAIResponsesSearchParameters;
        text?: XAIResponsesText;
        tool_choice?: XAIResponsesToolChoice;
        tools?: XAIResponsesTool[];
    }

    Hierarchy (View Summary)

    Index

    Properties

    include?: "reasoning.encrypted_content"[]

    Specify additional output data to include in the model response.

    parallel_tool_calls?: boolean

    Whether to allow the model to run parallel tool calls.

    previous_response_id?: string

    The unique ID of the previous response to the model. Use this to create multi-turn conversations.

    Reasoning configuration for reasoning models.

    search_parameters?: XAIResponsesSearchParameters

    Search parameters for xAI's search capabilities.

    Configuration options for a text response from the model.

    Controls which tool is called by the model.

    A list of tools the model may call. Includes built-in tools (web_search, x_search, code_interpreter, file_search) and custom function tools.

    import { tools } from "@langchain/xai";

    const result = await llm.invoke("What's happening on X?", {
    tools: [tools.xaiWebSearch(), tools.xaiXSearch()],
    });