Skip to content

Commit 457d261

Browse files
committed
style
1 parent 103f759 commit 457d261

File tree

9 files changed

+9
-27
lines changed

9 files changed

+9
-27
lines changed

dist/index.cjs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,6 @@ var Files = class extends BaseApi {
244244
};
245245

246246
// lib/zhipu-ai.ts
247-
var import_http = require("http");
248247
var ZhipuAI = class {
249248
constructor(options = {}) {
250249
this.options = options;
@@ -278,10 +277,7 @@ var ZhipuAI = class {
278277
}
279278
createCompletions(options) {
280279
return __async(this, null, function* () {
281-
const result = yield this.completions.create(options);
282-
if (result instanceof import_http.IncomingMessage)
283-
return result;
284-
return result;
280+
return this.completions.create(options);
285281
});
286282
}
287283
createImages(options) {

dist/index.cjs.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js

Lines changed: 1 addition & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/zhipu-ai.cjs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,6 @@ var Files = class extends BaseApi {
239239
};
240240

241241
// lib/zhipu-ai.ts
242-
var import_http = require("http");
243242
var ZhipuAI = class {
244243
constructor(options = {}) {
245244
this.options = options;
@@ -273,10 +272,7 @@ var ZhipuAI = class {
273272
}
274273
createCompletions(options) {
275274
return __async(this, null, function* () {
276-
const result = yield this.completions.create(options);
277-
if (result instanceof import_http.IncomingMessage)
278-
return result;
279-
return result;
275+
return this.completions.create(options);
280276
});
281277
}
282278
createImages(options) {

dist/zhipu-ai.cjs.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/zhipu-ai.js

Lines changed: 1 addition & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/zhipu-ai.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/zhipu-ai.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@ export class ZhipuAI {
5353
}
5454

5555
public async createCompletions(options: CreateCompletionsOptions): Promise<CompletionsResponseMessage | IncomingMessage> {
56-
const result = await this.completions.create(options);
57-
if (result instanceof IncomingMessage) return result
58-
return result
56+
return this.completions.create(options);
5957
}
6058

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

0 commit comments

Comments
 (0)