39 lines
816 B
JavaScript
39 lines
816 B
JavaScript
/* 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();
|