mirror of
https://github.com/langgenius/dify.git
synced 2026-04-19 18:27:27 +08:00
29 lines
843 B
TypeScript
29 lines
843 B
TypeScript
import type { NodeDefault } from '../../types'
|
|
import type { QuestionClassifierNodeType } from './types'
|
|
import { ALL_CHAT_AVAILABLE_BLOCKS, ALL_COMPLETION_AVAILABLE_BLOCKS } from '@/app/components/workflow/constants'
|
|
|
|
const nodeDefault: NodeDefault<QuestionClassifierNodeType> = {
|
|
defaultValue: {
|
|
query_variable_selector: [],
|
|
model: {
|
|
provider: '',
|
|
name: '',
|
|
mode: 'chat',
|
|
completion_params: {
|
|
temperature: 0.7,
|
|
},
|
|
},
|
|
classes: [],
|
|
},
|
|
getAvailablePrevNodes(isChatMode: boolean) {
|
|
const nodes = isChatMode ? ALL_CHAT_AVAILABLE_BLOCKS : ALL_COMPLETION_AVAILABLE_BLOCKS
|
|
return nodes
|
|
},
|
|
getAvailableNextNodes(isChatMode: boolean) {
|
|
const nodes = isChatMode ? ALL_CHAT_AVAILABLE_BLOCKS : ALL_COMPLETION_AVAILABLE_BLOCKS
|
|
return nodes
|
|
},
|
|
}
|
|
|
|
export default nodeDefault
|