| | |
| | | |
| | | <FieldLayout :title="VueFlowHelper.getConfigValue(VueFlowHelper.getGroupParam(data), 'name', '代理名称')"> |
| | | <el-select |
| | | class="w-[340px]" |
| | | class="w-full" |
| | | filterable |
| | | :disabled="isViewMode" |
| | | :placeholder="VueFlowHelper.getConfigValue(agentParams, 'placeholder', '代理名称')" |
| | |
| | | <NodeBasicLayout v-model:title="data.title" :type="NodeType.Analysis" :isViewMode="isViewMode"> |
| | | <Handle :id="targetHandleId" type="target" :position="Position.Left" /> |
| | | <FieldLayout :title="modelSetting.name"> |
| | | <div class="w-[340px] flex-items-center gap-x-2"> |
| | | <div class="w-full flex-items-center gap-x-2"> |
| | | <div class="flex-column gap-y-1.5"> |
| | | <span class="text-gray-500">{{ VueFlowHelper.getParams(modelSetting, 'llm_model').label }}</span> |
| | | |
| | |
| | | <el-input-number |
| | | :readonly="isViewMode" |
| | | v-model="VueFlowHelper.getParams(modelSetting, 'temperature').value" |
| | | class="w-[180px]" |
| | | class="w-full" |
| | | controls-position="right" |
| | | placeholder="" |
| | | ></el-input-number> |
| | | </div> |
| | |
| | | <Handle :id="targetHandleId" type="target" :position="Position.Left" /> |
| | | <FieldLayout :title="VueFlowHelper.getConfigValue(VueFlowHelper.getGroupParam(data), 'name', '函数名称')"> |
| | | <el-select |
| | | class="w-[340px]" |
| | | class="w-full" |
| | | filterable |
| | | :placeholder="funcNameParams.placeholder" |
| | | v-model="funcNameParams.value" |
| | |
| | | <Handle :id="targetHandleId" type="target" :position="Position.Left" /> |
| | | |
| | | <FieldLayout :title="VueFlowHelper.getConfigValue(modelSetting, 'name', '模型设置')"> |
| | | <div class="w-[340px] flex-items-center gap-x-2"> |
| | | <div class="w-full flex-items-center gap-x-2"> |
| | | <div class="flex-column gap-y-1.5"> |
| | | <span class="text-gray-500">{{ VueFlowHelper.getParams(modelSetting, 'llm_model').label }}</span> |
| | | <el-tree-select |
| | |
| | | <div class="flex-column gap-y-1.5"> |
| | | <span class="text-gray-500">{{ VueFlowHelper.getParams(modelSetting, 'temperature').label }}</span> |
| | | <el-input-number |
| | | class="w-full" |
| | | controls-position="right" |
| | | v-model="VueFlowHelper.getParams(modelSetting, 'temperature').value" |
| | | class="w-[180px]" |
| | | :readonly="isViewMode" |
| | | placeholder="" |
| | | ></el-input-number> |
| | |
| | | <template> |
| | | <NodeBasicLayout |
| | | :maxWidth="520" |
| | | v-model:title="data.title" |
| | | :type="NodeType.Output" |
| | | :description="VueFlowHelper.getConfigValue(data, 'description', '可向用户发送消息...')" |
| | |
| | | v-model="VueFlowHelper.getParams(outputParams, 'output_result').value.type" |
| | | @change="interactionTypeChange" |
| | | :disabled="isViewMode" |
| | | class="flex-items-center justify-between interaction-radio-group" |
| | | |
| | | > |
| | | <el-radio v-for="item in Object.keys(interactionTypeMap)" :key="item" :value="item"> |
| | | {{ interactionTypeMap[item] }} |
| | |
| | | const isEditStatus = ref(false); |
| | | const tmpEditValue = ref(''); |
| | | </script> |
| | | <style scoped lang="scss"> |
| | | .interaction-radio-group { |
| | | :deep(.el-radio) { |
| | | margin-right: 0; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | :isViewMode="isViewMode" |
| | | > |
| | | <FieldLayout :title="VueFlowHelper.getConfigValue(varListConfig, 'name', '流程参数')"> |
| | | <el-table class="flex-auto" :data="varList" border> |
| | | <el-table-column prop="name" width="170" label="参数名" fixed> |
| | | <template #default="scope"> |
| | | <el-input v-model="scope.row.name" :readonly="isViewMode"></el-input> |
| | | <div v-for="(item, index) in varList" :key="index" class="group/varItem"> |
| | | <FieldLayout level="2" title="参数名"> |
| | | <template #right v-if="!isViewMode"> |
| | | <span |
| | | class="ywifont ywicon-shanchu text-red-400 invisible group-hover/varItem:visible cursor-pointer" |
| | | @click="handleClickDeleteBtn(index)" |
| | | ></span> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column prop="type" width="220" label="类型"> |
| | | <template #default="scope"> |
| | | <el-select v-model="scope.row.type"> |
| | | <el-option |
| | | v-for="item in Object.keys(parameterTypeMap)" |
| | | :key="item" |
| | | :value="item" |
| | | :label="parameterTypeMap[item]" |
| | | ></el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> --> |
| | | <el-table-column prop="description" width="380" label="描述"> |
| | | <template #default="scope"> |
| | | <el-input |
| | | class="nowheel" |
| | | type="textarea" |
| | | :autosize="{ minRows: 1, maxRows: 6 }" |
| | | v-model="scope.row.description" |
| | | :readonly="isViewMode" |
| | | ></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column prop="isRequired" width="56" label="必填"> |
| | | <template #default="scope"> |
| | | <el-checkbox v-model="scope.row.isRequired"></el-checkbox> |
| | | </template> |
| | | </el-table-column> --> |
| | | <el-input v-model="item.name" :readonly="isViewMode"></el-input> |
| | | </FieldLayout> |
| | | <FieldLayout level="2" title="描述"> |
| | | <el-input |
| | | class="nowheel" |
| | | type="textarea" |
| | | :autosize="{ minRows: 2, maxRows: 6 }" |
| | | v-model="item.description" |
| | | :readonly="isViewMode" |
| | | ></el-input> |
| | | </FieldLayout> |
| | | </div> |
| | | |
| | | <el-table-column label="操作" width="55" fixed="right" v-if="!isViewMode"> |
| | | <template #default="scope"> |
| | | <el-tooltip effect="dark" content="删除" placement="top"> |
| | | <i |
| | | class="ywifont ywicon-shanchu !text-[17px] text-red-400 cursor-pointer" |
| | | @click="handleClickDeleteBtn(scope.$index)" |
| | | ></i> |
| | | </el-tooltip> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-button v-if="!isViewMode" class="w-fit" type="primary" @click="handleClickAddBtn">添加参数</el-button> |
| | | </FieldLayout> |
| | | <Handle :id="handleId" type="source" :position="Position.Right" /> |
| | |
| | | <template> |
| | | <div class="flex flex-col" :class="[`gap-${gapLen}`]"> |
| | | <div class="flex-items-center justify-between"> |
| | | <div class="text-base" :class="[level === '1' ? 'font-bold' : 'text-secondary']">{{ title }}</div> |
| | | <div class="text-base" :class="[level === '1' ? 'font-bold' : 'text-secondary font-bold']">{{ title }}</div> |
| | | <div class="flex-items-center gap-3" v-if="$slots.right"> |
| | | <slot name="right"></slot> |
| | | </div> |
| | |
| | | <template> |
| | | <div |
| | | :style="{ maxHeight: `${maxHeight}px`, maxWidth: `${maxWidth}px`, minHeight: `${minHeight}px`, minWidth: minWidth }" |
| | | :style="{ maxHeight: `${maxHeight}px`, maxWidth: `${maxWidth}px`, minHeight: `${minHeight}px`, minWidth: `320px` }" |
| | | class="order-2 rounded-lg border-solid border-gray-100 bg-white p-3 shadow-md relative hover:border-blue-500 group h-fit" |
| | | > |
| | | <div |
| | |
| | | const props = defineProps({ |
| | | maxWidth: { type: Number }, |
| | | maxHeight: { type: Number }, |
| | | minWidth: { type: Number }, |
| | | minHeight: { type: Number }, |
| | | type: { type: String as PropType<NodeType>, required: true }, |
| | | description: { type: String }, |
| | |
| | | host: '0.0.0.0', |
| | | port: env.VITE_PORT as unknown as number, |
| | | open: JSON.parse(env.VITE_OPEN), |
| | | hmr: false, |
| | | hmr: true, |
| | | proxy: { |
| | | '/gitee': { |
| | | target: 'https://gitee.com', |