mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-15 22:46:49 +00:00
(feature)(webapp) add show case and support multiple selection and deletion of filter conditions (#251)
This commit is contained in:
@@ -5,7 +5,7 @@ import { getToken } from '../utils/utils';
|
||||
// 创建axios实例
|
||||
const axiosInstance: AxiosInstance = axios.create({
|
||||
// 设置基本URL,所有请求都会使用这个URL作为前缀
|
||||
baseURL: localStorage.getItem('SUPERSONIC_CHAT_API_URL') || '',
|
||||
baseURL: '',
|
||||
// 设置请求超时时间(毫秒)
|
||||
timeout: 120000,
|
||||
// 设置请求头
|
||||
@@ -19,7 +19,6 @@ axiosInstance.interceptors.request.use(
|
||||
(config: any) => {
|
||||
const token = getToken();
|
||||
if (token && config?.headers) {
|
||||
// config.headers.Auth = `Bearer ${token}`;
|
||||
config.headers.Authorization = `Bearer ${token}`;
|
||||
}
|
||||
return config;
|
||||
|
||||
@@ -77,8 +77,8 @@ export function updateQAFeedback(questionId: number, score: number) {
|
||||
return axios.post<any>(`${prefix}/chat/manage/updateQAFeedback?id=${questionId}&score=${score}&feedback=`);
|
||||
}
|
||||
|
||||
export function queryDrillDownDimensions(modelId: number) {
|
||||
return axios.get<{ dimensions: DrillDownDimensionType[] }>(`${prefix}/chat/recommend/metric/${modelId}`);
|
||||
export function queryDrillDownDimensions(modelId: number, metricId?: number) {
|
||||
return axios.get<{ dimensions: DrillDownDimensionType[] }>(`${prefix}/chat/recommend/metric/${modelId}${metricId ? `?metricId=${metricId}` : ''}`);
|
||||
}
|
||||
|
||||
export function queryDimensionValues(modelId: number, bizName: string, agentId: number, elementID: number, value: string) {
|
||||
@@ -86,7 +86,7 @@ export function queryDimensionValues(modelId: number, bizName: string, agentId:
|
||||
}
|
||||
|
||||
export function querySimilarQuestions(queryText: string, agentId?: number) {
|
||||
return axios.get<any>(`${prefix}/chat/manage/getSolvedQuery?queryText=${queryText}&agentId=${agentId}`);
|
||||
return axios.get<any>(`${prefix}/chat/manage/getSolvedQuery?queryText=${queryText}&agentId=${agentId || 0}`);
|
||||
}
|
||||
|
||||
export function queryEntityInfo(queryId: number, parseId: number) {
|
||||
|
||||
Reference in New Issue
Block a user