emanate-ai-chat-lib 0.1.3 → 0.1.5
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/emanate-ai-chat-lib.umd.js +2 -10
- package/bundles/emanate-ai-chat-lib.umd.js.map +1 -1
- package/esm2015/lib/components/ai-chat.component.js +2 -8
- package/esm2015/lib/services/ai-agent.service.js +2 -4
- package/fesm2015/emanate-ai-chat-lib.js +2 -10
- package/fesm2015/emanate-ai-chat-lib.js.map +1 -1
- package/package.json +1 -1
|
@@ -711,9 +711,7 @@
|
|
|
711
711
|
};
|
|
712
712
|
AiAgentService.prototype.processInquiry = function (request) {
|
|
713
713
|
var headers = new i1.HttpHeaders(Object.assign({ 'Content-Type': 'application/json' }, (this.config.appKey && { 'x-api-key': this.config.appKey })));
|
|
714
|
-
|
|
715
|
-
var cleanedRequest = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (request.query && { query: request.query })), (request.conversationId && { conversationId: String(request.conversationId) })), (request.userId && { userId: request.userId })), (request.userName && { userName: request.userName })), (request.appSource && { appSource: request.appSource }));
|
|
716
|
-
return this.http.post(this.config.apiUrl + "/ProcessInquiry", cleanedRequest, { headers: headers })
|
|
714
|
+
return this.http.post(this.config.apiUrl + "/ProcessInquiry", request, { headers: headers })
|
|
717
715
|
.pipe(operators.timeout(this.config.timeout || 30000), operators.catchError(function (error) {
|
|
718
716
|
console.log('ProcessInquiry API not available, returning demo response:', error);
|
|
719
717
|
// Return a mock response for demo purposes
|
|
@@ -1052,13 +1050,7 @@
|
|
|
1052
1050
|
this.authorName = '';
|
|
1053
1051
|
this.intent = '';
|
|
1054
1052
|
this.isLoading = true;
|
|
1055
|
-
var request = {
|
|
1056
|
-
query: inquiry,
|
|
1057
|
-
conversationId: this.conversationId,
|
|
1058
|
-
userId: this.userId,
|
|
1059
|
-
userName: this.userName,
|
|
1060
|
-
appSource: this.appSource
|
|
1061
|
-
};
|
|
1053
|
+
var request = Object.assign(Object.assign(Object.assign(Object.assign({ query: inquiry }, (this.conversationId !== undefined && this.conversationId !== null ? { conversationId: String(this.conversationId) } : {})), (this.userId !== undefined && this.userId !== null ? { userId: this.userId } : {})), (this.userName !== undefined && this.userName !== null ? { userName: this.userName } : {})), (this.appSource !== undefined && this.appSource !== null ? { appSource: this.appSource } : {}));
|
|
1062
1054
|
this.aiAgentService.processInquiry(request)
|
|
1063
1055
|
.pipe(operators.takeUntil(this.destroy$))
|
|
1064
1056
|
.subscribe({
|