mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-13 21:17:08 +00:00
(feature)(webapp) rename interface modelList to viewList (#702)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { request } from "umi";
|
||||
import { AgentType, MetricType, ModelType } from "./type";
|
||||
import { request } from 'umi';
|
||||
import { AgentType, MetricType, ModelType } from './type';
|
||||
|
||||
export function getAgentList() {
|
||||
return request<Result<AgentType[]>>('/api/chat/agent/getAgentList');
|
||||
@@ -8,7 +8,7 @@ export function getAgentList() {
|
||||
export function saveAgent(agent: AgentType) {
|
||||
return request<Result<any>>('/api/chat/agent', {
|
||||
method: agent?.id ? 'PUT' : 'POST',
|
||||
data: {...agent, status: agent.status !== undefined ? agent.status : 1},
|
||||
data: { ...agent, status: agent.status !== undefined ? agent.status : 1 },
|
||||
});
|
||||
}
|
||||
|
||||
@@ -19,18 +19,18 @@ export function deleteAgent(id: number) {
|
||||
}
|
||||
|
||||
export function getModelList() {
|
||||
return request<Result<ModelType[]>>('/api/chat/conf/modelList', {
|
||||
return request<Result<ModelType[]>>('/api/chat/conf/viewList', {
|
||||
method: 'GET',
|
||||
});
|
||||
}
|
||||
|
||||
export function getMetricList(modelId: number) {
|
||||
return request<Result<{list: MetricType[]}>>('/api/semantic/metric/queryMetric', {
|
||||
return request<Result<{ list: MetricType[] }>>('/api/semantic/metric/queryMetric', {
|
||||
method: 'POST',
|
||||
data: {
|
||||
modelIds: [modelId],
|
||||
current: 1,
|
||||
pageSize: 2000
|
||||
}
|
||||
pageSize: 2000,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user