| | |
| | | description: '调用大模型回答用户问题或者处理任务。', |
| | | }; |
| | | data[VueFlowConstant.GROUP_PARAMS_KEY] = [ |
| | | |
| | | { |
| | | name: '模型设置', |
| | | |
| | |
| | | name: '提示词', |
| | | [VueFlowConstant.PARAMS_KEY]: [{ key: 'prompt', label: '', type: 'textarea', value: '' }], |
| | | }, |
| | | { |
| | | name: '输出参数名', |
| | | [VueFlowConstant.PARAMS_KEY]: [{ key: 'key', type: 'input', value: '' }], |
| | | }, |
| | | ]; |
| | | break; |
| | | case NodeType.Analysis: |
| | |
| | | :description="VueFlowHelper.getConfigValue(data, 'description', '调用大模型回答用户问题或者处理任务。')" |
| | | > |
| | | <Handle :id="targetHandleId" type="target" :position="Position.Left" /> |
| | | <FieldLayout :title="outputParam.name"> |
| | | <el-input class="w-full flex-0" v-model="outputParam.params[0].value" placeholder="输出参数名"> </el-input> |
| | | </FieldLayout> |
| | | <FieldLayout :title="VueFlowHelper.getConfigValue(modelSetting, 'name', '模型设置')"> |
| | | <div class="w-[340px] flex-items-center gap-x-2"> |
| | | <div class="flex-column gap-y-1.5"> |
| | |
| | | import type { NodeProps } from '@vue-flow/core'; |
| | | import { VueFlowConstant } from '../../VueFlowConstant'; |
| | | import { VueFlowHelper } from '../../VueFlowHelper'; |
| | | import { LLMNodeData, LLMNodeEvents } from './index'; |
| | | import type { LLMNodeData, LLMNodeEvents } from './index'; |
| | | import { deepClone } from '/@/utils/other'; |
| | | import { NodeType } from '../../vueFlowEnum'; |
| | | |
| | |
| | | const targetHandleId = ref(VueFlowHelper.getHandleId(node.node, 'target')); |
| | | |
| | | const data = ref(node.node.data); |
| | | |
| | | const modelSetting = ref(VueFlowHelper.getGroupParam(data.value, 0)); |
| | | const prompt = ref(VueFlowHelper.getGroupParam(data.value, 1)); |
| | | |
| | | const outputParam = ref(VueFlowHelper.getGroupParam(data.value, 2)); |
| | | VueFlowHelper.getConfigValue(VueFlowHelper.getParams(prompt.value, 'prompt'), 'label', ''); |
| | | </script> |