diff --git a/apps/web-antd/src/api/ai/model/apiKey/index.ts b/apps/web-antd/src/api/ai/model/apiKey/index.ts index 80dcbec1a..2ffc842d8 100644 --- a/apps/web-antd/src/api/ai/model/apiKey/index.ts +++ b/apps/web-antd/src/api/ai/model/apiKey/index.ts @@ -13,7 +13,7 @@ export namespace AiModelApiKeyApi { } } -// 查询 API 密钥分页 +/** 查询 API 密钥分页 */ export function getApiKeyPage(params: PageParam) { return requestClient.get>( '/ai/api-key/page', @@ -21,28 +21,29 @@ export function getApiKeyPage(params: PageParam) { ); } -// 获得 API 密钥列表 +/** 获得 API 密钥列表 */ export function getApiKeySimpleList() { return requestClient.get( '/ai/api-key/simple-list', ); } -// 查询 API 密钥详情 +/** 查询 API 密钥详情 */ export function getApiKey(id: number) { return requestClient.get(`/ai/api-key/get?id=${id}`); } -// 新增 API 密钥 + +/** 新增 API 密钥 */ export function createApiKey(data: AiModelApiKeyApi.ApiKey) { return requestClient.post('/ai/api-key/create', data); } -// 修改 API 密钥 +/** 修改 API 密钥 */ export function updateApiKey(data: AiModelApiKeyApi.ApiKey) { return requestClient.put('/ai/api-key/update', data); } -// 删除 API 密钥 +/** 删除 API 密钥 */ export function deleteApiKey(id: number) { return requestClient.delete(`/ai/api-key/delete?id=${id}`); } diff --git a/apps/web-antd/src/api/ai/model/chatRole/index.ts b/apps/web-antd/src/api/ai/model/chatRole/index.ts index d52dbfee5..266ca3474 100644 --- a/apps/web-antd/src/api/ai/model/chatRole/index.ts +++ b/apps/web-antd/src/api/ai/model/chatRole/index.ts @@ -20,7 +20,7 @@ export namespace AiModelChatRoleApi { } // AI 聊天角色 分页请求 - export interface ChatRolePageReq { + export interface ChatRolePageReqVO { name?: string; // 角色名称 category?: string; // 角色类别 publicStatus: boolean; // 是否公开 @@ -29,7 +29,7 @@ export namespace AiModelChatRoleApi { } } -// 查询聊天角色分页 +/** 查询聊天角色分页 */ export function getChatRolePage(params: PageParam) { return requestClient.get>( '/ai/chat-role/page', @@ -37,49 +37,49 @@ export function getChatRolePage(params: PageParam) { ); } -// 查询聊天角色详情 +/** 查询聊天角色详情 */ export function getChatRole(id: number) { return requestClient.get( `/ai/chat-role/get?id=${id}`, ); } -// 新增聊天角色 + +/** 新增聊天角色 */ export function createChatRole(data: AiModelChatRoleApi.ChatRole) { return requestClient.post('/ai/chat-role/create', data); } -// 修改聊天角色 +/** 修改聊天角色 */ export function updateChatRole(data: AiModelChatRoleApi.ChatRole) { return requestClient.put('/ai/chat-role/update', data); } -// 删除聊天角色 +/** 删除聊天角色 */ export function deleteChatRole(id: number) { return requestClient.delete(`/ai/chat-role/delete?id=${id}`); } -// ======= chat 聊天 -// 获取 my role -export function getMyPage(params: AiModelChatRoleApi.ChatRolePageReq) { +/** 获取 my role */ +export function getMyPage(params: AiModelChatRoleApi.ChatRolePageReqVO) { return requestClient.get('/ai/chat-role/my-page', { params }); } -// 获取角色分类 +/** 获取角色分类 */ export function getCategoryList() { return requestClient.get('/ai/chat-role/category-list'); } -// 创建角色 +/** 创建角色 */ export function createMy(data: AiModelChatRoleApi.ChatRole) { return requestClient.post('/ai/chat-role/create-my', data); } -// 更新角色 +/** 更新角色 */ export function updateMy(data: AiModelChatRoleApi.ChatRole) { return requestClient.put('/ai/chat-role/update', data); } -// 删除角色 my +/** 删除角色 my */ export function deleteMy(id: number) { return requestClient.delete(`/ai/chat-role/delete-my?id=${id}`); } diff --git a/apps/web-antd/src/api/ai/model/model/index.ts b/apps/web-antd/src/api/ai/model/model/index.ts index deafcee82..364327cc1 100644 --- a/apps/web-antd/src/api/ai/model/model/index.ts +++ b/apps/web-antd/src/api/ai/model/model/index.ts @@ -18,7 +18,7 @@ export namespace AiModelModelApi { } } -// 查询模型分页 +/** 查询模型分页 */ export function getModelPage(params: PageParam) { return requestClient.get>( '/ai/model/page', @@ -26,7 +26,7 @@ export function getModelPage(params: PageParam) { ); } -// 获得模型列表 +/** 获得模型列表 */ export function getModelSimpleList(type?: number) { return requestClient.get('/ai/model/simple-list', { params: { @@ -35,21 +35,22 @@ export function getModelSimpleList(type?: number) { }); } -// 查询模型详情 +/** 查询模型详情 */ export function getModel(id: number) { return requestClient.get(`/ai/model/get?id=${id}`); } -// 新增模型 + +/** 新增模型 */ export function createModel(data: AiModelModelApi.Model) { return requestClient.post('/ai/model/create', data); } -// 修改模型 +/** 修改模型 */ export function updateModel(data: AiModelModelApi.Model) { return requestClient.put('/ai/model/update', data); } -// 删除模型 +/** 删除模型 */ export function deleteModel(id: number) { return requestClient.delete(`/ai/model/delete?id=${id}`); } diff --git a/apps/web-antd/src/api/ai/model/tool/index.ts b/apps/web-antd/src/api/ai/model/tool/index.ts index 6fac9d74b..03abc4e7b 100644 --- a/apps/web-antd/src/api/ai/model/tool/index.ts +++ b/apps/web-antd/src/api/ai/model/tool/index.ts @@ -11,33 +11,34 @@ export namespace AiModelToolApi { } } -// 查询工具分页 +/** 查询工具分页 */ export function getToolPage(params: PageParam) { return requestClient.get>('/ai/tool/page', { params, }); } -// 查询工具详情 +/** 查询工具详情 */ export function getTool(id: number) { return requestClient.get(`/ai/tool/get?id=${id}`); } -// 新增工具 + +/** 新增工具 */ export function createTool(data: AiModelToolApi.Tool) { return requestClient.post('/ai/tool/create', data); } -// 修改工具 +/** 修改工具 */ export function updateTool(data: AiModelToolApi.Tool) { return requestClient.put('/ai/tool/update', data); } -// 删除工具 +/** 删除工具 */ export function deleteTool(id: number) { return requestClient.delete(`/ai/tool/delete?id=${id}`); } -// 获取工具简单列表 +/** 获取工具简单列表 */ export function getToolSimpleList() { return requestClient.get('/ai/tool/simple-list'); } diff --git a/apps/web-antd/src/views/ai/chat/index/components/role/RoleRepository.vue b/apps/web-antd/src/views/ai/chat/index/components/role/RoleRepository.vue index a4b0dc875..ea78237c0 100644 --- a/apps/web-antd/src/views/ai/chat/index/components/role/RoleRepository.vue +++ b/apps/web-antd/src/views/ai/chat/index/components/role/RoleRepository.vue @@ -55,7 +55,7 @@ async function handleTabsClick(tab: any) { /** 获取 my role 我的角色 */ async function getMyRole(append?: boolean) { - const params: AiModelChatRoleApi.ChatRolePageReq = { + const params: AiModelChatRoleApi.ChatRolePageReqVO = { ...myRoleParams, name: search.value, publicStatus: false, @@ -70,7 +70,7 @@ async function getMyRole(append?: boolean) { /** 获取 public role 公共角色 */ async function getPublicRole(append?: boolean) { - const params: AiModelChatRoleApi.ChatRolePageReq = { + const params: AiModelChatRoleApi.ChatRolePageReqVO = { ...publicRoleParams, category: activeCategory.value === '全部' ? '' : activeCategory.value, name: search.value,