perf: Model Configuration - Model Name Length Limit

This commit is contained in:
fit2cloud-chenyw
2025-09-02 15:24:17 +08:00
parent 03b5c1147b
commit 0c5963eb92
3 changed files with 10 additions and 1 deletions
+1
View File
@@ -308,6 +308,7 @@
"select_supplier": "Select supplier",
"the_basic_model": "Please set a name for the basic model",
"the_basic_model_de": "Please select the basic model",
"length_max_error": "{msg} is limited to {max} characters",
"model_name": "Model name",
"custom_model_name": "Custom model name",
"enter_to_add": "For models not listed in the list, just enter the model name and press Enter to add",
+1
View File
@@ -308,6 +308,7 @@
"select_supplier": "选择供应商",
"the_basic_model": "请给基础模型设置一个名称",
"the_basic_model_de": "请选择基础模型",
"length_max_error": "{msg}长度不能超过{max}个字符",
"model_name": "模型名称",
"custom_model_name": "自定义的模型名称",
"enter_to_add": "列表中未列出的模型,直接输入模型名称,回车即可添加",
@@ -107,7 +107,14 @@ const rules = computed(() => ({
},
],
base_model: [{ required: true, message: t('model.the_basic_model_de'), trigger: 'blur' }],
name: [{ required: true, message: t('model.the_basic_model'), trigger: 'blur' }],
name: [
{ required: true, message: t('model.the_basic_model'), trigger: 'blur' },
{
max: 100,
message: t('model.length_max_error', { msg: t('model.model_name'), max: 100 }),
trigger: 'blur',
},
],
api_key: [
{
required: !currentSupplier.value?.is_private,