Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
  • Loading branch information
winily committed Mar 20, 2024
1 parent 103f759 commit 457d261
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 27 deletions.
6 changes: 1 addition & 5 deletions dist/index.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@ var Files = class extends BaseApi {
};

// lib/zhipu-ai.ts
var import_http = require("http");
var ZhipuAI = class {
constructor(options = {}) {
this.options = options;
Expand Down Expand Up @@ -278,10 +277,7 @@ var ZhipuAI = class {
}
createCompletions(options) {
return __async(this, null, function* () {
const result = yield this.completions.create(options);
if (result instanceof import_http.IncomingMessage)
return result;
return result;
return this.completions.create(options);
});
}
createImages(options) {
Expand Down
2 changes: 1 addition & 1 deletion dist/index.cjs.map

Large diffs are not rendered by default.

6 changes: 1 addition & 5 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

6 changes: 1 addition & 5 deletions dist/zhipu-ai.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ var Files = class extends BaseApi {
};

// lib/zhipu-ai.ts
var import_http = require("http");
var ZhipuAI = class {
constructor(options = {}) {
this.options = options;
Expand Down Expand Up @@ -273,10 +272,7 @@ var ZhipuAI = class {
}
createCompletions(options) {
return __async(this, null, function* () {
const result = yield this.completions.create(options);
if (result instanceof import_http.IncomingMessage)
return result;
return result;
return this.completions.create(options);
});
}
createImages(options) {
Expand Down
2 changes: 1 addition & 1 deletion dist/zhipu-ai.cjs.map

Large diffs are not rendered by default.

6 changes: 1 addition & 5 deletions dist/zhipu-ai.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/zhipu-ai.js.map

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions lib/zhipu-ai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ export class ZhipuAI {
}

public async createCompletions(options: CreateCompletionsOptions): Promise<CompletionsResponseMessage | IncomingMessage> {
const result = await this.completions.create(options);
if (result instanceof IncomingMessage) return result
return result
return this.completions.create(options);
}

public async createImages(options: CreateImagesOptions): Promise<ImagesResponse> {
Expand Down

0 comments on commit 457d261

Please sign in to comment.