diff --git a/web/app/components/workflow/nodes/llm/mock.ts b/web/app/components/workflow/nodes/llm/mock.ts index d1ac8b7009..a305fb3579 100644 --- a/web/app/components/workflow/nodes/llm/mock.ts +++ b/web/app/components/workflow/nodes/llm/mock.ts @@ -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 = { diff --git a/web/app/components/workflow/nodes/llm/types.ts b/web/app/components/workflow/nodes/llm/types.ts new file mode 100644 index 0000000000..c4c38ba2d6 --- /dev/null +++ b/web/app/components/workflow/nodes/llm/types.ts @@ -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 + } + } +} diff --git a/web/app/components/workflow/types.ts b/web/app/components/workflow/types.ts index be1fb9d479..ba99e0e526 100644 --- a/web/app/components/workflow/types.ts +++ b/web/app/components/workflow/types.ts @@ -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