From 5742608b97b4580a57786bda2a259dfec9d0c0fa Mon Sep 17 00:00:00 2001 From: 2910410219 <2910410219@qq.com> Date: Wed, 15 Jul 2026 16:33:58 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20JSON=E7=BC=96=E8=BE=91=E5=99=A8?= =?UTF-8?q?=E5=A2=9E=E5=BC=BA=20-=20Token=E6=98=A0=E5=B0=84=E4=B8=8B?= =?UTF-8?q?=E6=8B=89=E3=80=81=E5=AD=97=E6=AE=B5=E9=80=89=E9=A1=B9key:value?= =?UTF-8?q?=E3=80=81=E5=BA=8F=E5=88=97=E5=8C=96=E5=A7=8B=E7=BB=88=E5=8C=85?= =?UTF-8?q?=E8=A3=85type?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 模型配置弹窗: Token映射三个字段由输入框改为下拉菜单 - 同步/流式从响应映射取key, 异步从回调响应映射取key - 切换返回类型时清空Token映射, 无映射配置时禁用并提示 2. JSON编辑器序列化: 所有节点始终输出{type, value/attrs}格式 - 容器(object/array)始终{type, attrs}, 标量始终{type, value} 3. 字段配置增强: - 对象类型新增"循环生成"开关 - 下拉控件选项列表改为key:value双输入框 4. 类型注释更新 --- src/api/settings/modelConfigV2/index.ts | 2 +- .../json-schema-editor/FieldConfigDialog.vue | 28 ++++++++++--- .../json-schema-editor/JsonNode.vue | 2 +- src/components/json-schema-editor/index.vue | 27 ++++++++++--- .../modelConfigV2/component/editModule.vue | 40 +++++++++++++++---- 5 files changed, 78 insertions(+), 21 deletions(-) diff --git a/src/api/settings/modelConfigV2/index.ts b/src/api/settings/modelConfigV2/index.ts index 92aa625..237894a 100644 --- a/src/api/settings/modelConfigV2/index.ts +++ b/src/api/settings/modelConfigV2/index.ts @@ -1,6 +1,6 @@ import request from '/@/utils/request'; -/** Token 映射 */ +/** Token 映射(三个字段存的是对应响应映射中的 key,不是 JSON Path) */ export interface TokenMapping { promptTokens: string; completionTokens: string; diff --git a/src/components/json-schema-editor/FieldConfigDialog.vue b/src/components/json-schema-editor/FieldConfigDialog.vue index bc223ca..0564042 100644 --- a/src/components/json-schema-editor/FieldConfigDialog.vue +++ b/src/components/json-schema-editor/FieldConfigDialog.vue @@ -25,6 +25,10 @@
JSON 数据类型
+ + + 此对象字段是否循环生成 +