summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/core
diff options
context:
space:
mode:
authorkaixiliu <liukaixi@chinamobile.com>2024-11-29 17:32:22 +0800
committerkaixiliu <liukaixi@chinamobile.com>2024-11-29 17:32:27 +0800
commite5de10348e38a4cac9f70da856ab7c6941bfc347 (patch)
tree4aa7bc3808b54653f4a8f068a1903094b38d574b /usecaseui-portal/src/app/core
parent35d38716bfb367497f563bc4081109f6053c43af (diff)
add maas knowledge base, Knowledge Assistant, application and update link
Issue-ID: USECASEUI-844 Change-Id: I1dc2b4bc12f364d017b24b2752acfef63e27ad94 Signed-off-by: kaixiliu <liukaixi@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/core')
-rw-r--r--usecaseui-portal/src/app/core/services/intentManagement.service.ts50
1 files changed, 43 insertions, 7 deletions
diff --git a/usecaseui-portal/src/app/core/services/intentManagement.service.ts b/usecaseui-portal/src/app/core/services/intentManagement.service.ts
index ee9cd3b2..7fd85b04 100644
--- a/usecaseui-portal/src/app/core/services/intentManagement.service.ts
+++ b/usecaseui-portal/src/app/core/services/intentManagement.service.ts
@@ -16,21 +16,31 @@
import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders, HttpParams, HttpResponse } from '@angular/common/http';
import { Observable } from 'rxjs/Observable';
-
+import { of } from 'rxjs/observable/of';
+import { knowledgeBase } from '../../views/maas/knowledge-base-management/knowledge-base.type'
+import { application } from '../../views/maas/build/application.type';
@Injectable()
export class IntentManagementService {
constructor(private http: HttpClient) { }
url = {
- createIntentManagement: "/api/usecaseui-intent-analysis/v1/intents",
+ createIntentManagement: "/api/usecaseui-intent-analysis/v1/intents",
getIntentManagement: "/api/usecaseui-intent-analysis/v1/intents/intentGenerateType/USERINPUT",
deleteIntentManagement: "/api/usecaseui-intent-analysis/v1/intents/",
updateIntentManagementData: "/api/usecaseui-intent-analysis/v1/intents/",
- getIntentReport: "/api/usecaseui-intent-analysis/v1/intentReport/"
+ getIntentReport: "/api/usecaseui-intent-analysis/v1/intentReport/",
+ getKnowledgeBaseRecord: "/api/usecaseui-llm-adaptation/v1/knowledgeBase/query",
+ removeKnowledgeBase: "/api/usecaseui-llm-adaptation/v1/knowledgeBase/delete/",
+ getKnowledgeBaseById: "/api/usecaseui-llm-adaptation/v1/knowledgeBase/queryById/",
+ updateKnowledgeBaseRecord: "/api/usecaseui-llm-adaptation/v1/knowledgeBase/update",
+ maasUrl: "/api/usecaseui-llm-adaptation/v1/maas/getAll",
+ getAllApplication: "/api/usecaseui-llm-adaptation/v1/application/query",
+ deleteApplicationById: "/api/usecaseui-llm-adaptation/v1/application/delete/",
+ getApplicationById: "/api/usecaseui-llm-adaptation/v1/application/queryById/"
};
-
+
// intentManagement
- getIntentManagementData(){
+ getIntentManagementData() {
return this.http.get<any>(this.url.getIntentManagement);
}
createIntentManagement(requestBody) {
@@ -42,7 +52,33 @@ export class IntentManagementService {
updateIntentManagementData(id, requestBody) {
return this.http.put<any>(this.url.updateIntentManagementData + id, requestBody);
}
- getIntentReportData(intentId){
- return this.http.get<any>(this.url.getIntentReport+intentId);
+ getIntentReportData(intentId) {
+ return this.http.get<any>(this.url.getIntentReport + intentId);
+ }
+ getKnowledgeBaseRecord() {
+ return this.http.get<any>(this.url.getKnowledgeBaseRecord);
+ }
+
+ updateKnowledgeBase(body: any) {
+ return this.http.post<any>(this.url.updateKnowledgeBaseRecord, body);
+ }
+
+ deleteKnowledgeBaseData(index) {
+ return this.http.delete<any>(this.url.removeKnowledgeBase + index);
+ }
+ getMaaSPlatform() {
+ return this.http.get<any>(this.url.maasUrl);
+ }
+ getKnowledgeBaseById(index) {
+ return this.http.get<{result_body: Array<knowledgeBase>}>(this.url.getKnowledgeBaseById + index);
+ }
+ getAllApplication() {
+ return this.http.get<any>(this.url.getAllApplication);
+ }
+ deleteApplicationById(index) {
+ return this.http.delete<any>(this.url.deleteApplicationById + index);
+ }
+ getApplicationById(index) {
+ return this.http.get<any>(this.url.getApplicationById + index);
}
}