dify/web/app/components/workflow/nodes/llm/utils.ts

15 lines
335 B
TypeScript
Raw Normal View History

2025-03-05 11:52:04 +08:00
import { ArrayType, Type } from './types'
import type { Field, LLMNodeType } from './types'
export const checkNodeValid = (payload: LLMNodeType) => {
return true
}
2025-03-05 11:52:04 +08:00
export const getFieldType = (field: Field) => {
const { type, items } = field
if (type !== Type.array || !items)
return type
return ArrayType[items.type]
}