Separate agent tuning from model setup

This commit is contained in:
2026-07-07 13:31:20 +08:00
parent dada4aafcd
commit da262f4596
10 changed files with 518 additions and 76 deletions

View File

@@ -1,6 +1,7 @@
import type {
AdminProfile,
AdminUser,
AgentDebugResult,
AiLogRecord,
ApiResponse,
ChatDetail,
@@ -83,6 +84,8 @@ export const api = {
savePrompt: (promptContent: string) =>
request<{ promptContent: string }>("/admin/prompt", { method: "PUT", body: JSON.stringify({ promptContent }) }),
resetPrompt: () => request<{ promptContent: string }>("/admin/prompt/reset", { method: "POST", body: "{}" }),
debugAgent: (payload: Record<string, unknown>) =>
request<AgentDebugResult>("/admin/agent/debug", { method: "POST", body: JSON.stringify(payload) }),
models: () => request<ModelItem[]>("/admin/model/list"),
createModel: (payload: Record<string, unknown>) =>
request<ModelItem>("/admin/model", { method: "POST", body: JSON.stringify(payload) }),