| | |
| | | <template> |
| | | <NodeBasicLayout v-model:title="data.title" :type="NodeType.Output" :description="VueFlowHelper.getConfigValue(data, 'description', '可向用户发送消息,并且支持进行更丰富的交互,例如请求用户批准进行某项敏感操作、允许用户在模型输出内容的基础上直接修改并提交。')"> |
| | | <NodeBasicLayout |
| | | :maxWidth="520" |
| | | v-model:title="data.title" |
| | | :type="NodeType.Output" |
| | | :description=" |
| | | VueFlowHelper.getConfigValue( |
| | | data, |
| | | 'description', |
| | | '可向用户发送消息,并且支持进行更丰富的交互,例如请求用户批准进行某项敏感操作、允许用户在模型输出内容的基础上直接修改并提交。' |
| | | ) |
| | | " |
| | | > |
| | | <Handle :id="targetHandleId" type="target" :position="Position.Left" /> |
| | | <FieldLayout level="2" :title="VueFlowHelper.getParams(outputParams, 'output_msg').label"> |
| | | <el-input |
| | | v-model="VueFlowHelper.getParams(outputParams, 'output_msg').value.msg" |
| | | type="textarea" |
| | | :rows="4" |
| | | <CodeEditor |
| | | :title="VueFlowHelper.getParams(outputParams, 'output_msg').label" |
| | | v-model:editValue="VueFlowHelper.getParams(outputParams, 'output_msg').value.msg" |
| | | :maxHeight="180" |
| | | :placeholder="VueFlowHelper.getParams(outputParams, 'output_msg').placeholder" |
| | | autocomplete="off" |
| | | > |
| | | </el-input> |
| | | /> |
| | | </FieldLayout> |
| | | <FieldLayout level="2" :title="VueFlowHelper.getParams(outputParams, 'output_result').label"> |
| | | <el-radio-group v-model="VueFlowHelper.getParams(outputParams, 'output_result').value.type" @change="interactionTypeChange"> |
| | | <el-radio v-for="item in Object.keys(interactionTypeMap)" :key="item" :value="item">{{ interactionTypeMap[item] }}</el-radio> |
| | | </el-radio-group> |
| | | <el-input |
| | | v-model="VueFlowHelper.getParams(outputParams, 'output_result').value.value" |
| | | type="textarea" |
| | | :rows="4" |
| | | |
| | | <CodeEditor |
| | | title="输入型交互" |
| | | v-if="VueFlowHelper.getParams(outputParams, 'output_result').value.type === InteractionType.Input" |
| | | > |
| | | </el-input> |
| | | v-model:editValue="VueFlowHelper.getParams(outputParams, 'output_result').value.value" |
| | | :maxHeight="150" |
| | | /> |
| | | |
| | | <div |
| | | class="self-start w-full flex-col flex items-start gap-2" |
| | |
| | | import { ref } from 'vue'; |
| | | import { NodeType } from '../../vueFlowEnum'; |
| | | |
| | | import CodeEditor from '/@/components/input/codeEditor/index.vue'; |
| | | import type { NodeProps } from '@vue-flow/core'; |
| | | import { nextTick } from 'vue'; |
| | | import { VueFlowHelper } from '../../VueFlowHelper'; |
| | | import { InteractionType, interactionTypeMap } from '../../vueFlowEnum'; |
| | | import { LLMNodeData, LLMNodeEvents } from './index'; |
| | | |
| | | import NodeBasicLayout from './components/NodeBasicLayout.vue'; |
| | | import FieldLayout from './components/FieldLayout.vue'; |
| | | import NodeBasicLayout from './components/NodeBasicLayout.vue'; |
| | | import type { LLMNodeData, LLMNodeEvents } from './index'; |
| | | defineProps<NodeProps<LLMNodeData, LLMNodeEvents>>(); |
| | | |
| | | const node = useNode(); |