feat: 增加 Agent Excel 批量测试
This commit is contained in:
@@ -8,6 +8,8 @@ import type {
|
||||
AgentDebugStreamComplete,
|
||||
AgentGenerationConfig,
|
||||
AgentRuntimeConfig,
|
||||
AgentBatchJob,
|
||||
AgentBatchJobDetail,
|
||||
AiLogRecord,
|
||||
ApiResponse,
|
||||
ChatDetail,
|
||||
@@ -259,6 +261,19 @@ export const api = {
|
||||
agentRuntimeConfig: () => request<AgentRuntimeConfig>("/admin/agent/runtime-config"),
|
||||
saveAgentRuntimeConfig: (payload: AgentGenerationConfig) =>
|
||||
request<AgentRuntimeConfig>("/admin/agent/runtime-config", { method: "PUT", body: JSON.stringify(payload) }),
|
||||
downloadAgentBatchTemplate: () => download("/admin/agent/batch/template", "Agent批量测试导入模板.xlsx"),
|
||||
createAgentBatch: (file: File, config: Record<string, unknown>) => {
|
||||
const formData = new FormData();
|
||||
formData.append("file", file);
|
||||
formData.append("configJson", JSON.stringify(config));
|
||||
return upload<AgentBatchJob>("/admin/agent/batch/jobs", formData);
|
||||
},
|
||||
agentBatchJobs: (query: { page?: number; pageSize?: number } = {}) =>
|
||||
request<PageResult<AgentBatchJob>>(`/admin/agent/batch/jobs${queryString(query)}`),
|
||||
agentBatchJob: (id: number, query: { page?: number; pageSize?: number } = {}) =>
|
||||
request<AgentBatchJobDetail>(`/admin/agent/batch/jobs/${id}${queryString(query)}`),
|
||||
exportAgentBatch: (id: number) => download(`/admin/agent/batch/jobs/${id}/export`, `Agent批量测试结果_${id}.xlsx`),
|
||||
cancelAgentBatch: (id: number) => request<AgentBatchJob>(`/admin/agent/batch/jobs/${id}/cancel`, { method: "POST", body: "{}" }),
|
||||
models: () => request<ModelItem[]>("/admin/model/list"),
|
||||
createModel: (payload: Record<string, unknown>) =>
|
||||
request<ModelItem>("/admin/model", { method: "POST", body: JSON.stringify(payload) }),
|
||||
|
||||
Reference in New Issue
Block a user