@langchain/xai 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/{chat_models.cjs → chat_models/completions.cjs} +6 -6
  3. package/dist/chat_models/completions.cjs.map +1 -0
  4. package/dist/{chat_models.d.cts → chat_models/completions.d.cts} +4 -4
  5. package/dist/chat_models/completions.d.cts.map +1 -0
  6. package/dist/{chat_models.d.ts → chat_models/completions.d.ts} +6 -6
  7. package/dist/chat_models/completions.d.ts.map +1 -0
  8. package/dist/{chat_models.js → chat_models/completions.js} +5 -5
  9. package/dist/chat_models/completions.js.map +1 -0
  10. package/dist/chat_models/index.cjs +2 -0
  11. package/dist/chat_models/index.d.ts +3 -0
  12. package/dist/chat_models/index.js +2 -0
  13. package/dist/chat_models/responses-types.d.cts +1148 -0
  14. package/dist/chat_models/responses-types.d.cts.map +1 -0
  15. package/dist/chat_models/responses-types.d.ts +1148 -0
  16. package/dist/chat_models/responses-types.d.ts.map +1 -0
  17. package/dist/chat_models/responses.cjs +228 -0
  18. package/dist/chat_models/responses.cjs.map +1 -0
  19. package/dist/chat_models/responses.d.cts +69 -0
  20. package/dist/chat_models/responses.d.cts.map +1 -0
  21. package/dist/chat_models/responses.d.ts +69 -0
  22. package/dist/chat_models/responses.d.ts.map +1 -0
  23. package/dist/chat_models/responses.js +227 -0
  24. package/dist/chat_models/responses.js.map +1 -0
  25. package/dist/converters/responses.cjs +168 -0
  26. package/dist/converters/responses.cjs.map +1 -0
  27. package/dist/converters/responses.js +164 -0
  28. package/dist/converters/responses.js.map +1 -0
  29. package/dist/index.cjs +8 -5
  30. package/dist/index.d.cts +4 -2
  31. package/dist/index.d.ts +5 -2
  32. package/dist/index.js +4 -2
  33. package/dist/live_search.cjs.map +1 -1
  34. package/dist/live_search.js.map +1 -1
  35. package/package.json +6 -7
  36. package/dist/chat_models.cjs.map +0 -1
  37. package/dist/chat_models.d.cts.map +0 -1
  38. package/dist/chat_models.d.ts.map +0 -1
  39. package/dist/chat_models.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"responses-types.d.ts","names":["XAIResponsesInputTextItem","XAIResponsesInputImageItem","XAIResponsesInputFileItem","XAIResponsesInputContentItem","XAIResponsesFunctionToolCall","XAIResponsesWebSearchToolCall","XAIResponsesCodeInterpreterToolCall","XAIResponsesMcpToolCall","XAIResponsesToolCall","XAIResponsesLogprobToken","XAIResponsesLogprobContent","XAIResponsesLogprobs","XAIResponsesPreviousResponse","XAIResponsesFunctionToolOutput","XAIResponsesToolOutput","XAIResponsesMessageRole","XAIResponsesMessage","XAIResponsesInputItem","XAIResponsesInput","XAIResponsesReasoningEffort","XAIResponsesReasoningSummary","XAIResponsesReasoning","XAIResponsesSearchSourceX","XAIResponsesSearchSourceWeb","XAIResponsesSearchSourceRss","XAIResponsesSearchSource","XAIResponsesSearchMode","XAIResponsesSearchParameters","XAIResponsesTextFormatText","XAIResponsesTextFormatJsonObject","XAIResponsesTextFormatJsonSchema","Record","XAIResponsesTextFormat","XAIResponsesText","XAIResponsesFunctionToolFunction","XAIResponsesFunctionTool","XAIResponsesWebSearchTool","XAIResponsesXSearchTool","XAIResponsesFileSearchTool","XAIResponsesCodeInterpreterTool","XAIResponsesMcpTool","XAIResponsesTool","XAIResponsesToolChoiceString","XAIResponsesToolChoiceFunction","XAIResponsesToolChoice","XAIResponsesInclude","XAIResponsesCreateParams","XAIResponsesCreateParamsStreaming","XAIResponsesCreateParamsNonStreaming","XAIResponsesStatus","XAIResponsesObjectType","XAIResponsesOutputTextItem","XAIResponsesOutputContent","XAIResponsesOutputTextContent","XAIResponsesAnnotation","XAIResponsesOutputRefusalContent","XAIResponsesUrlCitationAnnotation","XAIResponsesFileCitationAnnotation","XAIResponsesOutputFunctionCall","XAIResponsesOutputWebSearchCall","XAIResponsesOutputFileSearchCall","XAIResponsesFileSearchResult","XAIResponsesOutputCodeInterpreterCall","XAIResponsesCodeInterpreterResult","XAIResponsesOutputMcpCall","XAIResponsesOutputReasoning","XAIResponsesReasoningSummaryItem","XAIResponsesOutputItem","XAIResponsesUsage","XAIResponsesIncompleteReason","XAIResponsesIncompleteDetails","XAIResponsesDebugOutput","XAIResponsesReasoningResponse","XAIResponse","XAIResponsesStreamEventBase","XAIResponsesStreamEventCreated","XAIResponsesStreamEventInProgress","XAIResponsesStreamEventCompleted","XAIResponsesStreamEventFailed","XAIResponsesStreamEventIncomplete","XAIResponsesStreamEventOutputItemAdded","XAIResponsesStreamEventOutputItemDone","XAIResponsesStreamEventContentPartAdded","XAIResponsesStreamEventContentPartDone","XAIResponsesStreamEventTextDelta","XAIResponsesStreamEventTextDone","XAIResponsesStreamEventFunctionCallArgumentsDelta","XAIResponsesStreamEventFunctionCallArgumentsDone","XAIResponsesStreamEventReasoningSummaryTextDelta","XAIResponsesStreamEventReasoningSummaryTextDone","XAIResponsesStreamEventError","XAIResponsesStreamEvent","BaseChatModelCallOptions","BaseChatModelParams","ChatXAIResponsesCallOptions","ChatXAIResponsesInput","ChatXAIResponsesInvocationParams","Omit"],"sources":["../../src/chat_models/responses-types.d.ts"],"sourcesContent":["/**\n * Text input content item.\n */\nexport interface XAIResponsesInputTextItem {\n type: \"input_text\";\n /** The text content. */\n text: string;\n}\n/**\n * Image input content item.\n * Note: Storing/fetching images is not fully supported.\n */\nexport interface XAIResponsesInputImageItem {\n type: \"input_image\";\n /** Public URL of the image. */\n image_url: string;\n /** Image detail level. */\n detail?: \"high\" | \"low\" | \"auto\";\n}\n/**\n * File input content item.\n */\nexport interface XAIResponsesInputFileItem {\n type: \"input_file\";\n /** File ID from the Files API. */\n file_id: string;\n}\n/**\n * Union type for all input content items.\n */\nexport type XAIResponsesInputContentItem = XAIResponsesInputTextItem | XAIResponsesInputImageItem | XAIResponsesInputFileItem;\n/**\n * Function tool call from a previous response.\n */\nexport interface XAIResponsesFunctionToolCall {\n type: \"function_call\";\n /** The ID of the tool call. */\n id: string;\n /** The ID of the tool call (alias). */\n call_id?: string;\n /** The name of the function. */\n name: string;\n /** The arguments to the function as a JSON string. */\n arguments: string;\n}\n/**\n * Web search tool call from a previous response.\n */\nexport interface XAIResponsesWebSearchToolCall {\n type: \"web_search_call\";\n /** The ID of the tool call. */\n id: string;\n /** The search status. */\n status?: \"in_progress\" | \"searching\" | \"completed\" | \"failed\";\n}\n/**\n * Code interpreter tool call from a previous response.\n */\nexport interface XAIResponsesCodeInterpreterToolCall {\n type: \"code_interpreter_call\";\n /** The ID of the tool call. */\n id: string;\n /** The code to execute. */\n code?: string;\n /** The status of the code interpreter. */\n status?: \"in_progress\" | \"interpreting\" | \"completed\" | \"failed\";\n}\n/**\n * MCP tool call from a previous response.\n */\nexport interface XAIResponsesMcpToolCall {\n type: \"mcp_call\";\n /** The ID of the tool call. */\n id: string;\n /** The MCP server URL. */\n server_url?: string;\n /** The MCP server label. */\n server_label?: string;\n}\n/**\n * Union type for all tool calls from previous responses.\n */\nexport type XAIResponsesToolCall = XAIResponsesFunctionToolCall | XAIResponsesWebSearchToolCall | XAIResponsesCodeInterpreterToolCall | XAIResponsesMcpToolCall;\n/**\n * Log probability information for a token.\n */\nexport interface XAIResponsesLogprobToken {\n /** The token string. */\n token: string;\n /** The log probability of the token. */\n logprob: number;\n /** The bytes representation of the token. */\n bytes?: number[];\n}\n/**\n * Log probability content item.\n */\nexport interface XAIResponsesLogprobContent {\n /** The token. */\n token: string;\n /** The log probability. */\n logprob: number;\n /** The bytes representation. */\n bytes?: number[];\n /** Top log probabilities at this position. */\n top_logprobs?: XAIResponsesLogprobToken[];\n}\n/**\n * Log probabilities from a previous response.\n */\nexport interface XAIResponsesLogprobs {\n /** Log probability content. */\n content?: XAIResponsesLogprobContent[];\n}\n/**\n * Previous response structure that can be included in the input array.\n * Used for multi-turn conversations with assistant outputs.\n */\nexport interface XAIResponsesPreviousResponse {\n /** The type identifier for previous response. */\n type: \"message\";\n /** The role for previous assistant responses. */\n role: \"assistant\";\n /** The text output from the previous response. */\n text?: string;\n /** Refusal message if the model refused to respond. */\n refusal?: string;\n /** Tool calls made in the previous response. */\n tool_calls?: XAIResponsesToolCall[];\n /** Log probabilities from the previous response. */\n logprobs?: XAIResponsesLogprobs;\n}\n/**\n * Function tool call output to provide results back to the model.\n */\nexport interface XAIResponsesFunctionToolOutput {\n type: \"function_call_output\";\n /** The ID of the tool call this output is for. */\n call_id: string;\n /** The output/result of the function call. */\n output: string;\n}\n/**\n * Union type for tool outputs that can be included in input.\n */\nexport type XAIResponsesToolOutput = XAIResponsesFunctionToolOutput;\n/**\n * Message role types.\n */\nexport type XAIResponsesMessageRole = \"user\" | \"assistant\" | \"system\" | \"developer\";\n/**\n * Message input to the model.\n */\nexport interface XAIResponsesMessage {\n /** The role of the message author. */\n role: XAIResponsesMessageRole;\n /** Text, image, or audio input. Can be a string or array of content items. */\n content: string | XAIResponsesInputContentItem[];\n /** Unique identifier for the end-user. Only for `user` messages. */\n name?: string;\n}\n/**\n * Union type for all items that can appear in the input array.\n * Includes messages, previous responses, and tool outputs.\n */\nexport type XAIResponsesInputItem = XAIResponsesMessage | XAIResponsesPreviousResponse | XAIResponsesToolOutput;\n/**\n * Input type - can be a string or array of input items.\n * The array can contain messages, previous responses, and tool outputs.\n */\nexport type XAIResponsesInput = string | XAIResponsesInputItem[];\n/**\n * Reasoning effort level.\n */\nexport type XAIResponsesReasoningEffort = \"low\" | \"medium\" | \"high\";\n/**\n * Reasoning summary style.\n */\nexport type XAIResponsesReasoningSummary = \"auto\" | \"concise\" | \"detailed\";\n/**\n * Reasoning configuration for reasoning models.\n */\nexport interface XAIResponsesReasoning {\n /** The effort level for reasoning. Defaults to `medium`. */\n effort?: XAIResponsesReasoningEffort;\n /** The summary style for reasoning output. */\n summary?: XAIResponsesReasoningSummary;\n}\n/**\n * X (Twitter) search source configuration.\n */\nexport interface XAIResponsesSearchSourceX {\n type: \"x\";\n /** X handles to include in search. */\n included_x_handles?: string[];\n /** X handles to exclude from search. */\n excluded_x_handles?: string[];\n /** Minimum favorite count for posts. */\n post_favorite_count?: number;\n /** Minimum view count for posts. */\n post_view_count?: number;\n}\n/**\n * Web search source configuration.\n */\nexport interface XAIResponsesSearchSourceWeb {\n type: \"web\";\n /** Whitelist of allowed websites (max 5). */\n allowed_websites?: string[];\n /** Blacklist of excluded websites (max 5). */\n excluded_websites?: string[];\n /** ISO alpha-2 country code. */\n country?: string;\n /** Whether to enable safe search. Defaults to `true`. */\n safe_search?: boolean;\n}\n/**\n * RSS/News search source configuration.\n */\nexport interface XAIResponsesSearchSourceRss {\n type: \"rss\";\n /** Links of RSS feeds. */\n links?: string[];\n}\n/**\n * Union type for all search sources.\n */\nexport type XAIResponsesSearchSource = XAIResponsesSearchSourceX | XAIResponsesSearchSourceWeb | XAIResponsesSearchSourceRss;\n/**\n * Search mode options.\n */\nexport type XAIResponsesSearchMode = \"off\" | \"on\" | \"auto\";\n/**\n * Search parameters configuration.\n * Takes precedence over `web_search_preview` tool.\n */\nexport interface XAIResponsesSearchParameters {\n /** Start date for search results (ISO-8601 YYYY-MM-DD). */\n from_date?: string;\n /** End date for search results (ISO-8601 YYYY-MM-DD). */\n to_date?: string;\n /** Maximum number of search results. Defaults to 15 (range: 1-30). */\n max_search_results?: number;\n /** Search mode. Defaults to `on`. */\n mode?: XAIResponsesSearchMode;\n /** Whether to return citations. Defaults to `true`. */\n return_citations?: boolean;\n /** List of search sources. If empty, searches web and X. */\n sources?: XAIResponsesSearchSource[];\n}\n/**\n * Plain text format.\n */\nexport interface XAIResponsesTextFormatText {\n type: \"text\";\n}\n/**\n * JSON object format.\n */\nexport interface XAIResponsesTextFormatJsonObject {\n type: \"json_object\";\n}\n/**\n * JSON schema format.\n */\nexport interface XAIResponsesTextFormatJsonSchema {\n type: \"json_schema\";\n /** JSON schema definition. */\n schema: Record<string, unknown>;\n /** Compatibility field for strict mode. */\n strict?: boolean;\n}\n/**\n * Union type for all text response formats.\n */\nexport type XAIResponsesTextFormat = XAIResponsesTextFormatText | XAIResponsesTextFormatJsonObject | XAIResponsesTextFormatJsonSchema;\n/**\n * Text response configuration.\n */\nexport interface XAIResponsesText {\n /** The format for text response. */\n format?: XAIResponsesTextFormat;\n}\n/**\n * Function tool parameters using JSON Schema.\n */\nexport interface XAIResponsesFunctionToolFunction {\n /** The name of the function. */\n name: string;\n /** A description of what the function does. */\n description?: string;\n /** The parameters the function accepts, described as a JSON Schema object. */\n parameters: Record<string, unknown>;\n}\n/**\n * Function tool definition.\n */\nexport interface XAIResponsesFunctionTool {\n type: \"function\";\n /** The function definition. */\n function: XAIResponsesFunctionToolFunction;\n}\n/**\n * Web search tool definition.\n * Compatibility fields (search_context_size, user_location, filters) are rejected if set.\n */\nexport interface XAIResponsesWebSearchTool {\n type: \"web_search\";\n /** @deprecated Rejected if set. */\n search_context_size?: never;\n /** @deprecated Rejected if set. */\n user_location?: never;\n /** @deprecated Rejected if set. */\n filters?: never;\n}\n/**\n * X search tool definition.\n */\nexport interface XAIResponsesXSearchTool {\n type: \"x_search\";\n /** X handles to allow in search. */\n allowed_x_handles?: string[];\n /** X handles to exclude from search. */\n excluded_x_handles?: string[];\n /** Whether to enable image understanding. */\n enable_image_understanding?: boolean;\n /** Whether to enable video understanding. */\n enable_video_understanding?: boolean;\n /** Start date for search (ISO-8601). */\n from_date?: string;\n /** End date for search (ISO-8601). */\n to_date?: string;\n}\n/**\n * File search tool definition.\n */\nexport interface XAIResponsesFileSearchTool {\n type: \"file_search\";\n /** List of vector store IDs to search. */\n vector_store_ids?: string[];\n}\n/**\n * Code interpreter tool definition.\n */\nexport interface XAIResponsesCodeInterpreterTool {\n type: \"code_interpreter\";\n}\n/**\n * MCP (Model Context Protocol) tool definition.\n */\nexport interface XAIResponsesMcpTool {\n type: \"mcp\";\n /** The URL of the MCP server. */\n server_url: string;\n /** The label for the MCP server. */\n server_label: string;\n}\n/**\n * Union type for all tool definitions.\n */\nexport type XAIResponsesTool = XAIResponsesFunctionTool | XAIResponsesWebSearchTool | XAIResponsesXSearchTool | XAIResponsesFileSearchTool | XAIResponsesCodeInterpreterTool | XAIResponsesMcpTool;\n/**\n * String tool choice options.\n */\nexport type XAIResponsesToolChoiceString = \"none\" | \"auto\" | \"required\";\n/**\n * Function tool choice object.\n */\nexport interface XAIResponsesToolChoiceFunction {\n type: \"function\";\n function: {\n /** The name of the function to call. */\n name: string;\n };\n}\n/**\n * Tool choice configuration.\n */\nexport type XAIResponsesToolChoice = XAIResponsesToolChoiceString | XAIResponsesToolChoiceFunction;\n/**\n * Additional output data to include in the response.\n */\nexport type XAIResponsesInclude = \"reasoning.encrypted_content\";\n/**\n * xAI Responses API request body parameters.\n */\nexport interface XAIResponsesCreateParams {\n /**\n * The input passed to the model.\n * Can be text (string) or an array of message objects.\n */\n input: XAIResponsesInput;\n /**\n * Model name for the model to use (e.g., from xAI console).\n */\n model?: string;\n /**\n * Whether to process the response asynchronously in the background.\n * Note: Unsupported.\n * @default false\n */\n background?: boolean;\n /**\n * What additional output data to include in the response.\n * Currently supported: `reasoning.encrypted_content`.\n */\n include?: XAIResponsesInclude[];\n /**\n * An alternate way to specify the system prompt.\n * Cannot be used with `previous_response_id`.\n */\n instructions?: string;\n /**\n * Whether to return log probabilities of the output tokens.\n * @default false\n */\n logprobs?: boolean;\n /**\n * Max number of tokens that can be generated.\n * Includes both output and reasoning tokens.\n */\n max_output_tokens?: number;\n /**\n * Metadata for the request.\n * Note: Not supported. Maintained for compatibility.\n */\n metadata?: Record<string, unknown>;\n /**\n * Whether to allow the model to run parallel tool calls.\n * @default true\n */\n parallel_tool_calls?: boolean;\n /**\n * The ID of the previous response from the model.\n * Use this to create multi-turn conversations.\n */\n previous_response_id?: string;\n /**\n * Reasoning configuration.\n * Only for reasoning models.\n */\n reasoning?: XAIResponsesReasoning;\n /**\n * Set parameters for searched data.\n * Takes precedence over `web_search_preview` tool.\n */\n search_parameters?: XAIResponsesSearchParameters;\n /**\n * Service tier for the request.\n * Note: Not supported. Maintained for compatibility.\n */\n service_tier?: string;\n /**\n * Whether to store the input message(s) and response.\n * @default true\n */\n store?: boolean;\n /**\n * If set, partial message deltas will be sent as server-sent events.\n * @default false\n */\n stream?: boolean;\n /**\n * Sampling temperature between 0 and 2.\n * Higher values make output more random, lower values more deterministic.\n * @default 1\n */\n temperature?: number;\n /**\n * Settings for customizing a text response.\n */\n text?: XAIResponsesText;\n /**\n * Controls which tool is called by the model.\n */\n tool_choice?: XAIResponsesToolChoice;\n /**\n * A list of tools the model may call.\n * Maximum of 128 tools.\n */\n tools?: XAIResponsesTool[];\n /**\n * Number of most likely tokens to return at each token position.\n * Range: 0-8. Requires `logprobs` to be `true`.\n */\n top_logprobs?: number;\n /**\n * Nucleus sampling probability mass.\n * The model considers results of tokens with top_p probability mass.\n * @default 1\n */\n top_p?: number;\n /**\n * Truncation strategy.\n * Note: Not supported. Maintained for compatibility.\n */\n truncation?: string;\n /**\n * Unique identifier representing your end-user.\n * Used for monitoring and abuse detection.\n */\n user?: string;\n}\n/**\n * Streaming variant of the request params.\n */\nexport interface XAIResponsesCreateParamsStreaming extends XAIResponsesCreateParams {\n stream: true;\n}\n/**\n * Non-streaming variant of the request params.\n */\nexport interface XAIResponsesCreateParamsNonStreaming extends XAIResponsesCreateParams {\n stream?: false;\n}\n/**\n * Response status values.\n */\nexport type XAIResponsesStatus = \"completed\" | \"in_progress\" | \"incomplete\";\n/**\n * Response object type literal.\n */\nexport type XAIResponsesObjectType = \"response\";\n/**\n * Text output item in the response.\n */\nexport interface XAIResponsesOutputTextItem {\n type: \"message\";\n /** The role of the message (always assistant for outputs). */\n role: \"assistant\";\n /** The text content of the message. */\n content: XAIResponsesOutputContent[];\n /** The ID of this output item. */\n id?: string;\n /** The status of this output item. */\n status?: XAIResponsesStatus;\n}\n/**\n * Text content in an output message.\n */\nexport interface XAIResponsesOutputTextContent {\n type: \"output_text\";\n /** The text content. */\n text: string;\n /** Annotations on the text (e.g., citations). */\n annotations?: XAIResponsesAnnotation[];\n}\n/**\n * Refusal content in an output message.\n */\nexport interface XAIResponsesOutputRefusalContent {\n type: \"refusal\";\n /** The refusal message. */\n refusal: string;\n}\n/**\n * Union type for output content items.\n */\nexport type XAIResponsesOutputContent = XAIResponsesOutputTextContent | XAIResponsesOutputRefusalContent;\n/**\n * Citation annotation for web search results.\n */\nexport interface XAIResponsesUrlCitationAnnotation {\n type: \"url_citation\";\n /** Start index in the text. */\n start_index: number;\n /** End index in the text. */\n end_index: number;\n /** The URL being cited. */\n url: string;\n /** The title of the cited page. */\n title?: string;\n}\n/**\n * File citation annotation.\n */\nexport interface XAIResponsesFileCitationAnnotation {\n type: \"file_citation\";\n /** Start index in the text. */\n start_index: number;\n /** End index in the text. */\n end_index: number;\n /** The file ID being cited. */\n file_id: string;\n /** The filename. */\n filename?: string;\n}\n/**\n * Union type for all annotation types.\n */\nexport type XAIResponsesAnnotation = XAIResponsesUrlCitationAnnotation | XAIResponsesFileCitationAnnotation;\n/**\n * Function call output item.\n */\nexport interface XAIResponsesOutputFunctionCall {\n type: \"function_call\";\n /** The ID of the function call. */\n id: string;\n /** The ID of the function call (alias). */\n call_id?: string;\n /** The name of the function being called. */\n name: string;\n /** The arguments to the function as a JSON string. */\n arguments: string;\n /** The status of the function call. */\n status?: XAIResponsesStatus;\n}\n/**\n * Web search call output item.\n */\nexport interface XAIResponsesOutputWebSearchCall {\n type: \"web_search_call\";\n /** The ID of the web search call. */\n id: string;\n /** The status of the web search. */\n status?: \"in_progress\" | \"searching\" | \"completed\" | \"failed\";\n}\n/**\n * File search call output item.\n */\nexport interface XAIResponsesOutputFileSearchCall {\n type: \"file_search_call\";\n /** The ID of the file search call. */\n id: string;\n /** The status of the file search. */\n status?: \"in_progress\" | \"searching\" | \"completed\" | \"failed\";\n /** The search queries used. */\n queries?: string[];\n /** The search results. */\n results?: XAIResponsesFileSearchResult[];\n}\n/**\n * File search result item.\n */\nexport interface XAIResponsesFileSearchResult {\n /** The file ID. */\n file_id: string;\n /** The filename. */\n filename?: string;\n /** The score/relevance of the result. */\n score?: number;\n /** The matched text content. */\n text?: string;\n}\n/**\n * Code interpreter call output item.\n */\nexport interface XAIResponsesOutputCodeInterpreterCall {\n type: \"code_interpreter_call\";\n /** The ID of the code interpreter call. */\n id: string;\n /** The code being executed. */\n code?: string;\n /** The status of the code interpreter. */\n status?: \"in_progress\" | \"interpreting\" | \"completed\" | \"failed\";\n /** The results of the code execution. */\n results?: XAIResponsesCodeInterpreterResult[];\n}\n/**\n * Code interpreter result item.\n */\nexport interface XAIResponsesCodeInterpreterResult {\n type: \"logs\" | \"image\";\n /** The log output (for type \"logs\"). */\n logs?: string;\n /** The image data (for type \"image\"). */\n image?: {\n /** The base64-encoded image data. */\n data?: string;\n /** The MIME type of the image. */\n media_type?: string;\n };\n}\n/**\n * MCP call output item.\n */\nexport interface XAIResponsesOutputMcpCall {\n type: \"mcp_call\";\n /** The ID of the MCP call. */\n id: string;\n /** The MCP server URL. */\n server_url?: string;\n /** The MCP server label. */\n server_label?: string;\n /** The status of the MCP call. */\n status?: \"in_progress\" | \"completed\" | \"failed\";\n}\n/**\n * Reasoning output item.\n */\nexport interface XAIResponsesOutputReasoning {\n type: \"reasoning\";\n /** The ID of the reasoning item. */\n id?: string;\n /** Summary of the reasoning. */\n summary?: XAIResponsesReasoningSummaryItem[];\n /** Encrypted reasoning content (if included). */\n encrypted_content?: string;\n}\n/**\n * Reasoning summary item.\n */\nexport interface XAIResponsesReasoningSummaryItem {\n type: \"summary_text\";\n /** The summary text. */\n text: string;\n}\n/**\n * Union type for all response output items.\n */\nexport type XAIResponsesOutputItem = XAIResponsesOutputTextItem | XAIResponsesOutputFunctionCall | XAIResponsesOutputWebSearchCall | XAIResponsesOutputFileSearchCall | XAIResponsesOutputCodeInterpreterCall | XAIResponsesOutputMcpCall | XAIResponsesOutputReasoning;\n/**\n * Token usage information for the response.\n */\nexport interface XAIResponsesUsage {\n /** Number of tokens in the input/prompt. */\n input_tokens: number;\n /** Number of tokens in the output/completion. */\n output_tokens: number;\n /** Total number of tokens used. */\n total_tokens: number;\n /** Detailed breakdown of input tokens. */\n input_tokens_details?: {\n /** Cached tokens from previous requests. */\n cached_tokens?: number;\n };\n /** Detailed breakdown of output tokens. */\n output_tokens_details?: {\n /** Tokens used for reasoning. */\n reasoning_tokens?: number;\n };\n}\n/**\n * Reason for incomplete response.\n */\nexport type XAIResponsesIncompleteReason = \"max_output_tokens\" | \"content_filter\" | \"turn_limit\" | \"tool_use_limit\";\n/**\n * Details about why a response is incomplete.\n */\nexport interface XAIResponsesIncompleteDetails {\n /** The reason the response is incomplete. */\n reason?: XAIResponsesIncompleteReason;\n}\n/**\n * Debug output information (when available).\n */\nexport interface XAIResponsesDebugOutput {\n /** Debug model information. */\n model_info?: Record<string, unknown>;\n /** Additional debug data. */\n [key: string]: unknown;\n}\n/**\n * Reasoning configuration echoed in the response.\n */\nexport interface XAIResponsesReasoningResponse {\n /** The effort level used for reasoning. */\n effort?: XAIResponsesReasoningEffort;\n /** The summary style used. */\n summary?: XAIResponsesReasoningSummary;\n}\n/**\n * xAI Responses API response body.\n */\nexport interface XAIResponse {\n /**\n * Unique ID of the response.\n */\n id: string;\n /**\n * The object type of this resource. Always set to `response`.\n */\n object: XAIResponsesObjectType;\n /**\n * The Unix timestamp (in seconds) for the response creation time.\n */\n created_at: number;\n /**\n * Model name used to generate the response.\n */\n model: string;\n /**\n * Status of the response.\n */\n status: XAIResponsesStatus;\n /**\n * The response generated by the model.\n */\n output: XAIResponsesOutputItem[];\n /**\n * Whether to allow the model to run parallel tool calls.\n */\n parallel_tool_calls?: boolean;\n /**\n * Whether to store the input message(s) and response.\n * @default true\n */\n store?: boolean;\n /**\n * Settings for customizing a text response.\n */\n text?: XAIResponsesText;\n /**\n * Controls which tool is called by the model.\n */\n tool_choice?: XAIResponsesToolChoice;\n /**\n * A list of tools the model may call.\n * Maximum of 128 tools.\n */\n tools?: XAIResponsesTool[];\n /**\n * Whether to process the response asynchronously in the background.\n * Note: Unsupported.\n * @default false\n */\n background?: boolean | null;\n /**\n * Debug output information (when available).\n */\n debug_output?: XAIResponsesDebugOutput | null;\n /**\n * Details about why the response is incomplete (if status is \"incomplete\").\n */\n incomplete_details?: XAIResponsesIncompleteDetails | null;\n /**\n * Max number of tokens that can be generated.\n * Includes both output and reasoning tokens.\n */\n max_output_tokens?: number | null;\n /**\n * Only included for compatibility.\n */\n metadata?: Record<string, unknown> | null;\n /**\n * The ID of the previous response from the model.\n */\n previous_response_id?: string | null;\n /**\n * Reasoning configuration used for the response.\n */\n reasoning?: XAIResponsesReasoningResponse | null;\n /**\n * Sampling temperature used (between 0 and 2).\n * @default 1\n */\n temperature?: number | null;\n /**\n * Nucleus sampling probability mass used.\n * @default 1\n */\n top_p?: number | null;\n /**\n * Token usage information.\n */\n usage?: XAIResponsesUsage | null;\n /**\n * Unique identifier representing your end-user.\n * Used for monitoring and abuse detection.\n */\n user?: string | null;\n}\n/**\n * Base streaming event structure.\n */\nexport interface XAIResponsesStreamEventBase {\n /** The type of the streaming event. */\n type: string;\n}\n/**\n * Response created event.\n */\nexport interface XAIResponsesStreamEventCreated extends XAIResponsesStreamEventBase {\n type: \"response.created\";\n /** The response object. */\n response: XAIResponse;\n}\n/**\n * Response in progress event.\n */\nexport interface XAIResponsesStreamEventInProgress extends XAIResponsesStreamEventBase {\n type: \"response.in_progress\";\n /** The response object. */\n response: XAIResponse;\n}\n/**\n * Response completed event.\n */\nexport interface XAIResponsesStreamEventCompleted extends XAIResponsesStreamEventBase {\n type: \"response.completed\";\n /** The completed response object. */\n response: XAIResponse;\n}\n/**\n * Response failed event.\n */\nexport interface XAIResponsesStreamEventFailed extends XAIResponsesStreamEventBase {\n type: \"response.failed\";\n /** The failed response object. */\n response: XAIResponse;\n /** Error information. */\n error?: {\n /** Error code. */\n code?: string;\n /** Error message. */\n message?: string;\n };\n}\n/**\n * Response incomplete event.\n */\nexport interface XAIResponsesStreamEventIncomplete extends XAIResponsesStreamEventBase {\n type: \"response.incomplete\";\n /** The incomplete response object. */\n response: XAIResponse;\n}\n/**\n * Output item added event.\n */\nexport interface XAIResponsesStreamEventOutputItemAdded extends XAIResponsesStreamEventBase {\n type: \"response.output_item.added\";\n /** The index of the output item. */\n output_index: number;\n /** The output item that was added. */\n item: XAIResponsesOutputItem;\n}\n/**\n * Output item done event.\n */\nexport interface XAIResponsesStreamEventOutputItemDone extends XAIResponsesStreamEventBase {\n type: \"response.output_item.done\";\n /** The index of the output item. */\n output_index: number;\n /** The completed output item. */\n item: XAIResponsesOutputItem;\n}\n/**\n * Content part added event.\n */\nexport interface XAIResponsesStreamEventContentPartAdded extends XAIResponsesStreamEventBase {\n type: \"response.content_part.added\";\n /** The index of the output item. */\n output_index: number;\n /** The index of the content part. */\n content_index: number;\n /** The content part that was added. */\n part: XAIResponsesOutputContent;\n}\n/**\n * Content part done event.\n */\nexport interface XAIResponsesStreamEventContentPartDone extends XAIResponsesStreamEventBase {\n type: \"response.content_part.done\";\n /** The index of the output item. */\n output_index: number;\n /** The index of the content part. */\n content_index: number;\n /** The completed content part. */\n part: XAIResponsesOutputContent;\n}\n/**\n * Text delta event (streaming text).\n */\nexport interface XAIResponsesStreamEventTextDelta extends XAIResponsesStreamEventBase {\n type: \"response.output_text.delta\";\n /** The index of the output item. */\n output_index: number;\n /** The index of the content part. */\n content_index: number;\n /** The text delta. */\n delta: string;\n}\n/**\n * Text done event.\n */\nexport interface XAIResponsesStreamEventTextDone extends XAIResponsesStreamEventBase {\n type: \"response.output_text.done\";\n /** The index of the output item. */\n output_index: number;\n /** The index of the content part. */\n content_index: number;\n /** The complete text. */\n text: string;\n}\n/**\n * Function call arguments delta event.\n */\nexport interface XAIResponsesStreamEventFunctionCallArgumentsDelta extends XAIResponsesStreamEventBase {\n type: \"response.function_call_arguments.delta\";\n /** The index of the output item. */\n output_index: number;\n /** The ID of the function call. */\n call_id: string;\n /** The arguments delta. */\n delta: string;\n}\n/**\n * Function call arguments done event.\n */\nexport interface XAIResponsesStreamEventFunctionCallArgumentsDone extends XAIResponsesStreamEventBase {\n type: \"response.function_call_arguments.done\";\n /** The index of the output item. */\n output_index: number;\n /** The ID of the function call. */\n call_id: string;\n /** The complete arguments. */\n arguments: string;\n}\n/**\n * Reasoning summary text delta event.\n */\nexport interface XAIResponsesStreamEventReasoningSummaryTextDelta extends XAIResponsesStreamEventBase {\n type: \"response.reasoning_summary_text.delta\";\n /** The index of the output item. */\n output_index: number;\n /** The index of the summary part. */\n summary_index: number;\n /** The text delta. */\n delta: string;\n}\n/**\n * Reasoning summary text done event.\n */\nexport interface XAIResponsesStreamEventReasoningSummaryTextDone extends XAIResponsesStreamEventBase {\n type: \"response.reasoning_summary_text.done\";\n /** The index of the output item. */\n output_index: number;\n /** The index of the summary part. */\n summary_index: number;\n /** The complete text. */\n text: string;\n}\n/**\n * Error event.\n */\nexport interface XAIResponsesStreamEventError extends XAIResponsesStreamEventBase {\n type: \"error\";\n /** Error code. */\n code?: string;\n /** Error message. */\n message?: string;\n /** Error parameter. */\n param?: string;\n}\n/**\n * Union type for all streaming events.\n */\nexport type XAIResponsesStreamEvent = XAIResponsesStreamEventCreated | XAIResponsesStreamEventInProgress | XAIResponsesStreamEventCompleted | XAIResponsesStreamEventFailed | XAIResponsesStreamEventIncomplete | XAIResponsesStreamEventOutputItemAdded | XAIResponsesStreamEventOutputItemDone | XAIResponsesStreamEventContentPartAdded | XAIResponsesStreamEventContentPartDone | XAIResponsesStreamEventTextDelta | XAIResponsesStreamEventTextDone | XAIResponsesStreamEventFunctionCallArgumentsDelta | XAIResponsesStreamEventFunctionCallArgumentsDone | XAIResponsesStreamEventReasoningSummaryTextDelta | XAIResponsesStreamEventReasoningSummaryTextDone | XAIResponsesStreamEventError;\nimport type { BaseChatModelCallOptions, BaseChatModelParams } from \"@langchain/core/language_models/chat_models\";\n/**\n * Call options for ChatXAIResponses.\n */\nexport interface ChatXAIResponsesCallOptions extends BaseChatModelCallOptions {\n /**\n * Configuration options for a text response from the model.\n */\n text?: XAIResponsesText;\n /**\n * Specify additional output data to include in the model response.\n */\n include?: XAIResponsesInclude[];\n /**\n * The unique ID of the previous response to the model.\n * Use this to create multi-turn conversations.\n */\n previous_response_id?: string;\n /**\n * Search parameters for xAI's search capabilities.\n */\n search_parameters?: XAIResponsesSearchParameters;\n /**\n * Reasoning configuration for reasoning models.\n */\n reasoning?: XAIResponsesReasoning;\n /**\n * Controls which tool is called by the model.\n */\n tool_choice?: XAIResponsesToolChoice;\n /**\n * Whether to allow the model to run parallel tool calls.\n */\n parallel_tool_calls?: boolean;\n}\n/**\n * Input configuration for ChatXAIResponses constructor.\n */\nexport interface ChatXAIResponsesInput extends BaseChatModelParams {\n /**\n * The xAI API key to use for requests.\n * @default process.env.XAI_API_KEY\n */\n apiKey?: string;\n /**\n * The name of the model to use.\n * @default \"grok-3\"\n */\n model?: string;\n /**\n * Whether to stream responses.\n * @default false\n */\n streaming?: boolean;\n /**\n * Sampling temperature between 0 and 2.\n * @default 1\n */\n temperature?: number;\n /**\n * Nucleus sampling probability mass.\n * @default 1\n */\n topP?: number;\n /**\n * Maximum number of tokens to generate.\n */\n maxOutputTokens?: number;\n /**\n * Whether to store the input messages and response.\n * @default true\n */\n store?: boolean;\n /**\n * A unique identifier representing your end-user.\n */\n user?: string;\n /**\n * The base URL for the xAI API.\n * @default \"https://api.x.ai/v1\"\n */\n baseURL?: string;\n /**\n * Default search parameters for xAI's search capabilities.\n */\n searchParameters?: XAIResponsesSearchParameters;\n /**\n * Default reasoning configuration.\n */\n reasoning?: XAIResponsesReasoning;\n}\n/**\n * Invocation parameters for ChatXAIResponses (request params without input).\n */\nexport type ChatXAIResponsesInvocationParams = Omit<XAIResponsesCreateParams, \"input\">;\n//# sourceMappingURL=responses-types.d.ts.map"],"mappings":";;;;;;AAGiBA,UAAAA,yBAAAA,CAAyB;EASzBC,IAAAA,EAAAA,YAAAA;EAUAC;EAQLC,IAAAA,EAAAA,MAAAA;;;;AAAiH;AAI7H;AAciBE,UApCAJ,0BAAAA,CAoC6B;EAU7BK,IA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;;;;sBASUlB;;;;cAIRN;;;;gBAIEuB;;;;;;;;;UASDmD,qBAAAA,SAA8BF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA+CxBlE;;;;cAIPN;;;;;KAKJ2E,gCAAAA,GAAmCC,KAAKnD"}
