import { nanoid } from 'nanoid'; import { FlowNodeRegistry } from '../../typings'; import iconLLM from '../../assets/icon-llm.jpg'; let index = 0; export const LLMNodeRegistry: FlowNodeRegistry = { type: 'llm', info: { icon: iconLLM, description: 'Call the large language model and use variables and prompt words to generate responses.', }, onAdd() { return { id: `llm_${nanoid(5)}`, type: 'llm', data: { title: `LLM_${++index}`, inputsValues: {}, inputs: { type: 'object', required: ['modelType', 'temperature', 'prompt'], properties: { modelType: { type: 'string', }, temperature: { type: 'number', }, systemPrompt: { type: 'string', }, prompt: { type: 'string', }, }, }, outputs: { type: 'object', properties: { result: { type: 'string' }, }, }, }, }; }, };