doomiaichat 3.2.0 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/openai.js +2 -1
- package/package.json +1 -1
- package/src/openai.ts +2 -2
package/dist/openai.js
CHANGED
|
@@ -120,6 +120,7 @@ class OpenAIGpt extends gptbase_1.default {
|
|
|
120
120
|
try {
|
|
121
121
|
let finishreason = null, usage = null;
|
|
122
122
|
///便于知道返回的requestid
|
|
123
|
+
console.log('model', (callChatOption === null || callChatOption === void 0 ? void 0 : callChatOption.model) || this.chatModel);
|
|
123
124
|
const response = yield this.aiApi.createChatCompletion({
|
|
124
125
|
model: (callChatOption === null || callChatOption === void 0 ? void 0 : callChatOption.model) || this.chatModel,
|
|
125
126
|
messages: message,
|
|
@@ -154,7 +155,7 @@ class OpenAIGpt extends gptbase_1.default {
|
|
|
154
155
|
return { successed: true, requestid };
|
|
155
156
|
}
|
|
156
157
|
catch (error) {
|
|
157
|
-
|
|
158
|
+
this.emit('requesterror', { successed: false, requestid, error: 'call axios faied ' + error });
|
|
158
159
|
return { successed: false, requestid };
|
|
159
160
|
}
|
|
160
161
|
});
|
package/package.json
CHANGED
package/src/openai.ts
CHANGED
|
@@ -109,7 +109,7 @@ export default class OpenAIGpt extends GptBase {
|
|
|
109
109
|
try {
|
|
110
110
|
let finishreason:any = null,usage:any = null;
|
|
111
111
|
///便于知道返回的requestid
|
|
112
|
-
|
|
112
|
+
console.log('model', callChatOption?.model || this.chatModel,)
|
|
113
113
|
const response: any = await this.aiApi.createChatCompletion({
|
|
114
114
|
model: callChatOption?.model || this.chatModel,
|
|
115
115
|
messages: message,
|
|
@@ -142,7 +142,7 @@ export default class OpenAIGpt extends GptBase {
|
|
|
142
142
|
});
|
|
143
143
|
return { successed: true, requestid }
|
|
144
144
|
} catch (error) {
|
|
145
|
-
|
|
145
|
+
this.emit('requesterror', { successed: false, requestid, error: 'call axios faied ' + error });
|
|
146
146
|
return { successed: false, requestid }
|
|
147
147
|
}
|
|
148
148
|
}
|