Commit 925964ac authored by Joel's avatar Joel

feat: add default and utils

parent 4d4d3bb9
import type { NodeDefault } from '../../types'
import type { CodeNodeType } from './types'
const nodeDefault: NodeDefault<CodeNodeType> = {
defaultValue: {},
getAvailablePrevNodes() {
return []
},
getAvailableNextNodes() {
return []
},
}
export default nodeDefault
import type { CodeNodeType } from './types'
export const checkNodeValid = (payload: CodeNodeType) => {
return true
}
import type { NodeDefault } from '../../types'
import type { DirectAnswerNodeType } from './types'
const nodeDefault: NodeDefault<DirectAnswerNodeType> = {
defaultValue: {},
getAvailablePrevNodes() {
return []
},
getAvailableNextNodes() {
return []
},
}
export default nodeDefault
import type { DirectAnswerNodeType } from './types'
export const checkNodeValid = (payload: DirectAnswerNodeType) => {
return true
}
import type { NodeDefault } from '../../types'
import type { EndNodeType } from './types'
const nodeDefault: NodeDefault<EndNodeType> = {
defaultValue: {},
getAvailablePrevNodes() {
return []
},
getAvailableNextNodes() {
return []
},
}
export default nodeDefault
import type { EndNodeType } from './types'
export const checkNodeValid = (payload: EndNodeType) => {
return true
}
import type { NodeDefault } from '../../types'
import type { HttpNodeType } from './types'
const nodeDefault: NodeDefault<HttpNodeType> = {
defaultValue: {},
getAvailablePrevNodes() {
return []
},
getAvailableNextNodes() {
return []
},
}
export default nodeDefault
import type { HttpNodeType } from './types'
export const checkNodeValid = (payload: HttpNodeType) => {
return true
}
import type { NodeDefault } from '../../types'
import type { IfElseNodeType } from './types'
const nodeDefault: NodeDefault<IfElseNodeType> = {
defaultValue: {},
getAvailablePrevNodes() {
return []
},
getAvailableNextNodes() {
return []
},
}
export default nodeDefault
import type { IfElseNodeType } from './types'
import { ComparisonOperator } from './types'
export const isEmptyRelatedOperator = (operator: ComparisonOperator) => {
return [ComparisonOperator.empty, ComparisonOperator.notEmpty, ComparisonOperator.isNull, ComparisonOperator.isNotNull].includes(operator)
}
export const checkNodeValid = (payload: IfElseNodeType) => {
return true
}
import type { NodeDefault } from '../../types'
import type { KnowledgeRetrievalNodeType } from './types'
const nodeDefault: NodeDefault<KnowledgeRetrievalNodeType> = {
defaultValue: {},
getAvailablePrevNodes() {
return []
},
getAvailableNextNodes() {
return []
},
}
export default nodeDefault
import type { KnowledgeRetrievalNodeType } from './types'
export const checkNodeValid = (payload: KnowledgeRetrievalNodeType) => {
return true
}
import type { NodeDefault } from '../../types'
import type { LLMNodeType } from './types'
const nodeDefault: NodeDefault<LLMNodeType> = {
defaultValue: {},
getAvailablePrevNodes() {
return []
},
getAvailableNextNodes() {
return []
},
}
export default nodeDefault
import type { LLMNodeType } from './types'
export const checkNodeValid = (payload: LLMNodeType) => {
return true
}
import type { NodeDefault } from '../../types'
import type { QuestionClassifierNodeType } from './types'
const nodeDefault: NodeDefault<QuestionClassifierNodeType> = {
defaultValue: {},
getAvailablePrevNodes() {
return []
},
getAvailableNextNodes() {
return []
},
}
export default nodeDefault
import type { QuestionClassifierNodeType } from './types'
export const checkNodeValid = (payload: QuestionClassifierNodeType) => {
return true
}
import type { NodeDefault } from '../../types'
import type { StartNodeType } from './types'
const nodeDefault: NodeDefault<StartNodeType> = {
defaultValue: {},
getAvailablePrevNodes() {
return []
},
getAvailableNextNodes() {
return []
},
}
export default nodeDefault
import type { StartNodeType } from './types'
export const checkNodeValid = (payload: StartNodeType) => {
return true
}
import type { NodeDefault } from '../../types'
import type { TemplateTransformNodeType } from './types'
const nodeDefault: NodeDefault<TemplateTransformNodeType> = {
defaultValue: {},
getAvailablePrevNodes() {
return []
},
getAvailableNextNodes() {
return []
},
}
export default nodeDefault
import type { TemplateTransformNodeType } from './types'
export const checkNodeValid = (payload: TemplateTransformNodeType) => {
return true
}
import type { NodeDefault } from '../../types'
import type { ToolNodeType } from './types'
const nodeDefault: NodeDefault<ToolNodeType> = {
defaultValue: {},
getAvailablePrevNodes() {
return []
},
getAvailableNextNodes() {
return []
},
}
export default nodeDefault
import type { ToolNodeType } from './types'
export const checkNodeValid = (payload: ToolNodeType) => {
return true
}
import type { VariableAssignerNodeType } from './types'
export const checkNodeValid = (node: VariableAssignerNodeType) => {
export const checkNodeValid = (payload: VariableAssignerNodeType) => {
return true
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment