增加智能体数据留存功能
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
/**
|
||||
* 智能体 API 管理模块
|
||||
* 按上游接口(OpenAI / Anthropic / Gemini 等)存储调用地址、Key、模型列表
|
||||
*/
|
||||
|
||||
/** 上游接口配置列表 */
|
||||
export function getAgentApiList(params) {
|
||||
return request({
|
||||
url: "/platform/agentApi/list",
|
||||
method: "get",
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/** 上游接口配置详情 */
|
||||
export function getAgentApiDetail(id) {
|
||||
return request({
|
||||
url: `/platform/agentApi/${id}`,
|
||||
method: "get",
|
||||
});
|
||||
}
|
||||
|
||||
/** 新增上游接口配置 */
|
||||
export function createAgentApi(data) {
|
||||
return request({
|
||||
url: "/platform/agentApi",
|
||||
method: "post",
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
/** 更新上游接口配置 */
|
||||
export function updateAgentApi(id, data) {
|
||||
return request({
|
||||
url: `/platform/agentApi/${id}`,
|
||||
method: "put",
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除上游接口配置 */
|
||||
export function deleteAgentApi(id) {
|
||||
return request({
|
||||
url: `/platform/agentApi/${id}`,
|
||||
method: "delete",
|
||||
});
|
||||
}
|
||||
|
||||
/** 批量删除 */
|
||||
export function batchDeleteAgentApi(ids) {
|
||||
return request({
|
||||
url: "/platform/agentApi/batchDelete",
|
||||
method: "post",
|
||||
data: { ids },
|
||||
});
|
||||
}
|
||||
|
||||
/** 切换启用状态 */
|
||||
export function toggleAgentApiStatus(id, status) {
|
||||
return request({
|
||||
url: `/platform/agentApi/${id}/status`,
|
||||
method: "post",
|
||||
data: { status },
|
||||
});
|
||||
}
|
||||
|
||||
/** 测试指定配置下某个模型的连通性 */
|
||||
export function testAgentApiConnection(data) {
|
||||
return request({
|
||||
url: "/platform/agentApi/test",
|
||||
method: "post",
|
||||
data,
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user