新增配置模型测试按钮

This commit is contained in:
wangjiming
2026-08-11 15:41:51 +08:00
parent f809825a7d
commit 71405def14
3 changed files with 164 additions and 2 deletions

View File

@@ -100,3 +100,14 @@ export const mergeModel = (data: {
/** 导出已训练模型权重 */
export const exportModelUrl = (modelName: string) =>
`/modelTF/model-manage/trained-models/${encodeURIComponent(modelName)}/export`
/** 测试在线模型连通性 */
export const testOnlineModel = (data: {
api_url: string
api_key: string
online_model_name: string
}) =>
post<{ success: boolean; error?: string; model?: string; usage?: object }>(
'/model-manage/test-online',
data,
)