doomiaichat 7.1.25 → 7.1.26
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 +5 -5
- package/package.json +1 -1
- package/src/corzbot.ts +3 -3
package/dist/corzbot.js
CHANGED
|
@@ -135,7 +135,7 @@ class CorzBot extends gptbase_1.default {
|
|
|
135
135
|
* @param _axiosOption
|
|
136
136
|
*/
|
|
137
137
|
getRequestStream(client, message, callChatOption = {}) {
|
|
138
|
-
var _a, _b
|
|
138
|
+
var _a, _b;
|
|
139
139
|
return __awaiter(this, void 0, void 0, function* () {
|
|
140
140
|
//简单的对话请求
|
|
141
141
|
if (this.botid) {
|
|
@@ -155,7 +155,8 @@ class CorzBot extends gptbase_1.default {
|
|
|
155
155
|
workflow_id: this.workflowid,
|
|
156
156
|
is_async: false,
|
|
157
157
|
// parameters: Object.assign({ input: message[0]?.content }, this.setting.customVariables || {}, callChatOption.customVariables || {}),
|
|
158
|
-
parameters: Object.assign({ request_src: 1 }, callChatOption.parameters || {}, { input:
|
|
158
|
+
// parameters: Object.assign({ request_src: 1 }, callChatOption.parameters || {}, { input: message[0]?.content })
|
|
159
|
+
parameters: Object.assign({ request_src: 1 }, callChatOption.parameters || {}, { input: message })
|
|
159
160
|
};
|
|
160
161
|
if (callChatOption.userid || callChatOption.cozeUserID)
|
|
161
162
|
worflowreq.ext = Object.assign({}, worflowreq.ext || {}, { user_id: callChatOption.userid || callChatOption.cozeUserID });
|
|
@@ -163,11 +164,10 @@ class CorzBot extends gptbase_1.default {
|
|
|
163
164
|
}
|
|
164
165
|
const worflowreq = {
|
|
165
166
|
additional_messages: message,
|
|
166
|
-
ext:
|
|
167
|
+
ext: { user_id: '12345678' },
|
|
167
168
|
workflow_id: this.talkflowid,
|
|
168
|
-
conversation_id: (
|
|
169
|
+
conversation_id: (_b = callChatOption.session_id) !== null && _b !== void 0 ? _b : yield this.createCoversation(client),
|
|
169
170
|
parameters: Object.assign({ request_src: 1 }, callChatOption.parameters || {}) //Object.assign({}, this.setting.customVariables || {}, callChatOption.customVariables || {}),
|
|
170
|
-
//parameters: { input: message[0]?.content }
|
|
171
171
|
};
|
|
172
172
|
if (callChatOption.userid || callChatOption.cozeUserID)
|
|
173
173
|
worflowreq.ext = Object.assign({}, worflowreq.ext || {}, { user_id: callChatOption.userid || callChatOption.cozeUserID });
|
package/package.json
CHANGED
package/src/corzbot.ts
CHANGED
|
@@ -143,18 +143,18 @@ export default class CorzBot extends GptBase {
|
|
|
143
143
|
workflow_id: this.workflowid,//callChatOption.workflowid,
|
|
144
144
|
is_async: false,
|
|
145
145
|
// parameters: Object.assign({ input: message[0]?.content }, this.setting.customVariables || {}, callChatOption.customVariables || {}),
|
|
146
|
-
parameters: Object.assign({ request_src: 1 }, callChatOption.parameters || {}, { input: message[0]?.content })
|
|
146
|
+
// parameters: Object.assign({ request_src: 1 }, callChatOption.parameters || {}, { input: message[0]?.content })
|
|
147
|
+
parameters: Object.assign({ request_src: 1 }, callChatOption.parameters || {}, { input: message})
|
|
147
148
|
}
|
|
148
149
|
if (callChatOption.userid || callChatOption.cozeUserID) worflowreq.ext = Object.assign({}, worflowreq.ext || {}, { user_id: callChatOption.userid || callChatOption.cozeUserID });
|
|
149
150
|
return worflowreq as T;
|
|
150
151
|
}
|
|
151
152
|
const worflowreq: ChatWorkflowReq = {
|
|
152
153
|
additional_messages: message,
|
|
153
|
-
ext:
|
|
154
|
+
ext: {user_id:'12345678'},
|
|
154
155
|
workflow_id: this.talkflowid!,//callChatOption.workflowid,
|
|
155
156
|
conversation_id: callChatOption.session_id ?? await this.createCoversation(client),
|
|
156
157
|
parameters: Object.assign({ request_src: 1 }, callChatOption.parameters || {}) //Object.assign({}, this.setting.customVariables || {}, callChatOption.customVariables || {}),
|
|
157
|
-
//parameters: { input: message[0]?.content }
|
|
158
158
|
}
|
|
159
159
|
if (callChatOption.userid || callChatOption.cozeUserID) worflowreq.ext = Object.assign({}, worflowreq.ext||{}, { user_id: callChatOption.userid || callChatOption.cozeUserID });
|
|
160
160
|
return worflowreq as T;
|