feat(copilot): finish configuration center
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
/* global axios */
|
||||
import ApiClient from './ApiClient';
|
||||
|
||||
class CopilotConfigAPI extends ApiClient {
|
||||
constructor() {
|
||||
super('copilot/config', { accountScoped: true });
|
||||
}
|
||||
|
||||
getAccountConfig() {
|
||||
return axios.get(this.url);
|
||||
}
|
||||
|
||||
updateAccountConfig(data) {
|
||||
return axios.put(this.url, data);
|
||||
}
|
||||
|
||||
getPlatformConfig() {
|
||||
return axios.get('/platform/api/v1/copilot/config');
|
||||
}
|
||||
|
||||
updatePlatformConfig(data) {
|
||||
return axios.put('/platform/api/v1/copilot/config', data);
|
||||
}
|
||||
|
||||
testPlatformConfig(data) {
|
||||
return axios.post('/platform/api/v1/copilot/config/test', data);
|
||||
}
|
||||
|
||||
getEmbeddingReindexStatus() {
|
||||
return axios.get('/platform/api/v1/copilot/embeddings/reindex');
|
||||
}
|
||||
|
||||
startEmbeddingReindex() {
|
||||
return axios.post('/platform/api/v1/copilot/embeddings/reindex');
|
||||
}
|
||||
}
|
||||
|
||||
export default new CopilotConfigAPI();
|
||||
Reference in New Issue
Block a user