mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-10 11:07:06 +00:00
(feature)(webapp) rename interface modelList to viewList (#702)
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import { request } from "umi";
|
import { request } from 'umi';
|
||||||
import { AgentType, MetricType, ModelType } from "./type";
|
import { AgentType, MetricType, ModelType } from './type';
|
||||||
|
|
||||||
export function getAgentList() {
|
export function getAgentList() {
|
||||||
return request<Result<AgentType[]>>('/api/chat/agent/getAgentList');
|
return request<Result<AgentType[]>>('/api/chat/agent/getAgentList');
|
||||||
@@ -8,7 +8,7 @@ export function getAgentList() {
|
|||||||
export function saveAgent(agent: AgentType) {
|
export function saveAgent(agent: AgentType) {
|
||||||
return request<Result<any>>('/api/chat/agent', {
|
return request<Result<any>>('/api/chat/agent', {
|
||||||
method: agent?.id ? 'PUT' : 'POST',
|
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() {
|
export function getModelList() {
|
||||||
return request<Result<ModelType[]>>('/api/chat/conf/modelList', {
|
return request<Result<ModelType[]>>('/api/chat/conf/viewList', {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getMetricList(modelId: number) {
|
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',
|
method: 'POST',
|
||||||
data: {
|
data: {
|
||||||
modelIds: [modelId],
|
modelIds: [modelId],
|
||||||
current: 1,
|
current: 1,
|
||||||
pageSize: 2000
|
pageSize: 2000,
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { request } from "umi";
|
import { request } from 'umi';
|
||||||
import { DimensionType, ModelType, PluginType } from "./type";
|
import { DimensionType, ModelType, PluginType } from './type';
|
||||||
|
|
||||||
export function savePlugin(params: Partial<PluginType>) {
|
export function savePlugin(params: Partial<PluginType>) {
|
||||||
return request<Result<any>>('/api/chat/plugin', {
|
return request<Result<any>>('/api/chat/plugin', {
|
||||||
@@ -11,7 +11,7 @@ export function savePlugin(params: Partial<PluginType>) {
|
|||||||
export function getPluginList(filters?: any) {
|
export function getPluginList(filters?: any) {
|
||||||
return request<Result<any[]>>('/api/chat/plugin/query', {
|
return request<Result<any[]>>('/api/chat/plugin/query', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: filters
|
data: filters,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -22,18 +22,18 @@ export function deletePlugin(id: number) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function getModelList() {
|
export function getModelList() {
|
||||||
return request<Result<ModelType[]>>('/api/chat/conf/modelList', {
|
return request<Result<ModelType[]>>('/api/chat/conf/viewList', {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getDimensionList(modelId: number) {
|
export function getDimensionList(modelId: number) {
|
||||||
return request<Result<{list: DimensionType[]}>>('/api/semantic/dimension/queryDimension', {
|
return request<Result<{ list: DimensionType[] }>>('/api/semantic/dimension/queryDimension', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: {
|
data: {
|
||||||
modelIds: [modelId],
|
modelIds: [modelId],
|
||||||
current: 1,
|
current: 1,
|
||||||
pageSize: 2000
|
pageSize: 2000,
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
23
webapp/pnpm-lock.yaml
generated
23
webapp/pnpm-lock.yaml
generated
@@ -345,6 +345,9 @@ importers:
|
|||||||
classnames:
|
classnames:
|
||||||
specifier: ^2.2.6
|
specifier: ^2.2.6
|
||||||
version: 2.3.2
|
version: 2.3.2
|
||||||
|
compression-webpack-plugin:
|
||||||
|
specifier: ^11.0.0
|
||||||
|
version: 11.0.0(webpack@5.88.2)
|
||||||
copy-to-clipboard:
|
copy-to-clipboard:
|
||||||
specifier: ^3.3.1
|
specifier: ^3.3.1
|
||||||
version: 3.3.3
|
version: 3.3.3
|
||||||
@@ -6734,7 +6737,6 @@ packages:
|
|||||||
optional: true
|
optional: true
|
||||||
dependencies:
|
dependencies:
|
||||||
ajv: 8.12.0
|
ajv: 8.12.0
|
||||||
dev: true
|
|
||||||
|
|
||||||
/ajv-keywords@3.5.2(ajv@6.12.6):
|
/ajv-keywords@3.5.2(ajv@6.12.6):
|
||||||
resolution: {integrity: sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==}
|
resolution: {integrity: sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==}
|
||||||
@@ -6750,7 +6752,6 @@ packages:
|
|||||||
dependencies:
|
dependencies:
|
||||||
ajv: 8.12.0
|
ajv: 8.12.0
|
||||||
fast-deep-equal: 3.1.3
|
fast-deep-equal: 3.1.3
|
||||||
dev: true
|
|
||||||
|
|
||||||
/ajv@6.12.6:
|
/ajv@6.12.6:
|
||||||
resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==}
|
resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==}
|
||||||
@@ -8602,6 +8603,17 @@ packages:
|
|||||||
mime-db: 1.52.0
|
mime-db: 1.52.0
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
/compression-webpack-plugin@11.0.0(webpack@5.88.2):
|
||||||
|
resolution: {integrity: sha512-Nz9dMiu0sag+mgJ5QTkRx0+vwrDZPU/gps7IdrkFE+oRSkgyoX4wbMol7QnXjI5/TEWx8yEwew9MiMjZgdLtjg==}
|
||||||
|
engines: {node: '>= 18.12.0'}
|
||||||
|
peerDependencies:
|
||||||
|
webpack: ^5.1.0
|
||||||
|
dependencies:
|
||||||
|
schema-utils: 4.2.0
|
||||||
|
serialize-javascript: 6.0.2
|
||||||
|
webpack: 5.88.2
|
||||||
|
dev: false
|
||||||
|
|
||||||
/compression@1.7.4:
|
/compression@1.7.4:
|
||||||
resolution: {integrity: sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==}
|
resolution: {integrity: sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==}
|
||||||
engines: {node: '>= 0.8.0'}
|
engines: {node: '>= 0.8.0'}
|
||||||
@@ -22318,7 +22330,6 @@ packages:
|
|||||||
ajv: 8.12.0
|
ajv: 8.12.0
|
||||||
ajv-formats: 2.1.1(ajv@8.12.0)
|
ajv-formats: 2.1.1(ajv@8.12.0)
|
||||||
ajv-keywords: 5.1.0(ajv@8.12.0)
|
ajv-keywords: 5.1.0(ajv@8.12.0)
|
||||||
dev: true
|
|
||||||
|
|
||||||
/screenfull@5.2.0:
|
/screenfull@5.2.0:
|
||||||
resolution: {integrity: sha512-9BakfsO2aUQN2K9Fdbj87RJIEZ82Q9IGim7FqM5OsebfoFC6ZHXgDq/KvniuLTPdeM8wY2o6Dj3WQ7KeQCj3cA==}
|
resolution: {integrity: sha512-9BakfsO2aUQN2K9Fdbj87RJIEZ82Q9IGim7FqM5OsebfoFC6ZHXgDq/KvniuLTPdeM8wY2o6Dj3WQ7KeQCj3cA==}
|
||||||
@@ -22409,6 +22420,12 @@ packages:
|
|||||||
dependencies:
|
dependencies:
|
||||||
randombytes: 2.1.0
|
randombytes: 2.1.0
|
||||||
|
|
||||||
|
/serialize-javascript@6.0.2:
|
||||||
|
resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==}
|
||||||
|
dependencies:
|
||||||
|
randombytes: 2.1.0
|
||||||
|
dev: false
|
||||||
|
|
||||||
/serve-index@1.9.1:
|
/serve-index@1.9.1:
|
||||||
resolution: {integrity: sha512-pXHfKNP4qujrtteMrSBb0rc8HJ9Ms/GrXwcUtUtD5s4ewDJI8bT3Cz2zTVRMKtri49pLx2e0Ya8ziP5Ya2pZZw==}
|
resolution: {integrity: sha512-pXHfKNP4qujrtteMrSBb0rc8HJ9Ms/GrXwcUtUtD5s4ewDJI8bT3Cz2zTVRMKtri49pLx2e0Ya8ziP5Ya2pZZw==}
|
||||||
engines: {node: '>= 0.8.0'}
|
engines: {node: '>= 0.8.0'}
|
||||||
|
|||||||
Reference in New Issue
Block a user