@@ -0,0 +1,228 @@
1
+ const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
+ const require_responses = require('../converters/responses.cjs');
3
+ const __langchain_core_utils_env = require_rolldown_runtime.__toESM(require("@langchain/core/utils/env"));
4
+ const __langchain_core_language_models_chat_models = require_rolldown_runtime.__toESM(require("@langchain/core/language_models/chat_models"));
5
+
6
+ //#region src/chat_models/responses.ts
7
+ /**
8
+ * xAI Responses API chat model integration.
9
+ *
10
+ * This class provides access to xAI's Responses API, which offers enhanced
11
+ * capabilities including built-in tools, reasoning, and search.
12
+ *
13
+ * @example
14
+ * ```typescript
15
+ * import { ChatXAIResponses } from "@langchain/xai";
16
+ *
17
+ * const llm = new ChatXAIResponses({
18
+ * model: "grok-3",
19
+ * temperature: 0.7,
20
+ * });
21
+ *
22
+ * const result = await llm.invoke("What is the capital of France?");
23
+ * console.log(result.content);
24
+ * ```
25
+ */
26
+ var ChatXAIResponses = class extends __langchain_core_language_models_chat_models.BaseChatModel {
27
+ static lc_name() {
28
+ return "ChatXAIResponses";
29
+ }
30
+ lc_serializable = true;
31
+ lc_namespace = [
32
+ "langchain",
33
+ "chat_models",
34
+ "xai"
35
+ ];
36
+ get lc_secrets() {
37
+ return { apiKey: "XAI_API_KEY" };
38
+ }
39
+ get lc_aliases() {
40
+ return { apiKey: "xai_api_key" };
41
+ }
42
+ apiKey;
43
+ model;
44
+ streaming;
45
+ temperature;
46
+ topP;
47
+ maxOutputTokens;
48
+ store;
49
+ user;
50
+ baseURL;
51
+ searchParameters;
52
+ reasoning;
53
+ constructor(fields) {
54
+ super(fields ?? {});
55
+ const apiKey = fields?.apiKey ?? (0, __langchain_core_utils_env.getEnvironmentVariable)("XAI_API_KEY");
56
+ if (!apiKey) throw new Error(`xAI API key not found. Please set the XAI_API_KEY environment variable or provide the key in the "apiKey" field.`);
57
+ this.apiKey = apiKey;
58
+ this.model = fields?.model ?? "grok-3";
59
+ this.streaming = fields?.streaming ?? false;
60
+ this.temperature = fields?.temperature;
61
+ this.topP = fields?.topP;
62
+ this.maxOutputTokens = fields?.maxOutputTokens;
63
+ this.store = fields?.store;
64
+ this.user = fields?.user;
65
+ this.baseURL = fields?.baseURL ?? "https://api.x.ai/v1";
66
+ this.searchParameters = fields?.searchParameters;
67
+ this.reasoning = fields?.reasoning;
68
+ }
69
+ _llmType() {
70
+ return "xai-responses";
71
+ }
72
+ getLsParams(options) {
73
+ const params = super.getLsParams(options);
74
+ params.ls_provider = "xai";
75
+ params.ls_model_name = this.model;
76
+ params.ls_model_type = "chat";
77
+ params.ls_temperature = this.temperature;
78
+ params.ls_max_tokens = this.maxOutputTokens;
79
+ return params;
80
+ }
81
+ toJSON() {
82
+ const result = super.toJSON();
83
+ if ("kwargs" in result && typeof result.kwargs === "object" && result.kwargs != null) delete result.kwargs.apiKey;
84
+ return result;
85
+ }
86
+ invocationParams(options) {
87
+ return {
88
+ model: this.model,
89
+ temperature: this.temperature,
90
+ top_p: this.topP,
91
+ max_output_tokens: this.maxOutputTokens,
92
+ store: this.store,
93
+ user: this.user,
94
+ stream: this.streaming,
95
+ previous_response_id: options?.previous_response_id,
96
+ include: options?.include,
97
+ text: options?.text,
98
+ search_parameters: options?.search_parameters ?? this.searchParameters,
99
+ reasoning: options?.reasoning ?? this.reasoning,
100
+ tool_choice: options?.tool_choice,
101
+ parallel_tool_calls: options?.parallel_tool_calls
102
+ };
103
+ }
104
+ async _makeRequest(request) {
105
+ const url = `${this.baseURL}/responses`;
106
+ const headers = {
107
+ "Content-Type": "application/json",
108
+ Authorization: `Bearer ${this.apiKey}`
109
+ };
110
+ if (request.stream) return this._makeStreamingRequest(url, headers, request);
111
+ const response = await this.caller.call(async () => {
112
+ const res = await fetch(url, {
113
+ method: "POST",
114
+ headers,
115
+ body: JSON.stringify(request)
116
+ });
117
+ if (!res.ok) {
118
+ const errorBody = await res.text();
119
+ throw new Error(`xAI API error: ${res.status} ${res.statusText} - ${errorBody}`);
120
+ }
121
+ return res.json();
122
+ });
123
+ return response;
124
+ }
125
+ /**
126
+ * Makes a streaming request to the xAI Responses API.
127
+ */
128
+ async *_makeStreamingRequest(url, headers, request) {
129
+ const response = await this.caller.call(async () => {
130
+ const res = await fetch(url, {
131
+ method: "POST",
132
+ headers,
133
+ body: JSON.stringify(request)
134
+ });
135
+ if (!res.ok) {
136
+ const errorBody = await res.text();
137
+ throw new Error(`xAI API error: ${res.status} ${res.statusText} - ${errorBody}`);
138
+ }
139
+ return res;
140
+ });
141
+ const reader = response.body?.getReader();
142
+ if (!reader) throw new Error("No response body");
143
+ const decoder = new TextDecoder();
144
+ let buffer = "";
145
+ try {
146
+ while (true) {
147
+ const { done, value } = await reader.read();
148
+ if (done) break;
149
+ buffer += decoder.decode(value, { stream: true });
150
+ const lines = buffer.split("\n");
151
+ buffer = lines.pop() ?? "";
152
+ for (const line of lines) {
153
+ const trimmed = line.trim();
154
+ if (!trimmed || trimmed === "data: [DONE]") continue;
155
+ if (trimmed.startsWith("data: ")) try {
156
+ const data = JSON.parse(trimmed.slice(6));
157
+ yield data;
158
+ } catch {}
159
+ }
160
+ }
161
+ } finally {
162
+ reader.releaseLock();
163
+ }
164
+ }
165
+ async _generate(messages, options, runManager) {
166
+ const invocationParams = this.invocationParams(options);
167
+ const input = require_responses.convertMessagesToResponsesInput(messages);
168
+ if (invocationParams.stream) {
169
+ const stream = this._streamResponseChunks(messages, options, runManager);
170
+ let finalChunk;
171
+ for await (const chunk of stream) {
172
+ chunk.message.response_metadata = {
173
+ ...chunk.generationInfo,
174
+ ...chunk.message.response_metadata
175
+ };
176
+ finalChunk = finalChunk?.concat(chunk) ?? chunk;
177
+ }
178
+ return {
179
+ generations: finalChunk ? [finalChunk] : [],
180
+ llmOutput: { estimatedTokenUsage: (finalChunk?.message)?.usage_metadata }
181
+ };
182
+ }
183
+ const response = await this._makeRequest({
184
+ input,
185
+ ...invocationParams,
186
+ stream: false
187
+ });
188
+ const aiMessage = require_responses.convertResponseToAIMessage(response);
189
+ const text = require_responses.extractTextFromOutput(response.output);
190
+ return {
191
+ generations: [{
192
+ text,
193
+ message: aiMessage
194
+ }],
195
+ llmOutput: {
196
+ id: response.id,
197
+ estimatedTokenUsage: response.usage ? {
198
+ promptTokens: response.usage.input_tokens,
199
+ completionTokens: response.usage.output_tokens,
200
+ totalTokens: response.usage.total_tokens
201
+ } : void 0
202
+ }
203
+ };
204
+ }
205
+ async *_streamResponseChunks(messages, options, runManager) {
206
+ const invocationParams = this.invocationParams(options);
207
+ const input = require_responses.convertMessagesToResponsesInput(messages);
208
+ const streamIterable = await this._makeRequest({
209
+ input,
210
+ ...invocationParams,
211
+ stream: true
212
+ });
213
+ for await (const event of streamIterable) {
214
+ const chunk = require_responses.convertStreamEventToChunk(event);
215
+ if (chunk) {
216
+ yield chunk;
217
+ await runManager?.handleLLMNewToken(chunk.text || "", {
218
+ prompt: 0,
219
+ completion: 0
220
+ });
221
+ }
222
+ }
223
+ }
224
+ };
225
+
226
+ //#endregion
227
+ exports.ChatXAIResponses = ChatXAIResponses;
228
+ //# sourceMappingURL=responses.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"responses.cjs","names":["BaseChatModel","fields?: ChatXAIResponsesInput","options: this[\"ParsedCallOptions\"]","options?: this[\"ParsedCallOptions\"]","request: XAIResponsesCreateParams","headers: Record<string, string>","url: string","messages: BaseMessage[]","runManager?: CallbackManagerForLLMRun","convertMessagesToResponsesInput","finalChunk: ChatGenerationChunk | undefined","convertResponseToAIMessage","extractTextFromOutput","convertStreamEventToChunk"],"sources":["../../src/chat_models/responses.ts"],"sourcesContent":["import { CallbackManagerForLLMRun } from \"@langchain/core/callbacks/manager\";\nimport { AIMessage, BaseMessage } from \"@langchain/core/messages\";\nimport {\n BaseChatModel,\n type LangSmithParams,\n} from \"@langchain/core/language_models/chat_models\";\nimport { ChatGenerationChunk, type ChatResult } from \"@langchain/core/outputs\";\nimport { getEnvironmentVariable } from \"@langchain/core/utils/env\";\nimport { Serialized } from \"@langchain/core/load/serializable\";\n\nimport type {\n ChatXAIResponsesCallOptions,\n ChatXAIResponsesInput,\n ChatXAIResponsesInvocationParams,\n XAIResponse,\n XAIResponsesCreateParams,\n XAIResponsesCreateParamsNonStreaming,\n XAIResponsesCreateParamsStreaming,\n XAIResponsesReasoning,\n XAIResponsesSearchParameters,\n XAIResponsesStreamEvent,\n} from \"./responses-types.js\";\n\nimport {\n convertMessagesToResponsesInput,\n convertResponseToAIMessage,\n convertStreamEventToChunk,\n extractTextFromOutput,\n} from \"../converters/responses.js\";\n\n// Re-export types for convenience\nexport type {\n ChatXAIResponsesCallOptions,\n ChatXAIResponsesInput,\n ChatXAIResponsesInvocationParams,\n};\n\n// ============================================================================\n// Main Class\n// ============================================================================\n\n/**\n * xAI Responses API chat model integration.\n *\n * This class provides access to xAI's Responses API, which offers enhanced\n * capabilities including built-in tools, reasoning, and search.\n *\n * @example\n * ```typescript\n * import { ChatXAIResponses } from \"@langchain/xai\";\n *\n * const llm = new ChatXAIResponses({\n * model: \"grok-3\",\n * temperature: 0.7,\n * });\n *\n * const result = await llm.invoke(\"What is the capital of France?\");\n * console.log(result.content);\n * ```\n */\nexport class ChatXAIResponses<\n CallOptions extends ChatXAIResponsesCallOptions = ChatXAIResponsesCallOptions,\n> extends BaseChatModel<CallOptions> {\n static lc_name() {\n return \"ChatXAIResponses\";\n }\n\n lc_serializable = true;\n\n lc_namespace = [\"langchain\", \"chat_models\", \"xai\"];\n\n get lc_secrets(): { [key: string]: string } | undefined {\n return {\n apiKey: \"XAI_API_KEY\",\n };\n }\n\n get lc_aliases(): { [key: string]: string } | undefined {\n return {\n apiKey: \"xai_api_key\",\n };\n }\n\n // -------------------------------------------------------------------------\n // Instance Properties\n // -------------------------------------------------------------------------\n\n apiKey: string;\n\n model: string;\n\n streaming: boolean;\n\n temperature?: number;\n\n topP?: number;\n\n maxOutputTokens?: number;\n\n store?: boolean;\n\n user?: string;\n\n baseURL: string;\n\n searchParameters?: XAIResponsesSearchParameters;\n\n reasoning?: XAIResponsesReasoning;\n\n // -------------------------------------------------------------------------\n // Constructor\n // -------------------------------------------------------------------------\n\n constructor(fields?: ChatXAIResponsesInput) {\n super(fields ?? {});\n\n const apiKey = fields?.apiKey ?? getEnvironmentVariable(\"XAI_API_KEY\");\n if (!apiKey) {\n throw new Error(\n `xAI API key not found. Please set the XAI_API_KEY environment variable or provide the key in the \"apiKey\" field.`\n );\n }\n\n this.apiKey = apiKey;\n this.model = fields?.model ?? \"grok-3\";\n this.streaming = fields?.streaming ?? false;\n this.temperature = fields?.temperature;\n this.topP = fields?.topP;\n this.maxOutputTokens = fields?.maxOutputTokens;\n this.store = fields?.store;\n this.user = fields?.user;\n this.baseURL = fields?.baseURL ?? \"https://api.x.ai/v1\";\n this.searchParameters = fields?.searchParameters;\n this.reasoning = fields?.reasoning;\n }\n\n // -------------------------------------------------------------------------\n // Metadata Methods\n // -------------------------------------------------------------------------\n\n _llmType(): string {\n return \"xai-responses\";\n }\n\n override getLsParams(options: this[\"ParsedCallOptions\"]): LangSmithParams {\n const params = super.getLsParams(options);\n params.ls_provider = \"xai\";\n params.ls_model_name = this.model;\n params.ls_model_type = \"chat\";\n params.ls_temperature = this.temperature;\n params.ls_max_tokens = this.maxOutputTokens;\n return params;\n }\n\n override toJSON(): Serialized {\n const result = super.toJSON();\n\n if (\n \"kwargs\" in result &&\n typeof result.kwargs === \"object\" &&\n result.kwargs != null\n ) {\n delete (result.kwargs as Record<string, unknown>).apiKey;\n }\n\n return result;\n }\n\n // -------------------------------------------------------------------------\n // Invocation Params\n // -------------------------------------------------------------------------\n\n invocationParams(\n options?: this[\"ParsedCallOptions\"]\n ): ChatXAIResponsesInvocationParams {\n return {\n model: this.model,\n temperature: this.temperature,\n top_p: this.topP,\n max_output_tokens: this.maxOutputTokens,\n store: this.store,\n user: this.user,\n stream: this.streaming,\n previous_response_id: options?.previous_response_id,\n include: options?.include,\n text: options?.text,\n search_parameters: options?.search_parameters ?? this.searchParameters,\n reasoning: options?.reasoning ?? this.reasoning,\n tool_choice: options?.tool_choice,\n parallel_tool_calls: options?.parallel_tool_calls,\n };\n }\n\n // -------------------------------------------------------------------------\n // API Call Methods\n // -------------------------------------------------------------------------\n\n /**\n * Makes a request to the xAI Responses API.\n */\n protected async _makeRequest(\n request: XAIResponsesCreateParamsNonStreaming\n ): Promise<XAIResponse>;\n\n protected async _makeRequest(\n request: XAIResponsesCreateParamsStreaming\n ): Promise<AsyncIterable<XAIResponsesStreamEvent>>;\n\n protected async _makeRequest(\n request: XAIResponsesCreateParams\n ): Promise<XAIResponse | AsyncIterable<XAIResponsesStreamEvent>> {\n const url = `${this.baseURL}/responses`;\n\n const headers: Record<string, string> = {\n \"Content-Type\": \"application/json\",\n Authorization: `Bearer ${this.apiKey}`,\n };\n\n if (request.stream) {\n return this._makeStreamingRequest(url, headers, request);\n }\n\n const response = await this.caller.call(async () => {\n const res = await fetch(url, {\n method: \"POST\",\n headers,\n body: JSON.stringify(request),\n });\n\n if (!res.ok) {\n const errorBody = await res.text();\n throw new Error(\n `xAI API error: ${res.status} ${res.statusText} - ${errorBody}`\n );\n }\n\n return res.json();\n });\n\n return response as XAIResponse;\n }\n\n /**\n * Makes a streaming request to the xAI Responses API.\n */\n protected async *_makeStreamingRequest(\n url: string,\n headers: Record<string, string>,\n request: XAIResponsesCreateParams\n ): AsyncIterable<XAIResponsesStreamEvent> {\n const response = await this.caller.call(async () => {\n const res = await fetch(url, {\n method: \"POST\",\n headers,\n body: JSON.stringify(request),\n });\n\n if (!res.ok) {\n const errorBody = await res.text();\n throw new Error(\n `xAI API error: ${res.status} ${res.statusText} - ${errorBody}`\n );\n }\n\n return res;\n });\n\n const reader = response.body?.getReader();\n if (!reader) {\n throw new Error(\"No response body\");\n }\n\n const decoder = new TextDecoder();\n let buffer = \"\";\n\n try {\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n\n buffer += decoder.decode(value, { stream: true });\n const lines = buffer.split(\"\\n\");\n buffer = lines.pop() ?? \"\";\n\n for (const line of lines) {\n const trimmed = line.trim();\n if (!trimmed || trimmed === \"data: [DONE]\") continue;\n\n if (trimmed.startsWith(\"data: \")) {\n try {\n const data = JSON.parse(trimmed.slice(6));\n yield data as XAIResponsesStreamEvent;\n } catch {\n // Skip invalid JSON\n }\n }\n }\n }\n } finally {\n reader.releaseLock();\n }\n }\n\n // -------------------------------------------------------------------------\n // Generation Methods\n // -------------------------------------------------------------------------\n\n async _generate(\n messages: BaseMessage[],\n options: this[\"ParsedCallOptions\"],\n runManager?: CallbackManagerForLLMRun\n ): Promise<ChatResult> {\n const invocationParams = this.invocationParams(options);\n const input = convertMessagesToResponsesInput(messages);\n\n if (invocationParams.stream) {\n const stream = this._streamResponseChunks(messages, options, runManager);\n let finalChunk: ChatGenerationChunk | undefined;\n\n for await (const chunk of stream) {\n chunk.message.response_metadata = {\n ...chunk.generationInfo,\n ...chunk.message.response_metadata,\n };\n finalChunk = finalChunk?.concat(chunk) ?? chunk;\n }\n\n return {\n generations: finalChunk ? [finalChunk] : [],\n llmOutput: {\n estimatedTokenUsage: (finalChunk?.message as AIMessage | undefined)\n ?.usage_metadata,\n },\n };\n }\n\n const response = await this._makeRequest({\n input,\n ...invocationParams,\n stream: false,\n } as XAIResponsesCreateParamsNonStreaming);\n\n const aiMessage = convertResponseToAIMessage(response);\n const text = extractTextFromOutput(response.output);\n\n return {\n generations: [\n {\n text,\n message: aiMessage,\n },\n ],\n llmOutput: {\n id: response.id,\n estimatedTokenUsage: response.usage\n ? {\n promptTokens: response.usage.input_tokens,\n completionTokens: response.usage.output_tokens,\n totalTokens: response.usage.total_tokens,\n }\n : undefined,\n },\n };\n }\n\n async *_streamResponseChunks(\n messages: BaseMessage[],\n options: this[\"ParsedCallOptions\"],\n runManager?: CallbackManagerForLLMRun\n ): AsyncGenerator<ChatGenerationChunk> {\n const invocationParams = this.invocationParams(options);\n const input = convertMessagesToResponsesInput(messages);\n\n const streamIterable = await this._makeRequest({\n input,\n ...invocationParams,\n stream: true,\n } as XAIResponsesCreateParamsStreaming);\n\n for await (const event of streamIterable) {\n const chunk = convertStreamEventToChunk(event);\n if (chunk) {\n yield chunk;\n await runManager?.handleLLMNewToken(chunk.text || \"\", {\n prompt: 0,\n completion: 0,\n });\n }\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA4DA,IAAa,mBAAb,cAEUA,2DAA2B;CACnC,OAAO,UAAU;AACf,SAAO;CACR;CAED,kBAAkB;CAElB,eAAe;EAAC;EAAa;EAAe;CAAM;CAElD,IAAI,aAAoD;AACtD,SAAO,EACL,QAAQ,cACT;CACF;CAED,IAAI,aAAoD;AACtD,SAAO,EACL,QAAQ,cACT;CACF;CAMD;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAMA,YAAYC,QAAgC;EAC1C,MAAM,UAAU,CAAE,EAAC;EAEnB,MAAM,SAAS,QAAQ,iEAAiC,cAAc;AACtE,MAAI,CAAC,OACH,OAAM,IAAI,MACR,CAAC,gHAAgH,CAAC;EAItH,KAAK,SAAS;EACd,KAAK,QAAQ,QAAQ,SAAS;EAC9B,KAAK,YAAY,QAAQ,aAAa;EACtC,KAAK,cAAc,QAAQ;EAC3B,KAAK,OAAO,QAAQ;EACpB,KAAK,kBAAkB,QAAQ;EAC/B,KAAK,QAAQ,QAAQ;EACrB,KAAK,OAAO,QAAQ;EACpB,KAAK,UAAU,QAAQ,WAAW;EAClC,KAAK,mBAAmB,QAAQ;EAChC,KAAK,YAAY,QAAQ;CAC1B;CAMD,WAAmB;AACjB,SAAO;CACR;CAED,AAAS,YAAYC,SAAqD;EACxE,MAAM,SAAS,MAAM,YAAY,QAAQ;EACzC,OAAO,cA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AoB;KAChC,GAAG,MAAM;KACT,GAAG,MAAM,QAAQ;IAClB;IACD,aAAa,YAAY,OAAO,MAAM,IAAI;GAC3C;AAED,UAAO;IACL,aAAa,aAAa,CAAC,UAAW,IAAG,CAAE;IAC3C,WAAW,EACT,sBAAsB,YAAY,UAC9B,eACL;GACF;EACF;EAED,MAAM,WAAW,MAAM,KAAK,aAAa;GACvC;GACA,GAAG;GACH,QAAQ;EACT,EAAyC;EAE1C,MAAM,YAAYC,6CAA2B,SAAS;EACtD,MAAM,OAAOC,wCAAsB,SAAS,OAAO;AAEnD,SAAO;GACL,aAAa,CACX;IACE;IACA,SAAS;GACV,CACF;GACD,WAAW;IACT,IAAI,SAAS;IACb,qBAAqB,SAAS,QAC1B;KACE,cAAc,SAAS,MAAM;KAC7B,kBAAkB,SAAS,MAAM;KACjC,aAAa,SAAS,MAAM;IAC7B,IACD;GACL;EACF;CACF;CAED,OAAO,sBACLL,UACAL,SACAM,YACqC;EACrC,MAAM,mBAAmB,KAAK,iBAAiB,QAAQ;EACvD,MAAM,QAAQC,kDAAgC,SAAS;EAEvD,MAAM,iBAAiB,MAAM,KAAK,aAAa;GAC7C;GACA,GAAG;GACH,QAAQ;EACT,EAAsC;AAEvC,aAAW,MAAM,SAAS,gBAAgB;GACxC,MAAM,QAAQI,4CAA0B,MAAM;AAC9C,OAAI,OAAO;IACT,MAAM;IACN,MAAM,YAAY,kBAAkB,MAAM,QAAQ,IAAI;KACpD,QAAQ;KACR,YAAY;IACb,EAAC;GACH;EACF;CACF;AACF"}
@@ -0,0 +1,69 @@
1
+ import { ChatXAIResponsesCallOptions, ChatXAIResponsesInput, ChatXAIResponsesInvocationParams, XAIResponse, XAIResponsesCreateParams, XAIResponsesCreateParamsNonStreaming, XAIResponsesCreateParamsStreaming, XAIResponsesReasoning, XAIResponsesSearchParameters, XAIResponsesStreamEvent } from "./responses-types.cjs";
2
+ import { BaseChatModel, LangSmithParams } from "@langchain/core/language_models/chat_models";
3
+ import { Serialized } from "@langchain/core/load/serializable";
4
+ import { BaseMessage } from "@langchain/core/messages";
5
+ import { CallbackManagerForLLMRun } from "@langchain/core/callbacks/manager";
6
+ import { ChatGenerationChunk, ChatResult } from "@langchain/core/outputs";
7
+
8
+ //#region src/chat_models/responses.d.ts
9
+
10
+ /**
11
+ * xAI Responses API chat model integration.
12
+ *
13
+ * This class provides access to xAI's Responses API, which offers enhanced
14
+ * capabilities including built-in tools, reasoning, and search.
15
+ *
16
+ * @example
17
+ * ```typescript
18
+ * import { ChatXAIResponses } from "@langchain/xai";
19
+ *
20
+ * const llm = new ChatXAIResponses({
21
+ * model: "grok-3",
22
+ * temperature: 0.7,
23
+ * });
24
+ *
25
+ * const result = await llm.invoke("What is the capital of France?");
26
+ * console.log(result.content);
27
+ * ```
28
+ */
29
+ declare class ChatXAIResponses<CallOptions extends ChatXAIResponsesCallOptions = ChatXAIResponsesCallOptions> extends BaseChatModel<CallOptions> {
30
+ static lc_name(): string;
31
+ lc_serializable: boolean;
32
+ lc_namespace: string[];
33
+ get lc_secrets(): {
34
+ [key: string]: string;
35
+ } | undefined;
36
+ get lc_aliases(): {
37
+ [key: string]: string;
38
+ } | undefined;
39
+ apiKey: string;
40
+ model: string;
41
+ streaming: boolean;
42
+ temperature?: number;
43
+ topP?: number;
44
+ maxOutputTokens?: number;
45
+ store?: boolean;
46
+ user?: string;
47
+ baseURL: string;
48
+ searchParameters?: XAIResponsesSearchParameters;
49
+ reasoning?: XAIResponsesReasoning;
50
+ constructor(fields?: ChatXAIResponsesInput);
51
+ _llmType(): string;
52
+ getLsParams(options: this["ParsedCallOptions"]): LangSmithParams;
53
+ toJSON(): Serialized;
54
+ invocationParams(options?: this["ParsedCallOptions"]): ChatXAIResponsesInvocationParams;
55
+ /**
56
+ * Makes a request to the xAI Responses API.
57
+ */
58
+ protected _makeRequest(request: XAIResponsesCreateParamsNonStreaming): Promise<XAIResponse>;
59
+ protected _makeRequest(request: XAIResponsesCreateParamsStreaming): Promise<AsyncIterable<XAIResponsesStreamEvent>>;
60
+ /**
61
+ * Makes a streaming request to the xAI Responses API.
62
+ */
63
+ protected _makeStreamingRequest(url: string, headers: Record<string, string>, request: XAIResponsesCreateParams): AsyncIterable<XAIResponsesStreamEvent>;
64
+ _generate(messages: BaseMessage[], options: this["ParsedCallOptions"], runManager?: CallbackManagerForLLMRun): Promise<ChatResult>;
65
+ _streamResponseChunks(messages: BaseMessage[], options: this["ParsedCallOptions"], runManager?: CallbackManagerForLLMRun): AsyncGenerator<ChatGenerationChunk>;
66
+ }
67
+ //#endregion
68
+ export { ChatXAIResponses };
69
+ //# sourceMappingURL=responses.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"responses.d.cts","names":["CallbackManagerForLLMRun","BaseMessage","BaseChatModel","LangSmithParams","ChatGenerationChunk","ChatResult","Serialized","ChatXAIResponsesCallOptions","ChatXAIResponsesInput","ChatXAIResponsesInvocationParams","XAIResponse","XAIResponsesCreateParams","XAIResponsesCreateParamsNonStreaming","XAIResponsesCreateParamsStreaming","XAIResponsesReasoning","XAIResponsesSearchParameters","XAIResponsesStreamEvent","ChatXAIResponses","CallOptions","Promise","AsyncIterable","Record","AsyncGenerator"],"sources":["../../src/chat_models/responses.d.ts"],"sourcesContent":["import { CallbackManagerForLLMRun } from \"@langchain/core/callbacks/manager\";\nimport { BaseMessage } from \"@langchain/core/messages\";\nimport { BaseChatModel, type LangSmithParams } from \"@langchain/core/language_models/chat_models\";\nimport { ChatGenerationChunk, type ChatResult } from \"@langchain/core/outputs\";\nimport { Serialized } from \"@langchain/core/load/serializable\";\nimport type { ChatXAIResponsesCallOptions, ChatXAIResponsesInput, ChatXAIResponsesInvocationParams, XAIResponse, XAIResponsesCreateParams, XAIResponsesCreateParamsNonStreaming, XAIResponsesCreateParamsStreaming, XAIResponsesReasoning, XAIResponsesSearchParameters, XAIResponsesStreamEvent } from \"./responses-types.js\";\nexport type { ChatXAIResponsesCallOptions, ChatXAIResponsesInput, ChatXAIResponsesInvocationParams, };\n/**\n * xAI Responses API chat model integration.\n *\n * This class provides access to xAI's Responses API, which offers enhanced\n * capabilities including built-in tools, reasoning, and search.\n *\n * @example\n * ```typescript\n * import { ChatXAIResponses } from \"@langchain/xai\";\n *\n * const llm = new ChatXAIResponses({\n * model: \"grok-3\",\n * temperature: 0.7,\n * });\n *\n * const result = await llm.invoke(\"What is the capital of France?\");\n * console.log(result.content);\n * ```\n */\nexport declare class ChatXAIResponses<CallOptions extends ChatXAIResponsesCallOptions = ChatXAIResponsesCallOptions> extends BaseChatModel<CallOptions> {\n static lc_name(): string;\n lc_serializable: boolean;\n lc_namespace: string[];\n get lc_secrets(): {\n [key: string]: string;\n } | undefined;\n get lc_aliases(): {\n [key: string]: string;\n } | undefined;\n apiKey: string;\n model: string;\n streaming: boolean;\n temperature?: number;\n topP?: number;\n maxOutputTokens?: number;\n store?: boolean;\n user?: string;\n baseURL: string;\n searchParameters?: XAIResponsesSearchParameters;\n reasoning?: XAIResponsesReasoning;\n constructor(fields?: ChatXAIResponsesInput);\n _llmType(): string;\n getLsParams(options: this[\"ParsedCallOptions\"]): LangSmithParams;\n toJSON(): Serialized;\n invocationParams(options?: this[\"ParsedCallOptions\"]): ChatXAIResponsesInvocationParams;\n /**\n * Makes a request to the xAI Responses API.\n */\n protected _makeRequest(request: XAIResponsesCreateParamsNonStreaming): Promise<XAIResponse>;\n protected _makeRequest(request: XAIResponsesCreateParamsStreaming): Promise<AsyncIterable<XAIResponsesStreamEvent>>;\n /**\n * Makes a streaming request to the xAI Responses API.\n */\n protected _makeStreamingRequest(url: string, headers: Record<string, string>, request: XAIResponsesCreateParams): AsyncIterable<XAIResponsesStreamEvent>;\n _generate(messages: BaseMessage[], options: this[\"ParsedCallOptions\"], runManager?: CallbackManagerForLLMRun): Promise<ChatResult>;\n _streamResponseChunks(messages: BaseMessage[], options: this[\"ParsedCallOptions\"], runManager?: CallbackManagerForLLMRun): AsyncGenerator<ChatGenerationChunk>;\n}\n//# sourceMappingURL=responses.d.ts.map"],"mappings":";;;;;;;;;;AA0BA;;;;;;;;;;;;;;;;;;AAkC2FW,cAlCtEM,gBAkCsEN,CAAAA,oBAlCjCJ,2BAkCiCI,GAlCHJ,2BAkCGI,CAAAA,SAlCkCT,aAkClCS,CAlCgDO,WAkChDP,CAAAA,CAAAA;EAAyCK,OAAAA,OAAAA,CAAAA,CAAAA,EAAAA,MAAAA;EAAdI,eAAAA,EAAAA,OAAAA;EAC9FnB,YAAAA,EAAAA,MAAAA,EAAAA;EAAgED,IAAAA,UAAAA,CAAAA,CAAAA,EAAAA;IAAmCK,CAAAA,GAAAA,EAAAA,MAAAA,CAAAA,EAAAA,MAAAA;EAARc,CAAAA,GAAAA,SAAAA;EAC/ElB,IAAAA,UAAAA,CAAAA,CAAAA,EAAAA;IAAgED,CAAAA,GAAAA,EAAAA,MAAAA,CAAAA,EAAAA,MAAAA;EAA0CI,CAAAA,GAAAA,SAAAA;EAAfkB,MAAAA,EAAAA,MAAAA;EApCFpB,KAAAA,EAAAA,MAAAA;EAAa,SAAA,EAAA,OAAA;;;;;;;qBAmBnHa;cACPD;uBACSN;;mDAE4BL;YACvCG;yDAC6CG;;;;kCAIvBG,uCAAuCO,QAAQT;kCAC/CG,oCAAoCM,QAAQC,cAAcJ;;;;wDAIpCK,iCAAiCV,2BAA2BS,cAAcJ;sBAC5Gf,gEAAgED,2BAA2BmB,QAAQd;kCACvFJ,gEAAgED,2BAA2BsB,eAAelB"}
@@ -0,0 +1,69 @@
1
+ import { ChatXAIResponsesCallOptions, ChatXAIResponsesInput, ChatXAIResponsesInvocationParams, XAIResponse, XAIResponsesCreateParams, XAIResponsesCreateParamsNonStreaming, XAIResponsesCreateParamsStreaming, XAIResponsesReasoning, XAIResponsesSearchParameters, XAIResponsesStreamEvent } from "./responses-types.js";
2
+ import { BaseChatModel, LangSmithParams } from "@langchain/core/language_models/chat_models";
3
+ import { BaseMessage } from "@langchain/core/messages";
4
+ import { ChatGenerationChunk, ChatResult } from "@langchain/core/outputs";
5
+ import { Serialized } from "@langchain/core/load/serializable";
6
+ import { CallbackManagerForLLMRun } from "@langchain/core/callbacks/manager";
7
+
8
+ //#region src/chat_models/responses.d.ts
9
+
10
+ /**
11
+ * xAI Responses API chat model integration.
12
+ *
13
+ * This class provides access to xAI's Responses API, which offers enhanced
14
+ * capabilities including built-in tools, reasoning, and search.
15
+ *
16
+ * @example
17
+ * ```typescript
18
+ * import { ChatXAIResponses } from "@langchain/xai";
19
+ *
20
+ * const llm = new ChatXAIResponses({
21
+ * model: "grok-3",
22
+ * temperature: 0.7,
23
+ * });
24
+ *
25
+ * const result = await llm.invoke("What is the capital of France?");
26
+ * console.log(result.content);
27
+ * ```
28
+ */
29
+ declare class ChatXAIResponses<CallOptions extends ChatXAIResponsesCallOptions = ChatXAIResponsesCallOptions> extends BaseChatModel<CallOptions> {
30
+ static lc_name(): string;
31
+ lc_serializable: boolean;
32
+ lc_namespace: string[];
33
+ get lc_secrets(): {
34
+ [key: string]: string;
35
+ } | undefined;
36
+ get lc_aliases(): {
37
+ [key: string]: string;
38
+ } | undefined;
39
+ apiKey: string;
40
+ model: string;
41
+ streaming: boolean;
42
+ temperature?: number;
43
+ topP?: number;
44
+ maxOutputTokens?: number;
45
+ store?: boolean;
46
+ user?: string;
47
+ baseURL: string;
48
+ searchParameters?: XAIResponsesSearchParameters;
49
+ reasoning?: XAIResponsesReasoning;
50
+ constructor(fields?: ChatXAIResponsesInput);
51
+ _llmType(): string;
52
+ getLsParams(options: this["ParsedCallOptions"]): LangSmithParams;
53
+ toJSON(): Serialized;
54
+ invocationParams(options?: this["ParsedCallOptions"]): ChatXAIResponsesInvocationParams;
55
+ /**
56
+ * Makes a request to the xAI Responses API.
57
+ */
58
+ protected _makeRequest(request: XAIResponsesCreateParamsNonStreaming): Promise<XAIResponse>;
59
+ protected _makeRequest(request: XAIResponsesCreateParamsStreaming): Promise<AsyncIterable<XAIResponsesStreamEvent>>;
60
+ /**
61
+ * Makes a streaming request to the xAI Responses API.
62
+ */
63
+ protected _makeStreamingRequest(url: string, headers: Record<string, string>, request: XAIResponsesCreateParams): AsyncIterable<XAIResponsesStreamEvent>;
64
+ _generate(messages: BaseMessage[], options: this["ParsedCallOptions"], runManager?: CallbackManagerForLLMRun): Promise<ChatResult>;
65
+ _streamResponseChunks(messages: BaseMessage[], options: this["ParsedCallOptions"], runManager?: CallbackManagerForLLMRun): AsyncGenerator<ChatGenerationChunk>;
66
+ }
67
+ //#endregion
68
+ export { ChatXAIResponses };
69
+ //# sourceMappingURL=responses.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"responses.d.ts","names":["CallbackManagerForLLMRun","BaseMessage","BaseChatModel","LangSmithParams","ChatGenerationChunk","ChatResult","Serialized","ChatXAIResponsesCallOptions","ChatXAIResponsesInput","ChatXAIResponsesInvocationParams","XAIResponse","XAIResponsesCreateParams","XAIResponsesCreateParamsNonStreaming","XAIResponsesCreateParamsStreaming","XAIResponsesReasoning","XAIResponsesSearchParameters","XAIResponsesStreamEvent","ChatXAIResponses","CallOptions","Promise","AsyncIterable","Record","AsyncGenerator"],"sources":["../../src/chat_models/responses.d.ts"],"sourcesContent":["import { CallbackManagerForLLMRun } from \"@langchain/core/callbacks/manager\";\nimport { BaseMessage } from \"@langchain/core/messages\";\nimport { BaseChatModel, type LangSmithParams } from \"@langchain/core/language_models/chat_models\";\nimport { ChatGenerationChunk, type ChatResult } from \"@langchain/core/outputs\";\nimport { Serialized } from \"@langchain/core/load/serializable\";\nimport type { ChatXAIResponsesCallOptions, ChatXAIResponsesInput, ChatXAIResponsesInvocationParams, XAIResponse, XAIResponsesCreateParams, XAIResponsesCreateParamsNonStreaming, XAIResponsesCreateParamsStreaming, XAIResponsesReasoning, XAIResponsesSearchParameters, XAIResponsesStreamEvent } from \"./responses-types.js\";\nexport type { ChatXAIResponsesCallOptions, ChatXAIResponsesInput, ChatXAIResponsesInvocationParams, };\n/**\n * xAI Responses API chat model integration.\n *\n * This class provides access to xAI's Responses API, which offers enhanced\n * capabilities including built-in tools, reasoning, and search.\n *\n * @example\n * ```typescript\n * import { ChatXAIResponses } from \"@langchain/xai\";\n *\n * const llm = new ChatXAIResponses({\n * model: \"grok-3\",\n * temperature: 0.7,\n * });\n *\n * const result = await llm.invoke(\"What is the capital of France?\");\n * console.log(result.content);\n * ```\n */\nexport declare class ChatXAIResponses<CallOptions extends ChatXAIResponsesCallOptions = ChatXAIResponsesCallOptions> extends BaseChatModel<CallOptions> {\n static lc_name(): string;\n lc_serializable: boolean;\n lc_namespace: string[];\n get lc_secrets(): {\n [key: string]: string;\n } | undefined;\n get lc_aliases(): {\n [key: string]: string;\n } | undefined;\n apiKey: string;\n model: string;\n streaming: boolean;\n temperature?: number;\n topP?: number;\n maxOutputTokens?: number;\n store?: boolean;\n user?: string;\n baseURL: string;\n searchParameters?: XAIResponsesSearchParameters;\n reasoning?: XAIResponsesReasoning;\n constructor(fields?: ChatXAIResponsesInput);\n _llmType(): string;\n getLsParams(options: this[\"ParsedCallOptions\"]): LangSmithParams;\n toJSON(): Serialized;\n invocationParams(options?: this[\"ParsedCallOptions\"]): ChatXAIResponsesInvocationParams;\n /**\n * Makes a request to the xAI Responses API.\n */\n protected _makeRequest(request: XAIResponsesCreateParamsNonStreaming): Promise<XAIResponse>;\n protected _makeRequest(request: XAIResponsesCreateParamsStreaming): Promise<AsyncIterable<XAIResponsesStreamEvent>>;\n /**\n * Makes a streaming request to the xAI Responses API.\n */\n protected _makeStreamingRequest(url: string, headers: Record<string, string>, request: XAIResponsesCreateParams): AsyncIterable<XAIResponsesStreamEvent>;\n _generate(messages: BaseMessage[], options: this[\"ParsedCallOptions\"], runManager?: CallbackManagerForLLMRun): Promise<ChatResult>;\n _streamResponseChunks(messages: BaseMessage[], options: this[\"ParsedCallOptions\"], runManager?: CallbackManagerForLLMRun): AsyncGenerator<ChatGenerationChunk>;\n}\n//# sourceMappingURL=responses.d.ts.map"],"mappings":";;;;;;;;;;AA0BA;;;;;;;;;;;;;;;;;;AAkC2FW,cAlCtEM,gBAkCsEN,CAAAA,oBAlCjCJ,2BAkCiCI,GAlCHJ,2BAkCGI,CAAAA,SAlCkCT,aAkClCS,CAlCgDO,WAkChDP,CAAAA,CAAAA;EAAyCK,OAAAA,OAAAA,CAAAA,CAAAA,EAAAA,MAAAA;EAAdI,eAAAA,EAAAA,OAAAA;EAC9FnB,YAAAA,EAAAA,MAAAA,EAAAA;EAAgED,IAAAA,UAAAA,CAAAA,CAAAA,EAAAA;IAAmCK,CAAAA,GAAAA,EAAAA,MAAAA,CAAAA,EAAAA,MAAAA;EAARc,CAAAA,GAAAA,SAAAA;EAC/ElB,IAAAA,UAAAA,CAAAA,CAAAA,EAAAA;IAAgED,CAAAA,GAAAA,EAAAA,MAAAA,CAAAA,EAAAA,MAAAA;EAA0CI,CAAAA,GAAAA,SAAAA;EAAfkB,MAAAA,EAAAA,MAAAA;EApCFpB,KAAAA,EAAAA,MAAAA;EAAa,SAAA,EAAA,OAAA;;;;;;;qBAmBnHa;cACPD;uBACSN;;mDAE4BL;YACvCG;yDAC6CG;;;;kCAIvBG,uCAAuCO,QAAQT;kCAC/CG,oCAAoCM,QAAQC,cAAcJ;;;;wDAIpCK,iCAAiCV,2BAA2BS,cAAcJ;sBAC5Gf,gEAAgED,2BAA2BmB,QAAQd;kCACvFJ,gEAAgED,2BAA2BsB,eAAelB"}