feat:新增知识库管理页面并联调知识库接口
This commit is contained in:
44
frontend/src/api/ragStores.ts
Normal file
44
frontend/src/api/ragStores.ts
Normal file
@@ -0,0 +1,44 @@
|
||||
import { get, post } from './request';
|
||||
|
||||
export interface RagStore {
|
||||
id?: string;
|
||||
storeCode: string;
|
||||
storeName: string;
|
||||
description?: string | null;
|
||||
status?: string | null;
|
||||
remark?: string | null;
|
||||
createTime?: string | null;
|
||||
updateTime?: string | null;
|
||||
}
|
||||
|
||||
export interface RagStoreQueryRequest {
|
||||
storeCode?: string;
|
||||
storeName?: string;
|
||||
status?: string;
|
||||
}
|
||||
|
||||
export type RagStoreSaveRequest = RagStore;
|
||||
|
||||
export function listRagStores() {
|
||||
return post<RagStore[]>('/rag/store/list');
|
||||
}
|
||||
|
||||
export function queryRagStores(query?: RagStoreQueryRequest) {
|
||||
return post<RagStore[], RagStoreQueryRequest | undefined>('/rag/store/query', query);
|
||||
}
|
||||
|
||||
export function getRagStoreById(id: string) {
|
||||
return get<RagStore>('/rag/store/detail', {
|
||||
params: { id },
|
||||
});
|
||||
}
|
||||
|
||||
export function saveRagStore(data: RagStoreSaveRequest) {
|
||||
return post<boolean, RagStoreSaveRequest>('/rag/store/save', data);
|
||||
}
|
||||
|
||||
export function deleteRagStore(id: string) {
|
||||
return post<boolean>('/rag/store/delete', undefined, {
|
||||
params: { id },
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user