@hivegpt/hiveai-angular 0.0.331 → 0.0.333
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/bundles/hivegpt-hiveai-angular.umd.js +42 -0
- package/bundles/hivegpt-hiveai-angular.umd.js.map +1 -1
- package/bundles/hivegpt-hiveai-angular.umd.min.js +1 -1
- package/bundles/hivegpt-hiveai-angular.umd.min.js.map +1 -1
- package/esm2015/lib/components/chat-drawer/chat-drawer.component.js +42 -1
- package/fesm2015/hivegpt-hiveai-angular.js +41 -0
- package/fesm2015/hivegpt-hiveai-angular.js.map +1 -1
- package/hivegpt-hiveai-angular.metadata.json +1 -1
- package/lib/components/chat-drawer/chat-drawer.component.d.ts +1 -0
- package/lib/components/chat-drawer/chat-drawer.component.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -2209,6 +2209,48 @@
|
|
|
2209
2209
|
this.scrollToBottom();
|
|
2210
2210
|
this.cdr.markForCheck();
|
|
2211
2211
|
};
|
|
2212
|
+
ChatDrawerComponent.prototype.makeAskRequestold = function (inputMsg, agents, conversationId, msg, chat, workflowId, workflow_inputs) {
|
|
2213
|
+
var _this = this;
|
|
2214
|
+
var _a;
|
|
2215
|
+
var url = this.environment.BASE_URL + "/ai/ask";
|
|
2216
|
+
var body = {
|
|
2217
|
+
user_question: inputMsg,
|
|
2218
|
+
user_id: this.userId,
|
|
2219
|
+
bot_id: this.botId,
|
|
2220
|
+
message_id: this.conversationService.generateKey(),
|
|
2221
|
+
agents: (_a = agents === null || agents === void 0 ? void 0 : agents.filter(function (p) { return p.selected; }).map(function (p) { return p.id; })) !== null && _a !== void 0 ? _a : [],
|
|
2222
|
+
conversation_id: conversationId,
|
|
2223
|
+
first_name: this.firstName,
|
|
2224
|
+
last_name: this.lastName,
|
|
2225
|
+
};
|
|
2226
|
+
if (workflowId) {
|
|
2227
|
+
body['workflow_id'] = workflowId;
|
|
2228
|
+
body['workflow_inputs'] = workflow_inputs;
|
|
2229
|
+
}
|
|
2230
|
+
var headers = new i1.HttpHeaders({
|
|
2231
|
+
'Content-Type': 'application/json',
|
|
2232
|
+
'x-api-key': this.apiKey,
|
|
2233
|
+
'hive-bot-id': this.botId,
|
|
2234
|
+
'domain-authority': this.domainAuthorityValue,
|
|
2235
|
+
});
|
|
2236
|
+
this.http.post(url, body, { headers: headers })
|
|
2237
|
+
.subscribe({
|
|
2238
|
+
next: function (data) {
|
|
2239
|
+
console.log(data);
|
|
2240
|
+
// Additional response handling if needed
|
|
2241
|
+
},
|
|
2242
|
+
error: function (err) {
|
|
2243
|
+
console.error('Error: ', err);
|
|
2244
|
+
_this.isChatingWithAi = false;
|
|
2245
|
+
},
|
|
2246
|
+
});
|
|
2247
|
+
this.input = '';
|
|
2248
|
+
this.selectedWorkflow = null;
|
|
2249
|
+
this.openWorkflowInput = false;
|
|
2250
|
+
this.isWorkflowOpen = false;
|
|
2251
|
+
this.scrollToBottom();
|
|
2252
|
+
this.cdr.markForCheck();
|
|
2253
|
+
};
|
|
2212
2254
|
ChatDrawerComponent.prototype.generateMarkdown = function (title, obj) {
|
|
2213
2255
|
var e_1, _g;
|
|
2214
2256
|
var _a;
|