diff --git a/model/model_meta.go b/model/model_meta.go index 4f76898..b734350 100644 --- a/model/model_meta.go +++ b/model/model_meta.go @@ -89,7 +89,7 @@ func (mi *Model) Update() error { mi.UpdatedTime = common.GetTimestamp() // 使用 Select 强制更新所有字段,包括零值 return DB.Model(&Model{}).Where("id = ?", mi.Id). - Select("model_name", "description", "icon", "tags", "vendor_id", "endpoints", "status", "sync_official", "name_rule", "updated_time"). + Select("model_name", "description", "icon", "tags", "type", "vendor_id", "endpoints", "status", "sync_official", "name_rule", "updated_time"). Updates(mi).Error } diff --git a/web/src/components/table/models/modals/EditModelModal.jsx b/web/src/components/table/models/modals/EditModelModal.jsx index 12ca48e..683d13d 100644 --- a/web/src/components/table/models/modals/EditModelModal.jsx +++ b/web/src/components/table/models/modals/EditModelModal.jsx @@ -38,6 +38,7 @@ import { IconAlertTriangle, IconLink } from '@douyinfe/semi-icons'; import { API, showError, showSuccess } from '../../../../helpers'; import { useTranslation } from 'react-i18next'; import { useIsMobile } from '../../../../hooks/common/useIsMobile'; +import { MODEL_TYPE_OPTIONS } from '../../../../constants/common.constant'; const { Text, Title } = Typography; @@ -117,6 +118,7 @@ const EditModelModal = (props) => { description: '', icon: '', tags: [], + type: 1, // 默认对话模型 vendor_id: undefined, vendor: '', vendor_icon: '', @@ -330,6 +332,25 @@ const EditModelModal = (props) => { /> +