feat(core): Support max output tokens parameter (#2218)

This commit is contained in:
Fangyin Cheng
2024-12-18 17:19:18 +08:00
committed by GitHub
parent b05febbf77
commit 7f4b5e79cf
121 changed files with 333 additions and 219 deletions

View File

@@ -27,9 +27,14 @@ export const SaveFlowModal: React.FC<Props> = ({
const [form] = Form.useForm<IFlowUpdateParam>();
const [messageApi, contextHolder] = message.useMessage();
const [deploy, setDeploy] = useState(false);
const isDeployed = flowInfo?.state === 'deployed' || flowInfo?.state === 'running';
const [deploy, setDeploy] = useState(isDeployed);
const [id, setId] = useState(router.query.id || '');
useEffect(() => {
setDeploy(flowInfo?.state === 'deployed' || flowInfo?.state === 'running');
}, [flowInfo?.state]);
useEffect(() => {
setId(router.query.id || '');
}, [router.query.id]);
@@ -157,7 +162,6 @@ export const SaveFlowModal: React.FC<Props> = ({
<Form.Item label='Deploy'>
<Checkbox
defaultChecked={flowInfo?.state === 'deployed' || flowInfo?.state === 'running'}
checked={deploy}
onChange={e => {
const val = e.target.checked;