Skip to content

Commit

Permalink
chore(internal): use reexports not destructuring (#604)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] committed Dec 17, 2024
1 parent 0f9db5c commit 9f2d9b1
Showing 1 changed file with 18 additions and 22 deletions.
40 changes: 18 additions & 22 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,31 +289,9 @@ export class Anthropic extends Core.APIClient {
static fileFromPath = Uploads.fileFromPath;
}

export const { HUMAN_PROMPT, AI_PROMPT } = Anthropic;

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

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

Anthropic.Completions = Completions;
Anthropic.Messages = Messages;
Anthropic.Beta = Beta;

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

Expand Down Expand Up @@ -384,5 +362,23 @@ export declare namespace Anthropic {
type BetaRateLimitError as BetaRateLimitError,
};
}
export const { HUMAN_PROMPT, AI_PROMPT } = Anthropic;

export { toFile, fileFromPath } from '@anthropic-ai/sdk/uploads';
export {
AnthropicError,
APIError,
APIConnectionError,
APIConnectionTimeoutError,
APIUserAbortError,
NotFoundError,
ConflictError,
RateLimitError,
BadRequestError,
AuthenticationError,
InternalServerError,
PermissionDeniedError,
UnprocessableEntityError,
} from '@anthropic-ai/sdk/error';

export default Anthropic;

0 comments on commit 9f2d9b1

Please sign in to comment.