refactor: 简化评测创建向导规则来源
移除已有维度/基线两种规则来源,评测创建仅保留新建维度流程并自动生成维度名称;维度名称字段回归独立创建页,表单校验改为返回精确布尔值并启用 scroll-to-error。
This commit is contained in:
@@ -36,10 +36,9 @@ const taskForm = ref<EvalTaskSetupDraft>({
|
||||
})
|
||||
|
||||
const ruleForm = ref<EvalRuleSetupDraft>({
|
||||
ruleMode: 'existing',
|
||||
ruleMode: 'new',
|
||||
dimension_id: '',
|
||||
newDimension: {
|
||||
name: '',
|
||||
type: '',
|
||||
description: '',
|
||||
eval_model: '',
|
||||
@@ -95,7 +94,7 @@ async function loadData() {
|
||||
function buildDimensionPayload() {
|
||||
const draft = ruleForm.value.newDimension
|
||||
const payload: Partial<Dimension> = {
|
||||
name: draft.name,
|
||||
name: `Custom_Dim_${Date.now()}`,
|
||||
type: draft.type,
|
||||
description: draft.description,
|
||||
eval_model: draft.type === 'text_similarity' ? undefined : draft.eval_model,
|
||||
|
||||
Reference in New Issue
Block a user