doomiaichat 7.1.11 → 7.1.12
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/corzbot.js +6 -6
- package/package.json +1 -1
- package/src/corzbot.ts +6 -5
package/dist/corzbot.js
CHANGED
|
@@ -209,12 +209,12 @@ class CorzBot extends gptbase_1.default {
|
|
|
209
209
|
const response = this.botid ? yield client.chat.create(params) : yield client.workflows.runs.create(params);
|
|
210
210
|
if (this.workflowid && response.msg === 'Success') {
|
|
211
211
|
const resp = response.data;
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
}
|
|
215
|
-
catch (error) {
|
|
216
|
-
|
|
217
|
-
}
|
|
212
|
+
return { successed: true, message: [{ role: 'assistant', type: 'answer', content: resp }] };
|
|
213
|
+
// try {
|
|
214
|
+
// return { successed: true, message: [{ role: 'assistant', type: 'answer', content: JSON.parse(resp).data }] };
|
|
215
|
+
// } catch (error) {
|
|
216
|
+
// return { successed: true, message: [{ role: 'assistant', type: 'answer', content: resp }] };
|
|
217
|
+
// }
|
|
218
218
|
}
|
|
219
219
|
if (!this.workflowid && response.conversation_id && response.id) {
|
|
220
220
|
const ccd = response;
|
package/package.json
CHANGED
package/src/corzbot.ts
CHANGED
|
@@ -191,11 +191,12 @@ export default class CorzBot extends GptBase {
|
|
|
191
191
|
const response = this.botid ? await client.chat.create(params as CreateChatReq) :await client.workflows.runs.create(params as RunWorkflowReq);
|
|
192
192
|
if (this.workflowid && (response as RunWorkflowData).msg === 'Success') {
|
|
193
193
|
const resp = (response as RunWorkflowData).data;
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
}
|
|
194
|
+
return { successed: true, message: [{ role: 'assistant', type: 'answer', content: resp }] };
|
|
195
|
+
// try {
|
|
196
|
+
// return { successed: true, message: [{ role: 'assistant', type: 'answer', content: JSON.parse(resp).data }] };
|
|
197
|
+
// } catch (error) {
|
|
198
|
+
// return { successed: true, message: [{ role: 'assistant', type: 'answer', content: resp }] };
|
|
199
|
+
// }
|
|
199
200
|
}
|
|
200
201
|
if (!this.workflowid && (response as CreateChatData).conversation_id && (response as CreateChatData).id) {
|
|
201
202
|
const ccd = response as CreateChatData;
|