fix(web): llm json_output init

This commit is contained in:
zhaoying
2026-04-29 17:16:37 +08:00
parent 8f6aad333f
commit 4003d7b019

View File

@@ -1,8 +1,8 @@
/* /*
* @Author: ZhaoYing * @Author: ZhaoYing
* @Date: 2026-03-07 14:55:04 * @Date: 2026-03-07 14:55:04
* @Last Modified by: ZhaoYing * @Last Modified by: ZhaoYing
* @Last Modified time: 2026-04-17 10:05:32 * @Last Modified time: 2026-04-29 17:08:19
*/ */
import { type FC, useEffect, useState } from "react"; import { type FC, useEffect, useState } from "react";
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
@@ -28,7 +28,6 @@ const ModelConfig: FC = () => {
if (model_id && options) { if (model_id && options) {
const model = options.find(item => item.id === model_id) const model = options.find(item => item.id === model_id)
setSelectedModel(model || null) setSelectedModel(model || null)
form.setFieldValue('json_output', false)
} else { } else {
setSelectedModel(null) setSelectedModel(null)
} }
@@ -47,6 +46,7 @@ const ModelConfig: FC = () => {
params={{ type: 'llm,chat' }} params={{ type: 'llm,chat' }}
className="rb:w-full!" className="rb:w-full!"
size="small" size="small"
onChange={() => form.setFieldValue('json_output', false)}
updateOptions={updateOptions} updateOptions={updateOptions}
/> />
</Form.Item> </Form.Item>