Skip to content

Commit

Permalink
SDK regeneration
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Jun 17, 2024
1 parent 15dbda8 commit c18dabc
Show file tree
Hide file tree
Showing 33 changed files with 2,522 additions and 860 deletions.
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cohere-ai",
"version": "7.10.5",
"version": "7.10.6",
"private": false,
"repository": "https://github.com/cohere-ai/cohere-typescript",
"main": "./index.js",
Expand All @@ -20,7 +20,6 @@
"js-base64": "3.7.2",
"form-data-encoder": "^4.0.2",
"readable-stream": "^4.5.2",
"web-streams-polyfill": "^4.0.0",
"@aws-sdk/client-sagemaker": "^3.583.0",
"@aws-sdk/credential-providers": "^3.583.0",
"@aws-sdk/protocol-http": "^3.374.0",
Expand All @@ -36,9 +35,9 @@
"jest-environment-jsdom": "29.7.0",
"@types/node": "17.0.33",
"prettier": "2.7.1",
"ts-loader": "^9.5.1",
"typescript": "4.6.4",
"@types/readable-stream": "^4.0.14",
"ts-loader": "^9.5.1",
"webpack": "^5.91.0"
}
}
658 changes: 646 additions & 12 deletions src/Client.ts

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions src/api/errors/ClientClosedRequestError.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/

import * as errors from "../../errors/index";
import * as Cohere from "../index";

export class ClientClosedRequestError extends errors.CohereError {
constructor(body: Cohere.ClientClosedRequestErrorBody) {
super({
message: "ClientClosedRequestError",
statusCode: 499,
body: body,
});
Object.setPrototypeOf(this, ClientClosedRequestError.prototype);
}
}
17 changes: 17 additions & 0 deletions src/api/errors/GatewayTimeoutError.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/

import * as errors from "../../errors/index";
import * as Cohere from "../index";

export class GatewayTimeoutError extends errors.CohereError {
constructor(body: Cohere.GatewayTimeoutErrorBody) {
super({
message: "GatewayTimeoutError",
statusCode: 504,
body: body,
});
Object.setPrototypeOf(this, GatewayTimeoutError.prototype);
}
}
17 changes: 17 additions & 0 deletions src/api/errors/NotImplementedError.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/

import * as errors from "../../errors/index";
import * as Cohere from "../index";

export class NotImplementedError extends errors.CohereError {
constructor(body: Cohere.NotImplementedErrorBody) {
super({
message: "NotImplementedError",
statusCode: 501,
body: body,
});
Object.setPrototypeOf(this, NotImplementedError.prototype);
}
}
3 changes: 1 addition & 2 deletions src/api/errors/ServiceUnavailableError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
*/

import * as errors from "../../errors/index";
import * as Cohere from "../index";

export class ServiceUnavailableError extends errors.CohereError {
constructor(body: Cohere.finetuning.Error_) {
constructor(body?: unknown) {
super({
message: "ServiceUnavailableError",
statusCode: 503,
Expand Down
3 changes: 1 addition & 2 deletions src/api/errors/UnauthorizedError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
*/

import * as errors from "../../errors/index";
import * as Cohere from "../index";

export class UnauthorizedError extends errors.CohereError {
constructor(body: Cohere.finetuning.Error_) {
constructor(body?: unknown) {
super({
message: "UnauthorizedError",
statusCode: 401,
Expand Down
17 changes: 17 additions & 0 deletions src/api/errors/UnprocessableEntityError.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/

import * as errors from "../../errors/index";
import * as Cohere from "../index";

export class UnprocessableEntityError extends errors.CohereError {
constructor(body: Cohere.UnprocessableEntityErrorBody) {
super({
message: "UnprocessableEntityError",
statusCode: 422,
body: body,
});
Object.setPrototypeOf(this, UnprocessableEntityError.prototype);
}
}
12 changes: 8 additions & 4 deletions src/api/errors/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
export * from "./TooManyRequestsError";
export * from "./BadRequestError";
export * from "./InternalServerError";
export * from "./NotFoundError";
export * from "./ForbiddenError";
export * from "./UnauthorizedError";
export * from "./ForbiddenError";
export * from "./NotFoundError";
export * from "./UnprocessableEntityError";
export * from "./TooManyRequestsError";
export * from "./ClientClosedRequestError";
export * from "./InternalServerError";
export * from "./NotImplementedError";
export * from "./ServiceUnavailableError";
export * from "./GatewayTimeoutError";
Loading

0 comments on commit c18dabc

Please sign in to comment.