Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exported response api types4 #1418

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 66 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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;
Expand Down
33 changes: 32 additions & 1 deletion src/resources/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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';
33 changes: 32 additions & 1 deletion src/resources/responses/index.ts
Original file line number Diff line number Diff line change
@@ -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";