Skip to content

Commit

Permalink
chore(internal): use reexports not destructuring (#1181)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored Nov 11, 2024
1 parent eb8d2c1 commit c7e2b00
Showing 1 changed file with 17 additions and 20 deletions.
37 changes: 17 additions & 20 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -306,25 +306,6 @@ export class OpenAI extends Core.APIClient {
static fileFromPath = Uploads.fileFromPath;
}

export {
OpenAIError,
APIError,
APIConnectionError,
APIConnectionTimeoutError,
APIUserAbortError,
NotFoundError,
ConflictError,
RateLimitError,
BadRequestError,
AuthenticationError,
InternalServerError,
PermissionDeniedError,
UnprocessableEntityError,
} from './error';

export import toFile = Uploads.toFile;
export import fileFromPath = Uploads.fileFromPath;

OpenAI.Completions = Completions;
OpenAI.Chat = Chat;
OpenAI.Embeddings = Embeddings;
Expand All @@ -340,7 +321,6 @@ OpenAI.Beta = Beta;
OpenAI.Batches = Batches;
OpenAI.BatchesPage = BatchesPage;
OpenAI.Uploads = UploadsAPIUploads;

export declare namespace OpenAI {
export type RequestOptions = Core.RequestOptions;

Expand Down Expand Up @@ -472,4 +452,21 @@ export declare namespace OpenAI {
export type ResponseFormatText = API.ResponseFormatText;
}

export { toFile, fileFromPath } from 'openai/uploads';
export {
OpenAIError,
APIError,
APIConnectionError,
APIConnectionTimeoutError,
APIUserAbortError,
NotFoundError,
ConflictError,
RateLimitError,
BadRequestError,
AuthenticationError,
InternalServerError,
PermissionDeniedError,
UnprocessableEntityError,
} from 'openai/error';

export default OpenAI;

0 comments on commit c7e2b00

Please sign in to comment.