feat: 商道智能体
This commit is contained in:
parent
4255c31b79
commit
3be16102a3
@ -1031,7 +1031,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<el-row>
|
<el-row>
|
||||||
<span style="margin-right: 24px">是否调用TTS接口</span>
|
<span style="margin-right: 24px">是否调用TTS接口</span>
|
||||||
<el-switch size="small" v-model="sdAgentNodeData.invokeTts" />
|
<el-switch size="small" v-model="sdAgentNodeData.invokeTts" @change="handleTtsChange" />
|
||||||
</el-row>
|
</el-row>
|
||||||
<div v-if="sdAgentNodeData.invokeTts" >
|
<div v-if="sdAgentNodeData.invokeTts" >
|
||||||
<div style="margin: 10px 0">TTS参数设置</div>
|
<div style="margin: 10px 0">TTS参数设置</div>
|
||||||
@ -1196,8 +1196,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import FormItemRecursive from "./FormItemRecursive.vue";
|
import FormItemRecursive from "./FormItemRecursive.vue";
|
||||||
import { Plus, Minus } from "@element-plus/icons-vue";
|
import { Plus, Minus } from "@element-plus/icons-vue";
|
||||||
import { ElMessage } from 'element-plus'
|
import { getInput, transformHttpNodeData, transformSdAgentNodeData } from "@/utils/flow";
|
||||||
import { getInput, filterEmptyName, transformHttpNodeData, transformSdAgentNodeData } from "@/utils/flow";
|
|
||||||
import { emitter } from "@/utils/eventBus";
|
import { emitter } from "@/utils/eventBus";
|
||||||
import * as monaco from 'monaco-editor';
|
import * as monaco from 'monaco-editor';
|
||||||
import { nextTick, onUnmounted, watch } from "vue";
|
import { nextTick, onUnmounted, watch } from "vue";
|
||||||
@ -1587,6 +1586,28 @@ const handleHttpNodeDelete = (type, index) => {
|
|||||||
// 商道智能体
|
// 商道智能体
|
||||||
const sdAgentNodeData = ref({})
|
const sdAgentNodeData = ref({})
|
||||||
|
|
||||||
|
const voiceOptions = () => {
|
||||||
|
return [{
|
||||||
|
value: 'x4_xiaoyan',
|
||||||
|
label: 'x4_xiaoyan'
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleTtsChange = (val) => {
|
||||||
|
if (val) {
|
||||||
|
sdAgentNodeData.value.tts = []
|
||||||
|
if (!sdAgentNodeData.value.tts || sdAgentNodeData.value.tts.length === 0) {
|
||||||
|
sdAgentNodeData.value.tts = [
|
||||||
|
{ name: 'url', type: "input", input: "", disabled: true },
|
||||||
|
{ name: 'text', type: "input", input: "", disabled: true },
|
||||||
|
{ name: 'speed', type: "input", input: "", max: 100, disabled: true },
|
||||||
|
{ name: 'voice', type: "input", input: "", componentType: 'select', selectOptions: voiceOptions(), disabled: true },
|
||||||
|
{ name: 'volume', type: "input", input: "", componentType: 'number', max: 100, disabled: true }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const addSdAgentItem = (e) => {
|
const addSdAgentItem = (e) => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
sdAgentNodeData.value.outputParams.push({ name: "", type: "string", input: "" });
|
sdAgentNodeData.value.outputParams.push({ name: "", type: "string", input: "" });
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user