15 lines
335 B
TypeScript
15 lines
335 B
TypeScript
import { ArrayType, Type } from './types'
|
|
import type { Field, LLMNodeType } from './types'
|
|
|
|
export const checkNodeValid = (payload: LLMNodeType) => {
|
|
return true
|
|
}
|
|
|
|
export const getFieldType = (field: Field) => {
|
|
const { type, items } = field
|
|
if (type !== Type.array || !items)
|
|
return type
|
|
|
|
return ArrayType[items.type]
|
|
}
|