chore: move node type to self struct

This commit is contained in:
Joel 2024-02-20 14:59:03 +08:00
parent fcadb807f6
commit 9c70befaf6
3 changed files with 24 additions and 23 deletions

View File

@ -1,5 +1,5 @@
import type { LLMNodeData } from '../../types'
import { MemoryRole } from '../../types'
import type { LLMNodeData } from './types'
import { Resolution } from '@/types/app'
export const mockLLMNodeData: LLMNodeData = {

View File

@ -0,0 +1,23 @@
import type { Resolution } from '@/types/app'
import type { Memory, ModelConfig, PromptItem, ValueSelector, Variable } from '@/app/components/workflow/types'
export type LLMNodeData = {
title: string
desc: string
type: string
model: ModelConfig
variables: Variable[]
prompt: PromptItem[] | PromptItem
memory: Memory
context: {
enabled: boolean
size: number
}
vision: {
enabled: boolean
variable_selector: ValueSelector
configs: {
detail: Resolution
}
}
}

View File

@ -1,5 +1,4 @@
import type { Node as ReactFlowNode } from 'reactflow'
import type { Resolution } from '@/types/app'
export enum BlockEnum {
Start = 'start',
@ -62,27 +61,6 @@ export type Memory = {
}
}
export type LLMNodeData = {
title: string
desc: string
type: string
model: ModelConfig
variables: Variable[]
prompt: PromptItem[] | PromptItem
memory: Memory
context: {
enabled: boolean
size: number
}
vision: {
enabled: boolean
variable_selector: ValueSelector
configs: {
detail: Resolution
}
}
}
export type Var = {
variable: string
type: string