From 1a6b6d610f3abed6e927b1e921a6e9f52f66dd61 Mon Sep 17 00:00:00 2001 From: Ankit varshney Date: Wed, 26 Mar 2025 16:08:27 +0530 Subject: [PATCH] exported response api types4 --- src/index.ts | 69 ++++++++++++++++++++++++++++++-- src/resources/index.ts | 33 ++++++++++++++- src/resources/responses/index.ts | 33 ++++++++++++++- 3 files changed, 130 insertions(+), 5 deletions(-) diff --git a/src/index.ts b/src/index.ts index 931894f2f..99b40e739 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { type Agent, type RequestInit } from './_shims/index'; +import { type Agent, type RequestInit } from './_shims/index'; import * as qs from './internal/qs'; import * as Core from './core'; import * as Errors from './error'; @@ -67,7 +67,38 @@ import { Audio, AudioModel, AudioResponseFormat } from './resources/audio/audio' import { Beta } from './resources/beta/beta'; import { Chat } from './resources/chat/chat'; import { FineTuning } from './resources/fine-tuning/fine-tuning'; -import { Responses } from './resources/responses/responses'; +import { + Response, + ComputerTool, + EasyInputMessage, + FileSearchTool, + FunctionTool, + ResponseCompletedEvent, + ResponseComputerToolCall, + ResponseCreateParams, + ResponseCreateParamsNonStreaming, + ResponseFunctionWebSearch, + ResponseFileSearchToolCall, + ResponseFunctionToolCall, + ResponseReasoningItem, + ResponseOutputItem, + ResponseOutputRefusal, + ResponseOutputText, + ResponseOutputMessage, + ResponseInput, + ResponseInputMessageContentList, + Responses, + ResponseStatus, + ResponseTextConfig, + ResponseUsage, + Tool, + ToolChoiceFunction, + ToolChoiceOptions, + ToolChoiceTypes, + WebSearchTool, + ResponseCreateParamsStreaming, + ResponseStreamEvent, +} from './resources/responses/responses'; import { Upload, UploadCompleteParams, @@ -506,7 +537,39 @@ export declare namespace OpenAI { type UploadCompleteParams as UploadCompleteParams, }; - export { Responses as Responses }; + export { + Responses as Responses, + type Response as Response + type ResponseCreateParams as ResponseCreateParams, + type ResponseCreateParamsNonStreaming as ResponseCreateParamsNonStreaming, + type ResponseCreateParamsStreaming as ResponseCreateParamsStreaming, + type ResponseStatus as ResponseStatus, + type ResponseCompletedEvent as ResponseCompletedEvent, + type ResponseUsage as ResponseUsage, + type ResponseTextConfig as ResponseTextConfig, + type Tool as Tool, + type ComputerTool as ComputerTool, + type FileSearchTool as FileSearchTool, + type FunctionTool as FunctionTool, + type WebSearchTool as WebSearchTool, + type ToolChoiceOptions as ToolChoiceOptions, + type ToolChoiceFunction as ToolChoiceFunction, + type ToolChoiceTypes as ToolChoiceTypes, + type ResponseInput as ResponseInput, + type ResponseInputMessageContentList as ResponseInputMessageContentList, + type ResponseOutputMessage as ResponseOutputMessage, + type ResponseOutputText as ResponseOutputText, + type ResponseOutputRefusal as ResponseOutputRefusal, + type ResponseOutputItem as ResponseOutputItem, + type ResponseReasoningItem as ResponseReasoningItem, + type ResponseFunctionToolCall as ResponseFunctionToolCall, + type ResponseFileSearchToolCall as ResponseFileSearchToolCall, + type ResponseFunctionWebSearch as ResponseFunctionWebSearch, + type ResponseComputerToolCall as ResponseComputerToolCall, + type EasyInputMessage as EasyInputMessage, + type ResponseStreamEvent as ResponseStreamEvent, + + }; export type AllModels = API.AllModels; export type ChatModel = API.ChatModel; diff --git a/src/resources/index.ts b/src/resources/index.ts index 04c2c887b..70aeef4b6 100644 --- a/src/resources/index.ts +++ b/src/resources/index.ts @@ -60,7 +60,6 @@ export { type ModerationCreateResponse, type ModerationCreateParams, } from './moderations'; -export { Responses } from './responses/responses'; export { Uploads, type Upload, type UploadCreateParams, type UploadCompleteParams } from './uploads/uploads'; export { VectorStoresPage, @@ -81,3 +80,35 @@ export { type VectorStoreListParams, type VectorStoreSearchParams, } from './vector-stores/vector-stores'; +export { + Responses, + type Response, + type ResponseCreateParams, + type ResponseCreateParamsNonStreaming, + type ResponseCreateParamsStreaming, + type ResponseStatus, + type ResponseCompletedEvent, + type ResponseUsage, + type ResponseTextConfig, + type Tool, + type ComputerTool, + type FileSearchTool, + type FunctionTool, + type WebSearchTool, + type ToolChoiceOptions, + type ToolChoiceFunction, + type ToolChoiceTypes, + type ResponseInput, + type ResponseInputMessageContentList, + type ResponseOutputMessage, + type ResponseOutputText, + type ResponseOutputRefusal, + type ResponseOutputItem, + type ResponseReasoningItem, + type ResponseFunctionToolCall, + type ResponseFileSearchToolCall, + type ResponseFunctionWebSearch, + type ResponseComputerToolCall, + type EasyInputMessage, + type ResponseStreamEvent, +} from './responses/responses'; \ No newline at end of file diff --git a/src/resources/responses/index.ts b/src/resources/responses/index.ts index ad3f9a386..f792c0f45 100644 --- a/src/resources/responses/index.ts +++ b/src/resources/responses/index.ts @@ -1,4 +1,35 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. export { InputItems, type ResponseItemList, type InputItemListParams } from './input-items'; -export { Responses } from './responses'; +export { + Responses, + type Response, + type ResponseCreateParams, + type ResponseCreateParamsNonStreaming, + type ResponseCreateParamsStreaming, + type ResponseStatus, + type ResponseCompletedEvent, + type ResponseUsage, + type ResponseTextConfig, + type Tool, + type ComputerTool, + type FileSearchTool, + type FunctionTool, + type WebSearchTool, + type ToolChoiceOptions, + type ToolChoiceFunction, + type ToolChoiceTypes, + type ResponseInput, + type ResponseInputMessageContentList, + type ResponseOutputMessage, + type ResponseOutputText, + type ResponseOutputRefusal, + type ResponseOutputItem, + type ResponseReasoningItem, + type ResponseFunctionToolCall, + type ResponseFileSearchToolCall, + type ResponseFunctionWebSearch, + type ResponseComputerToolCall, + type EasyInputMessage, + type ResponseStreamEvent, +} from "./responses";