diff --git a/src/api/digitalHuman/skill/index.ts b/src/api/digitalHuman/skill/index.ts index fd04ab8..078f888 100644 --- a/src/api/digitalHuman/skill/index.ts +++ b/src/api/digitalHuman/skill/index.ts @@ -126,3 +126,27 @@ export function deleteUserSkill(id: number, config?: any) { ...config, }); } + +/** + * 获取 Skill 用户技能详情 + */ +export function getUserSkillDetail(id: number, config?: any) { + return request({ + url: '/ai-agent/skill/user/get', + method: 'get', + params: { id }, + ...config, + }); +} + +/** + * 更新 Skill 用户技能 + */ +export function updateUserSkill(data: CreateSkillParams & { id: number }, config?: any) { + return request({ + url: '/ai-agent/skill/user/update', + method: 'put', + data, + ...config, + }); +} diff --git a/src/components/model/ModelSelector.vue b/src/components/model/ModelSelector.vue index 0a0d718..997fffe 100644 --- a/src/components/model/ModelSelector.vue +++ b/src/components/model/ModelSelector.vue @@ -60,7 +60,7 @@ - + @@ -92,7 +92,7 @@ import { ref, reactive, watch, onMounted } from 'vue'; import { ElMessage, type FormInstance, type FormRules } from 'element-plus'; import { Search, CircleCheck } from '@element-plus/icons-vue'; -import { getModelModuleList, addModelModule } from '/@/api/digitalHuman/modelConfig/modelModule'; +import { getModelModuleList, addModelModule, getModelTypeList, normalizeModelTypeOptions } from '/@/api/digitalHuman/modelConfig/modelModule'; import { checkIsSuperAdmin } from '/@/api/system/user/index'; import { getApiErrorMessage } from '/@/utils/request'; import EditModule from '/@/views/digitalHuman/modelConfig/modelModule/component/editModule.vue'; @@ -150,7 +150,8 @@ const modelList = ref([]); const loading = ref(false); const selectedModel = ref(null); const editModuleRef = ref(); -const isSuperAdmin = ref(false); // 是否为管理员 +const isSuperAdmin = ref(false); // 鏄惁涓虹鐞嗗憳 +const modelTypes = ref>([]); // 妯″瀷绫诲瀷鍒楄〃 // 内置模型 API Key 配置 const apiKeyDialogVisible = ref(false); @@ -275,6 +276,7 @@ const handleCreatePrivateModel = async () => { form: systemModel.form || {}, requestMapping: systemModel.requestMapping || {}, responseMapping: systemModel.responseMapping || {}, + responseBody: systemModel.responseBody || {}, // 杩斿洖涓讳綋瀛楁 maxConcurrency: systemModel.maxConcurrency || 10, queueLimit: systemModel.queueLimit || 100, timeoutSeconds: systemModel.timeoutSeconds || 30, @@ -283,6 +285,7 @@ const handleCreatePrivateModel = async () => { retryQueueMaxSeconds: systemModel.retryQueueMaxSeconds || 60, autoCleanSeconds: systemModel.autoCleanSeconds || 300, remark: systemModel.remark || '', + tokenMapping: systemModel.tokenMapping || '', // Token鏄犲皠瀛楁 }; const res: any = await addModelModule(createParams); @@ -334,8 +337,20 @@ const handleClose = () => { systemModelToClone.value = null; }; +// 鍔犺浇妯″瀷绫诲瀷鍒楄〃 +const loadModelTypes = async () => { + try { + const res: any = await getModelTypeList(); + if (res.code === 0) { + modelTypes.value = normalizeModelTypeOptions(res); + } + } catch { + // 鎺ュ彛閿欒鐢?request 鍏ㄥ眬鎻愮ず鍚庣 message + } +}; onMounted(() => { checkAdminStatus(); + loadModelTypes(); }); diff --git a/src/views/digitalHuman/skill/index.vue b/src/views/digitalHuman/skill/index.vue index 9bed820..875fcfa 100644 --- a/src/views/digitalHuman/skill/index.vue +++ b/src/views/digitalHuman/skill/index.vue @@ -14,63 +14,61 @@ - - - -
- -
-
-
-
{{ skill.category }}
- - - - -
-
-

{{ skill.name }}

-

{{ skill.description || '暂无描述' }}

-
- - {{ skill.fileName }} -
-
- -
+ + -
+ - -
- -
+ + + + + + + + + + + + + + + + + + + + - + +
+ +
+
+ + @@ -79,9 +77,6 @@ - - - -
将文件拖到此处,或点击上传
+
将 zip 文件拖到此处,或点击上传
@@ -105,7 +101,7 @@
已上传文件 - 上传成功 + {{ isEdit ? '当前文件' : '上传成功' }}
@@ -130,8 +126,16 @@