AI Integration successful
This commit is contained in:
parent
21a06545ce
commit
f8e081d7d1
|
|
@ -17,32 +17,7 @@
|
||||||
<span *ngIf="item.isChart" class="chart-icon">📊</span>
|
<span *ngIf="item.isChart" class="chart-icon">📊</span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<!--<div class="flex justify-content-between align-items-center">
|
|
||||||
<div class="flex p-gap-2 align-items-center">
|
|
||||||
<kendo-dropdownlist
|
|
||||||
[data]="reportGroups"
|
|
||||||
[defaultItem]="{ description: 'Select AI Purpose....', value: null }"
|
|
||||||
[textField]="'description'"
|
|
||||||
[valueField]="'value'"
|
|
||||||
[valuePrimitive]="true"
|
|
||||||
[(ngModel)]="selectedReportGroup"
|
|
||||||
(valueChange)="onReportGroupChange($event)"
|
|
||||||
class="w-14rem">
|
|
||||||
</kendo-dropdownlist>
|
|
||||||
<button (click)="openAvailableInfoDialog()" [disabled]="selectedReportGroup === null || selectedReportGroup === undefined" kendoButton themeColor="secondary">Field Column</button>
|
|
||||||
</div>
|
|
||||||
<div class="flex p-gap-2 align-items-center">
|
|
||||||
<button [disabled]="selectedReportGroup === null || selectedReportGroup === undefined"
|
|
||||||
kendoButton themeColor="primary"
|
|
||||||
(click)="ShowAllQueryLog()">Chat History</button>
|
|
||||||
<button kendoButton themeColor="primary"
|
|
||||||
(click)="onCallOpenAI_One()"
|
|
||||||
(keydown.enter)="handleEnterKey($event)">Execute</button>
|
|
||||||
</div>
|
|
||||||
</div>-->
|
|
||||||
<div class="toolbar-container">
|
<div class="toolbar-container">
|
||||||
|
|
||||||
<!-- Left Side -->
|
|
||||||
<div class="toolbar-left">
|
<div class="toolbar-left">
|
||||||
<kendo-dropdownlist [data]="reportGroups"
|
<kendo-dropdownlist [data]="reportGroups"
|
||||||
[defaultItem]="{ description: 'Select AI Purpose....', value: null }"
|
[defaultItem]="{ description: 'Select AI Purpose....', value: null }"
|
||||||
|
|
@ -57,20 +32,16 @@
|
||||||
Field Column
|
Field Column
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Right Side -->
|
|
||||||
<div class="toolbar-right">
|
<div class="toolbar-right">
|
||||||
<button [disabled]="selectedReportGroup === null || selectedReportGroup === undefined"
|
<button [disabled]="selectedReportGroup === null || selectedReportGroup === undefined"
|
||||||
kendoButton themeColor="primary" (click)="ShowAllQueryLog()">
|
kendoButton themeColor="primary" (click)="ShowAllQueryLog()">
|
||||||
Chat History
|
Chat History
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button kendoButton themeColor="primary" (click)="onCallOpenAI_One()"
|
<button kendoButton themeColor="primary" (click)="onCallOpenAI_One()"
|
||||||
(keydown.enter)="handleEnterKey($event)">
|
(keydown.enter)="handleEnterKey($event)">
|
||||||
Execute
|
Execute
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -122,7 +122,7 @@ export class HRMOpenAITestComponent implements OnInit{
|
||||||
|
|
||||||
}
|
}
|
||||||
LoadCurrentUserAllQueryLog(reportGroupType : EnumReportGroupType){
|
LoadCurrentUserAllQueryLog(reportGroupType : EnumReportGroupType){
|
||||||
this.loadingpanelService.ShowLoadingPanel = false;
|
this.loadingpanelService.ShowLoadingPanel = true;
|
||||||
this.opeAiService.GetCurrentUserAllQueryLog(reportGroupType).subscribe(
|
this.opeAiService.GetCurrentUserAllQueryLog(reportGroupType).subscribe(
|
||||||
(resp: any) => {
|
(resp: any) => {
|
||||||
this.currentUserAllQueryLog = resp;
|
this.currentUserAllQueryLog = resp;
|
||||||
|
|
@ -220,7 +220,7 @@ export class HRMOpenAITestComponent implements OnInit{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.isUserPromptIsNotRelated = false;
|
this.isUserPromptIsNotRelated = false;
|
||||||
this.loadingpanelService.ShowLoadingPanel = false;
|
this.loadingpanelService.ShowLoadingPanel = true;
|
||||||
this.opeAiService.AskOpenAI(data).subscribe(
|
this.opeAiService.AskOpenAI(data).subscribe(
|
||||||
(resp: any) => {
|
(resp: any) => {
|
||||||
this.OpenAIResponce = JSON.parse(resp);
|
this.OpenAIResponce = JSON.parse(resp);
|
||||||
|
|
@ -412,11 +412,11 @@ export class HRMOpenAITestComponent implements OnInit{
|
||||||
this.reportColumnDefinition = resp as any[];
|
this.reportColumnDefinition = resp as any[];
|
||||||
},
|
},
|
||||||
(err: any) => {
|
(err: any) => {
|
||||||
this.loadingpanelService.ShowLoadingPanel = true;
|
this.loadingpanelService.ShowLoadingPanel = false;
|
||||||
this.notificationService.showError(err.error, "Error");
|
this.notificationService.showError(err.error, "Error");
|
||||||
},
|
},
|
||||||
() => {
|
() => {
|
||||||
this.loadingpanelService.ShowLoadingPanel = true;
|
this.loadingpanelService.ShowLoadingPanel = false;
|
||||||
this.gridData = [];
|
this.gridData = [];
|
||||||
if (this.reportColumnDefinition && this.reportColumnDefinition.length > 0) {
|
if (this.reportColumnDefinition && this.reportColumnDefinition.length > 0) {
|
||||||
const excludedNormalizedCaptions = new Set(['employeeid']);
|
const excludedNormalizedCaptions = new Set(['employeeid']);
|
||||||
|
|
@ -481,12 +481,12 @@ export class HRMOpenAITestComponent implements OnInit{
|
||||||
},
|
},
|
||||||
(err: any) => {
|
(err: any) => {
|
||||||
this.isShowCurrentUserAllQueryLog = false
|
this.isShowCurrentUserAllQueryLog = false
|
||||||
this.loadingpanelService.ShowLoadingPanel = true;
|
this.loadingpanelService.ShowLoadingPanel = false;
|
||||||
this.notificationService.showError(err.error, "Error");
|
this.notificationService.showError(err.error, "Error");
|
||||||
},
|
},
|
||||||
() => {
|
() => {
|
||||||
this.isShowCurrentUserAllQueryLog = false
|
this.isShowCurrentUserAllQueryLog = false
|
||||||
this.loadingpanelService.ShowLoadingPanel = true;
|
this.loadingpanelService.ShowLoadingPanel = false;
|
||||||
this.ProcessOpenAIData();
|
this.ProcessOpenAIData();
|
||||||
this.LoadCurrentUserAllQueryLog(this.selectedReportGroup);
|
this.LoadCurrentUserAllQueryLog(this.selectedReportGroup);
|
||||||
});
|
});
|
||||||
|
|
@ -549,7 +549,7 @@ export class HRMOpenAITestComponent implements OnInit{
|
||||||
const data = {
|
const data = {
|
||||||
oQueryLog : this.currentChat
|
oQueryLog : this.currentChat
|
||||||
}
|
}
|
||||||
this.loadingpanelService.ShowLoadingPanel = false;
|
this.loadingpanelService.ShowLoadingPanel = true;
|
||||||
this.opeAiService.ChatShareWithOthers(data).subscribe(
|
this.opeAiService.ChatShareWithOthers(data).subscribe(
|
||||||
(resp: any) => {
|
(resp: any) => {
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user