import { ChatOpenAIToolType, ResponsesTool } from "../utils/tools.js";
import { OpenAIVerbosityParam } from "../types.js";
import { BaseChatOpenAI, BaseChatOpenAICallOptions, BaseChatOpenAIFields } from "./base.js";
import { OpenAI } from "openai";
import { BaseMessage } from "@langchain/core/messages";
import { ChatGenerationChunk, ChatResult } from "@langchain/core/outputs";
import { CallbackManagerForLLMRun } from "@langchain/core/callbacks/manager";
import { ChatModelStreamEvent } from "@langchain/core/language_models/event";

//#region src/chat_models/responses.d.ts
interface ChatOpenAIResponsesCallOptions extends BaseChatOpenAICallOptions {
  /**
   * Configuration options for a text response from the model. Can be plain text or
   * structured JSON data.
   */
  text?: OpenAI.Responses.ResponseCreateParams["text"];
  /**
   * The truncation strategy to use for the model response.
   */
  truncation?: OpenAI.Responses.ResponseCreateParams["truncation"];
  /**
   * Specify additional output data to include in the model response.
   */
  include?: OpenAI.Responses.ResponseCreateParams["include"];
  /**
   * The unique ID of the previous response to the model. Use this to create multi-turn
   * conversations.
   */
  previous_response_id?: OpenAI.Responses.ResponseCreateParams["previous_response_id"];
  /**
   * The verbosity of the model's response.
   */
  verbosity?: OpenAIVerbosityParam;
}
type ChatResponsesInvocationParams = Omit<OpenAI.Responses.ResponseCreateParams, "input">;
/**
 * OpenAI Responses API implementation.
 *
 * Will be exported in a later version of @langchain/openai.
 *
 * @internal
 */
declare class ChatOpenAIResponses<CallOptions extends ChatOpenAIResponsesCallOptions = ChatOpenAIResponsesCallOptions> extends BaseChatOpenAI<CallOptions> {
  constructor(model: string, fields?: Omit<BaseChatOpenAIFields, "model">);
  constructor(fields?: BaseChatOpenAIFields);
  invocationParams(options?: this["ParsedCallOptions"]): ChatResponsesInvocationParams;
  _generate(messages: BaseMessage[], options: this["ParsedCallOptions"], runManager?: CallbackManagerForLLMRun): Promise<ChatResult>;
  _streamChatModelEvents(messages: BaseMessage[], options: this["ParsedCallOptions"], _runManager?: CallbackManagerForLLMRun): AsyncGenerator<ChatModelStreamEvent>;
  /** Provider id used in native stream protocol passthrough events. */
  protected get streamEventProvider(): string;
  _streamResponseChunks(messages: BaseMessage[], options: this["ParsedCallOptions"], runManager?: CallbackManagerForLLMRun): AsyncGenerator<ChatGenerationChunk>;
  /**
   * Calls the Responses API with retry logic in case of failures.
   * @param request The request to send to the OpenAI API.
   * @param options Optional configuration for the API call.
   * @returns The response from the OpenAI API.
   */
  completionWithRetry(request: OpenAI.Responses.ResponseCreateParamsStreaming, requestOptions?: OpenAI.RequestOptions): Promise<AsyncIterable<OpenAI.Responses.ResponseStreamEvent>>;
  completionWithRetry(request: OpenAI.Responses.ResponseCreateParamsNonStreaming, requestOptions?: OpenAI.RequestOptions): Promise<OpenAI.Responses.Response>;
  /** @internal */
  protected _reduceChatOpenAITools(tools: ChatOpenAIToolType[], fields: {
    stream?: boolean;
    strict?: boolean;
  }): ResponsesTool[];
}
//#endregion
export { ChatOpenAIResponses, ChatOpenAIResponsesCallOptions, ChatResponsesInvocationParams };
//# sourceMappingURL=responses.d.ts.map