Merge pull request #946 from SuanmoSuanyangTechnology/fix/v0.3.1_zy
fix(web): check list add vision_input
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
* @Author: ZhaoYing
|
* @Author: ZhaoYing
|
||||||
* @Date: 2026-03-07 16:49:59
|
* @Date: 2026-03-07 16:49:59
|
||||||
* @Last Modified by: ZhaoYing
|
* @Last Modified by: ZhaoYing
|
||||||
* @Last Modified time: 2026-04-17 10:11:54
|
* @Last Modified time: 2026-04-20 18:14:34
|
||||||
*/
|
*/
|
||||||
import { type FC, useEffect, useState } from 'react';
|
import { type FC, useEffect, useState } from 'react';
|
||||||
import { Select, Flex, Space } from 'antd';
|
import { Select, Flex, Space } from 'antd';
|
||||||
@@ -56,7 +56,7 @@ const ModelSelect: FC<ModelSelectProps> = ({ params, placeholder, fontClassName,
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (updateOptions) updateOptions([...options, ...initialData]);
|
if (updateOptions) updateOptions([...options, ...initialData]);
|
||||||
}, [options, initialData])
|
}, [JSON.stringify(options), JSON.stringify(initialData)])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Select
|
<Select
|
||||||
|
|||||||
@@ -2537,6 +2537,7 @@ Memory Bear: After the rebellion, regional warlordism intensified for several re
|
|||||||
checkListErrors: {
|
checkListErrors: {
|
||||||
'llm.model_id': 'Model',
|
'llm.model_id': 'Model',
|
||||||
'llm.messages': 'Messages',
|
'llm.messages': 'Messages',
|
||||||
|
'llm.vision_input': 'Vision Variable',
|
||||||
'end.output': 'Output',
|
'end.output': 'Output',
|
||||||
'knowledge-retrieval.knowledge_retrieval': 'Knowledge bases',
|
'knowledge-retrieval.knowledge_retrieval': 'Knowledge bases',
|
||||||
'parameter-extractor.model_id': 'Model',
|
'parameter-extractor.model_id': 'Model',
|
||||||
|
|||||||
@@ -2501,6 +2501,7 @@ export const zh = {
|
|||||||
checkListErrors: {
|
checkListErrors: {
|
||||||
'llm.model_id': '模型',
|
'llm.model_id': '模型',
|
||||||
'llm.messages': '提示词',
|
'llm.messages': '提示词',
|
||||||
|
'llm.vision_input': '视觉变量',
|
||||||
'end.output': '回复',
|
'end.output': '回复',
|
||||||
'knowledge-retrieval.knowledge_retrieval': '知识库',
|
'knowledge-retrieval.knowledge_retrieval': '知识库',
|
||||||
'parameter-extractor.model_id': '模型',
|
'parameter-extractor.model_id': '模型',
|
||||||
|
|||||||
@@ -106,6 +106,18 @@ function validateNode(type: string, config: Record<string, any>): CheckError[] {
|
|||||||
if (isInvalid) errors.push({ key: specialKey, message: '' })
|
if (isInvalid) errors.push({ key: specialKey, message: '' })
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// llm: vision_input required when vision is enabled
|
||||||
|
if (type === 'llm') {
|
||||||
|
const vision = get('vision')
|
||||||
|
if (vision === true || vision === 'true') {
|
||||||
|
const visionInput = get('vision_input')
|
||||||
|
console.log('vision', vision, isEmpty(visionInput))
|
||||||
|
if (isEmpty(visionInput)) {
|
||||||
|
errors.push({ key: 'llm.vision_input', message: '' })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// http-request body.data (binary) — not a top-level required field, check separately
|
// http-request body.data (binary) — not a top-level required field, check separately
|
||||||
if (type === 'http-request') {
|
if (type === 'http-request') {
|
||||||
const body = get('body')
|
const body = get('body')
|
||||||
|
|||||||
Reference in New Issue
Block a user