feat: document
This commit is contained in:
parent
636f96178c
commit
2fe1803f19
39
ui/src/components/auto-tooltip/index.vue
Normal file
39
ui/src/components/auto-tooltip/index.vue
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
<template>
|
||||||
|
<el-tooltip
|
||||||
|
v-bind="$attrs"
|
||||||
|
:disabled="!(containerWeight > contentWeight)"
|
||||||
|
effect="dark"
|
||||||
|
placement="bottom"
|
||||||
|
popper-class="auto-tooltip-popper"
|
||||||
|
>
|
||||||
|
<div ref="tagLabel" :class="['auto-tooltip', className]" :style="style">
|
||||||
|
<slot></slot>
|
||||||
|
</div>
|
||||||
|
</el-tooltip>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, computed, onMounted, nextTick } from 'vue'
|
||||||
|
defineOptions({ name: 'AutoTooltip' })
|
||||||
|
const props = defineProps({ className: String, style: Object })
|
||||||
|
const tagLabel = ref()
|
||||||
|
const containerWeight = ref(0)
|
||||||
|
const contentWeight = ref(0)
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
nextTick(() => {
|
||||||
|
containerWeight.value = tagLabel.value?.scrollWidth
|
||||||
|
contentWeight.value = tagLabel.value?.clientWidth
|
||||||
|
})
|
||||||
|
window.addEventListener('resize', function () {
|
||||||
|
containerWeight.value = tagLabel.value?.scrollWidth
|
||||||
|
contentWeight.value = tagLabel.value?.clientWidth
|
||||||
|
})
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.auto-tooltip {
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
203
ui/src/components/generate-related-dialog/index.vue
Normal file
203
ui/src/components/generate-related-dialog/index.vue
Normal file
@ -0,0 +1,203 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
:title="$t('views.document.generateQuestion.title')"
|
||||||
|
v-model="dialogVisible"
|
||||||
|
width="650"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:close-on-press-escape="false"
|
||||||
|
>
|
||||||
|
<div class="content-height">
|
||||||
|
<el-form
|
||||||
|
ref="FormRef"
|
||||||
|
:model="form"
|
||||||
|
:rules="rules"
|
||||||
|
label-position="top"
|
||||||
|
require-asterisk-position="right"
|
||||||
|
>
|
||||||
|
<div class="update-info flex border-r-4 mb-16 p-8-12">
|
||||||
|
<div class="mt-4">
|
||||||
|
<AppIcon iconName="app-warning-colorful" style="font-size: 16px"></AppIcon>
|
||||||
|
</div>
|
||||||
|
<div class="ml-12 lighter">
|
||||||
|
<p>{{ $t('views.document.generateQuestion.tip1', { data: '{data}' }) }}</p>
|
||||||
|
<p>
|
||||||
|
{{ $t('views.document.generateQuestion.tip2')+ '<question></question>' +
|
||||||
|
$t('views.document.generateQuestion.tip3') }}
|
||||||
|
</p>
|
||||||
|
<p>{{ $t('views.document.generateQuestion.tip4') }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<el-form-item
|
||||||
|
:label="$t('views.application.form.aiModel.label')"
|
||||||
|
prop="model_id"
|
||||||
|
>
|
||||||
|
<ModelSelect
|
||||||
|
v-model="form.model_id"
|
||||||
|
:placeholder="$t('views.application.form.aiModel.placeholder')"
|
||||||
|
:options="modelOptions"
|
||||||
|
showFooter
|
||||||
|
:model-type="'LLM'"
|
||||||
|
></ModelSelect>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
:label="$t('views.application.form.prompt.label')"
|
||||||
|
prop="prompt"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="form.prompt"
|
||||||
|
:placeholder="$t('views.application.form.prompt.placeholder')"
|
||||||
|
:rows="7"
|
||||||
|
type="textarea"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
v-if="['document', 'dataset'].includes(apiType)"
|
||||||
|
:label="$t('components.selectParagraph.title')"
|
||||||
|
prop="state"
|
||||||
|
>
|
||||||
|
<el-radio-group v-model="state" class="radio-block">
|
||||||
|
<el-radio value="error" size="large">{{
|
||||||
|
$t('components.selectParagraph.error')
|
||||||
|
}}</el-radio>
|
||||||
|
<el-radio value="all" size="large">{{ $t('components.selectParagraph.all') }}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<template #footer>
|
||||||
|
<span class="dialog-footer">
|
||||||
|
<el-button @click.prevent="dialogVisible = false"> {{ $t('common.cancel') }} </el-button>
|
||||||
|
<el-button type="primary" @click="submitHandle(FormRef)" :disabled="!model || loading">
|
||||||
|
{{ $t('common.confirm') }}
|
||||||
|
</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { reactive, ref, watch } from 'vue'
|
||||||
|
import { useRoute } from 'vue-router'
|
||||||
|
import documentApi from '@/api/knowledge/document'
|
||||||
|
import paragraphApi from '@/api/knowledge/paragraph'
|
||||||
|
import knowledgeApi from '@/api/knowledge/knowledge'
|
||||||
|
import useStore from '@/stores'
|
||||||
|
import { groupBy } from 'lodash'
|
||||||
|
import { MsgSuccess } from '@/utils/message'
|
||||||
|
import { t } from '@/locales'
|
||||||
|
import type { FormInstance } from 'element-plus'
|
||||||
|
|
||||||
|
const route = useRoute()
|
||||||
|
const {
|
||||||
|
params: { id, documentId } // id为datasetID
|
||||||
|
} = route as any
|
||||||
|
|
||||||
|
const { model, prompt, user } = useStore()
|
||||||
|
|
||||||
|
const emit = defineEmits(['refresh'])
|
||||||
|
|
||||||
|
const loading = ref<boolean>(false)
|
||||||
|
|
||||||
|
const dialogVisible = ref<boolean>(false)
|
||||||
|
const modelOptions = ref<any>(null)
|
||||||
|
const idList = ref<string[]>([])
|
||||||
|
const apiType = ref('') // 文档document或段落paragraph
|
||||||
|
const state = ref<'all' | 'error'>('error')
|
||||||
|
const stateMap = {
|
||||||
|
all: ['0', '1', '2', '3', '4', '5', 'n'],
|
||||||
|
error: ['0', '1', '3', '4', '5', 'n']
|
||||||
|
}
|
||||||
|
const FormRef = ref()
|
||||||
|
const datasetId = ref<string>()
|
||||||
|
const userId = user.userInfo?.id as string
|
||||||
|
const form = ref(prompt.get(userId))
|
||||||
|
const rules = reactive({
|
||||||
|
model_id: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: t('views.application.form.aiModel.placeholder'),
|
||||||
|
trigger: 'blur'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
prompt: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: t('views.application.form.prompt.placeholder'),
|
||||||
|
trigger: 'blur'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
|
||||||
|
watch(dialogVisible, (bool) => {
|
||||||
|
if (!bool) {
|
||||||
|
form.value = prompt.get(userId)
|
||||||
|
FormRef.value?.clearValidate()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const open = (ids: string[], type: string, _datasetId?: string) => {
|
||||||
|
datasetId.value = _datasetId
|
||||||
|
getModel()
|
||||||
|
idList.value = ids
|
||||||
|
apiType.value = type
|
||||||
|
dialogVisible.value = true
|
||||||
|
}
|
||||||
|
|
||||||
|
const submitHandle = async (formEl: FormInstance) => {
|
||||||
|
if (!formEl) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
await formEl.validate((valid, fields) => {
|
||||||
|
if (valid) {
|
||||||
|
// 保存提示词
|
||||||
|
prompt.save(user.userInfo?.id as string, form.value)
|
||||||
|
if (apiType.value === 'paragraph') {
|
||||||
|
const data = {
|
||||||
|
...form.value,
|
||||||
|
paragraph_id_list: idList.value
|
||||||
|
}
|
||||||
|
paragraphApi.batchGenerateRelated(id, documentId, data, loading).then(() => {
|
||||||
|
MsgSuccess(t('views.document.generateQuestion.successMessage'))
|
||||||
|
emit('refresh')
|
||||||
|
dialogVisible.value = false
|
||||||
|
})
|
||||||
|
} else if (apiType.value === 'document') {
|
||||||
|
const data = {
|
||||||
|
...form.value,
|
||||||
|
document_id_list: idList.value,
|
||||||
|
state_list: stateMap[state.value]
|
||||||
|
}
|
||||||
|
documentApi.batchGenerateRelated(id, data, loading).then(() => {
|
||||||
|
MsgSuccess(t('views.document.generateQuestion.successMessage'))
|
||||||
|
emit('refresh')
|
||||||
|
dialogVisible.value = false
|
||||||
|
})
|
||||||
|
} else if (apiType.value === 'dataset') {
|
||||||
|
const data = {
|
||||||
|
...form.value,
|
||||||
|
state_list: stateMap[state.value]
|
||||||
|
}
|
||||||
|
datasetApi.generateRelated(id ? id : datasetId.value, data, loading).then(() => {
|
||||||
|
MsgSuccess(t('views.document.generateQuestion.successMessage'))
|
||||||
|
dialogVisible.value = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function getModel() {
|
||||||
|
loading.value = true
|
||||||
|
datasetApi
|
||||||
|
.getDatasetModel(id ? id : datasetId.value)
|
||||||
|
.then((res: any) => {
|
||||||
|
modelOptions.value = groupBy(res?.data, 'provider')
|
||||||
|
loading.value = false
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
loading.value = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
defineExpose({ open })
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped></style>
|
||||||
@ -15,6 +15,7 @@ import CodemirrorEditor from './codemirror-editor/index.vue'
|
|||||||
import InfiniteScroll from './infinite-scroll/index.vue'
|
import InfiniteScroll from './infinite-scroll/index.vue'
|
||||||
import ModelSelect from './model-select/index.vue'
|
import ModelSelect from './model-select/index.vue'
|
||||||
import ReadWrite from './read-write/index.vue'
|
import ReadWrite from './read-write/index.vue'
|
||||||
|
import AutoTooltip from './auto-tooltip/index.vue'
|
||||||
export default {
|
export default {
|
||||||
install(app: App) {
|
install(app: App) {
|
||||||
app.component('LogoFull', LogoFull)
|
app.component('LogoFull', LogoFull)
|
||||||
@ -33,5 +34,6 @@ export default {
|
|||||||
app.component('InfiniteScroll', InfiniteScroll)
|
app.component('InfiniteScroll', InfiniteScroll)
|
||||||
app.component('ModelSelect', ModelSelect)
|
app.component('ModelSelect', ModelSelect)
|
||||||
app.component('ReadWrite', ReadWrite)
|
app.component('ReadWrite', ReadWrite)
|
||||||
|
app.component('AutoTooltip', AutoTooltip)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@ -81,15 +81,15 @@
|
|||||||
shape="square"
|
shape="square"
|
||||||
:size="24"
|
:size="24"
|
||||||
/>
|
/>
|
||||||
<AppAvatar
|
<el-avatar
|
||||||
v-else-if="isDataset && item.type === '1'"
|
v-else-if="isDataset && item.type === '1'"
|
||||||
class="mr-12 avatar-purple"
|
class="mr-12 avatar-purple"
|
||||||
shape="square"
|
shape="square"
|
||||||
:size="24"
|
:size="24"
|
||||||
>
|
>
|
||||||
<img src="@/assets/knowledge/icon_web.svg" style="width: 58%" alt="" />
|
<img src="@/assets/knowledge/icon_web.svg" style="width: 58%" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
<AppAvatar
|
<el-avatar
|
||||||
v-else-if="isDataset && item.type === '2'"
|
v-else-if="isDataset && item.type === '2'"
|
||||||
class="mr-8 avatar-purple"
|
class="mr-8 avatar-purple"
|
||||||
shape="square"
|
shape="square"
|
||||||
@ -97,10 +97,10 @@
|
|||||||
style="background: none"
|
style="background: none"
|
||||||
>
|
>
|
||||||
<img src="@/assets/knowledge/logo_lark.svg" style="width: 100%" alt="" />
|
<img src="@/assets/knowledge/logo_lark.svg" style="width: 100%" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
<AppAvatar v-else class="mr-12 avatar-blue" shape="square" :size="24">
|
<el-avatar v-else class="mr-12 avatar-blue" shape="square" :size="24">
|
||||||
<img src="@/assets/knowledge/icon_document.svg" style="width: 58%" alt="" />
|
<img src="@/assets/knowledge/icon_document.svg" style="width: 58%" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
<span class="ellipsis" :title="item?.name"> {{ item?.name }}</span>
|
<span class="ellipsis" :title="item?.name"> {{ item?.name }}</span>
|
||||||
</div>
|
</div>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import useFolderStore from './modules/folder'
|
|||||||
import useThemeStore from './modules/theme'
|
import useThemeStore from './modules/theme'
|
||||||
import useKnowledgeStore from './modules/knowledge'
|
import useKnowledgeStore from './modules/knowledge'
|
||||||
import useModelStore from './modules/model'
|
import useModelStore from './modules/model'
|
||||||
|
import usePromptStore from './modules/prompt'
|
||||||
|
|
||||||
const useStore = () => ({
|
const useStore = () => ({
|
||||||
common: useCommonStore(),
|
common: useCommonStore(),
|
||||||
@ -14,6 +15,7 @@ const useStore = () => ({
|
|||||||
theme: useThemeStore(),
|
theme: useThemeStore(),
|
||||||
knowledge: useKnowledgeStore(),
|
knowledge: useKnowledgeStore(),
|
||||||
model: useModelStore(),
|
model: useModelStore(),
|
||||||
|
prompt: usePromptStore(),
|
||||||
})
|
})
|
||||||
|
|
||||||
export default useStore
|
export default useStore
|
||||||
|
|||||||
37
ui/src/stores/modules/prompt.ts
Normal file
37
ui/src/stores/modules/prompt.ts
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
import { defineStore } from 'pinia'
|
||||||
|
import { t } from '@/locales'
|
||||||
|
export interface promptTypes {
|
||||||
|
user: string
|
||||||
|
formValue: { model_id: string; prompt: string }
|
||||||
|
}
|
||||||
|
|
||||||
|
const usePromptStore = defineStore('prompt', {
|
||||||
|
state: (): promptTypes[] => JSON.parse(localStorage.getItem('PROMPT_CACHE') || '[]'),
|
||||||
|
actions: {
|
||||||
|
save(user: string, formValue: any) {
|
||||||
|
this.$state.forEach((item: any, index: number) => {
|
||||||
|
if (item.user === user) {
|
||||||
|
this.$state.splice(index, 1)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.$state.push({ user, formValue })
|
||||||
|
localStorage.setItem('PROMPT_CACHE', JSON.stringify(this.$state))
|
||||||
|
},
|
||||||
|
get(user: string) {
|
||||||
|
for (let i = 0; i < this.$state.length; i++) {
|
||||||
|
if (this.$state[i].user === user) {
|
||||||
|
return this.$state[i].formValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
model_id: '',
|
||||||
|
prompt:
|
||||||
|
t('views.document.generateQuestion.prompt1', { data: '{data}' }) +
|
||||||
|
'<question></question>' +
|
||||||
|
t('views.document.generateQuestion.prompt2'),
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
export default usePromptStore
|
||||||
@ -9,7 +9,7 @@
|
|||||||
<el-radio-group v-model="radioType" class="radio-block mb-16">
|
<el-radio-group v-model="radioType" class="radio-block mb-16">
|
||||||
<el-radio value="default">
|
<el-radio value="default">
|
||||||
<p>{{ $t('views.applicationOverview.appInfo.EditAvatarDialog.default') }}</p>
|
<p>{{ $t('views.applicationOverview.appInfo.EditAvatarDialog.default') }}</p>
|
||||||
<AppAvatar
|
<el-avatar
|
||||||
v-if="detail?.name"
|
v-if="detail?.name"
|
||||||
:name="detail?.name"
|
:name="detail?.name"
|
||||||
pinyinColor
|
pinyinColor
|
||||||
@ -21,7 +21,7 @@
|
|||||||
<el-radio value="custom">
|
<el-radio value="custom">
|
||||||
<p>{{ $t('views.applicationOverview.appInfo.EditAvatarDialog.customizeUpload') }}</p>
|
<p>{{ $t('views.applicationOverview.appInfo.EditAvatarDialog.customizeUpload') }}</p>
|
||||||
<div class="flex mt-8">
|
<div class="flex mt-8">
|
||||||
<AppAvatar
|
<el-avatar
|
||||||
v-if="fileURL"
|
v-if="fileURL"
|
||||||
shape="square"
|
shape="square"
|
||||||
:size="32"
|
:size="32"
|
||||||
@ -29,7 +29,7 @@
|
|||||||
class="mr-16"
|
class="mr-16"
|
||||||
>
|
>
|
||||||
<img :src="fileURL" alt="" />
|
<img :src="fileURL" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
<el-upload
|
<el-upload
|
||||||
ref="uploadRef"
|
ref="uploadRef"
|
||||||
action="#"
|
action="#"
|
||||||
|
|||||||
@ -33,15 +33,15 @@
|
|||||||
<div class="flex-between">
|
<div class="flex-between">
|
||||||
<div class="flex align-center">
|
<div class="flex align-center">
|
||||||
<div class="mr-12 ml-24 flex">
|
<div class="mr-12 ml-24 flex">
|
||||||
<AppAvatar
|
<el-avatar
|
||||||
v-if="isAppIcon(detail?.icon)"
|
v-if="isAppIcon(detail?.icon)"
|
||||||
shape="square"
|
shape="square"
|
||||||
:size="32"
|
:size="32"
|
||||||
style="background: none"
|
style="background: none"
|
||||||
>
|
>
|
||||||
<img :src="detail?.icon" alt="" />
|
<img :src="detail?.icon" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
<AppAvatar
|
<el-avatar
|
||||||
v-else-if="detail?.name"
|
v-else-if="detail?.name"
|
||||||
:name="detail?.name"
|
:name="detail?.name"
|
||||||
pinyinColor
|
pinyinColor
|
||||||
@ -51,7 +51,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h4 class="ellipsis">
|
<h4 class="ellipsis">
|
||||||
{{ detail?.name || $t('views.application.applicationForm.form.appName.label') }}
|
{{ detail?.name || $t('views.application.form.appName.label') }}
|
||||||
</h4>
|
</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="mr-16">
|
<div class="mr-16">
|
||||||
@ -133,9 +133,9 @@
|
|||||||
fit="cover"
|
fit="cover"
|
||||||
style="width: 28px; height: 28px; display: block"
|
style="width: 28px; height: 28px; display: block"
|
||||||
/>
|
/>
|
||||||
<AppAvatar v-else>
|
<el-avatar v-else>
|
||||||
<img src="@/assets/user-icon.svg" style="width: 54%" alt="" />
|
<img src="@/assets/user-icon.svg" style="width: 54%" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -12,22 +12,22 @@
|
|||||||
@mouseenter="showEditIcon = true"
|
@mouseenter="showEditIcon = true"
|
||||||
@mouseleave="showEditIcon = false"
|
@mouseleave="showEditIcon = false"
|
||||||
>
|
>
|
||||||
<AppAvatar
|
<el-avatar
|
||||||
v-if="isAppIcon(detail?.icon)"
|
v-if="isAppIcon(detail?.icon)"
|
||||||
shape="square"
|
shape="square"
|
||||||
:size="32"
|
:size="32"
|
||||||
style="background: none"
|
style="background: none"
|
||||||
>
|
>
|
||||||
<img :src="detail?.icon" alt="" />
|
<img :src="detail?.icon" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
<AppAvatar
|
<el-avatar
|
||||||
v-else-if="detail?.name"
|
v-else-if="detail?.name"
|
||||||
:name="detail?.name"
|
:name="detail?.name"
|
||||||
pinyinColor
|
pinyinColor
|
||||||
shape="square"
|
shape="square"
|
||||||
:size="32"
|
:size="32"
|
||||||
/>
|
/>
|
||||||
<AppAvatar
|
<el-avatar
|
||||||
v-if="showEditIcon"
|
v-if="showEditIcon"
|
||||||
shape="square"
|
shape="square"
|
||||||
class="edit-mask"
|
class="edit-mask"
|
||||||
@ -35,7 +35,7 @@
|
|||||||
@click="openEditAvatar"
|
@click="openEditAvatar"
|
||||||
>
|
>
|
||||||
<el-icon><EditPen /></el-icon>
|
<el-icon><EditPen /></el-icon>
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h4>{{ detail?.name }}</h4>
|
<h4>{{ detail?.name }}</h4>
|
||||||
|
|||||||
@ -28,9 +28,9 @@
|
|||||||
}}</el-tag>
|
}}</el-tag>
|
||||||
</h5>
|
</h5>
|
||||||
<el-text type="info" class="color-secondary flex mt-8">
|
<el-text type="info" class="color-secondary flex mt-8">
|
||||||
<AppAvatar :size="20" class="avatar-grey mr-4">
|
<el-avatar :size="20" class="avatar-grey mr-4">
|
||||||
<el-icon><UserFilled /></el-icon>
|
<el-icon><UserFilled /></el-icon>
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
{{ row.publish_user_name }}
|
{{ row.publish_user_name }}
|
||||||
</el-text>
|
</el-text>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -84,15 +84,15 @@
|
|||||||
<div class="flex-between">
|
<div class="flex-between">
|
||||||
<div class="flex align-center">
|
<div class="flex align-center">
|
||||||
<div class="mr-12 ml-24 flex">
|
<div class="mr-12 ml-24 flex">
|
||||||
<AppAvatar
|
<el-avatar
|
||||||
v-if="isAppIcon(detail?.icon)"
|
v-if="isAppIcon(detail?.icon)"
|
||||||
shape="square"
|
shape="square"
|
||||||
:size="32"
|
:size="32"
|
||||||
style="background: none"
|
style="background: none"
|
||||||
>
|
>
|
||||||
<img :src="detail?.icon" alt="" />
|
<img :src="detail?.icon" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
<AppAvatar
|
<el-avatar
|
||||||
v-else-if="detail?.name"
|
v-else-if="detail?.name"
|
||||||
:name="detail?.name"
|
:name="detail?.name"
|
||||||
pinyinColor
|
pinyinColor
|
||||||
@ -102,7 +102,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h4>
|
<h4>
|
||||||
{{ detail?.name || $t('views.application.applicationForm.form.appName.label') }}
|
{{ detail?.name || $t('views.application.form.appName.label') }}
|
||||||
</h4>
|
</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="mr-16">
|
<div class="mr-16">
|
||||||
|
|||||||
@ -33,7 +33,7 @@
|
|||||||
<template #label>
|
<template #label>
|
||||||
<div class="flex-between">
|
<div class="flex-between">
|
||||||
<span
|
<span
|
||||||
>{{ $t('views.application.applicationForm.form.appName.label') }}
|
>{{ $t('views.application.form.appName.label') }}
|
||||||
<span class="danger">*</span></span
|
<span class="danger">*</span></span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
@ -41,19 +41,19 @@
|
|||||||
<el-input
|
<el-input
|
||||||
v-model="applicationForm.name"
|
v-model="applicationForm.name"
|
||||||
maxlength="64"
|
maxlength="64"
|
||||||
:placeholder="$t('views.application.applicationForm.form.appName.placeholder')"
|
:placeholder="$t('views.application.form.appName.placeholder')"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
@blur="applicationForm.name = applicationForm.name?.trim()"
|
@blur="applicationForm.name = applicationForm.name?.trim()"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:label="$t('views.application.applicationForm.form.appDescription.label')"
|
:label="$t('views.application.form.appDescription.label')"
|
||||||
>
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="applicationForm.desc"
|
v-model="applicationForm.desc"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
:placeholder="
|
:placeholder="
|
||||||
$t('views.application.applicationForm.form.appDescription.placeholder')
|
$t('views.application.form.appDescription.placeholder')
|
||||||
"
|
"
|
||||||
:rows="3"
|
:rows="3"
|
||||||
maxlength="256"
|
maxlength="256"
|
||||||
@ -61,10 +61,10 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item :label="$t('views.application.applicationForm.form.aiModel.label')">
|
<el-form-item :label="$t('views.application.form.aiModel.label')">
|
||||||
<template #label>
|
<template #label>
|
||||||
<div class="flex-between">
|
<div class="flex-between">
|
||||||
<span>{{ $t('views.application.applicationForm.form.aiModel.label') }}</span>
|
<span>{{ $t('views.application.form.aiModel.label') }}</span>
|
||||||
|
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@ -78,7 +78,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<ModelSelect
|
<ModelSelect
|
||||||
v-model="applicationForm.model_id"
|
v-model="applicationForm.model_id"
|
||||||
:placeholder="$t('views.application.applicationForm.form.aiModel.placeholder')"
|
:placeholder="$t('views.application.form.aiModel.placeholder')"
|
||||||
:options="modelOptions"
|
:options="modelOptions"
|
||||||
@change="model_change"
|
@change="model_change"
|
||||||
@submitModel="getModel"
|
@submitModel="getModel"
|
||||||
@ -87,15 +87,15 @@
|
|||||||
></ModelSelect>
|
></ModelSelect>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:label="$t('views.application.applicationForm.form.roleSettings.label')"
|
:label="$t('views.application.form.roleSettings.label')"
|
||||||
>
|
>
|
||||||
<MdEditorMagnify
|
<MdEditorMagnify
|
||||||
:title="$t('views.application.applicationForm.form.roleSettings.label')"
|
:title="$t('views.application.form.roleSettings.label')"
|
||||||
v-model="applicationForm.model_setting.system"
|
v-model="applicationForm.model_setting.system"
|
||||||
style="height: 120px"
|
style="height: 120px"
|
||||||
@submitDialog="submitSystemDialog"
|
@submitDialog="submitSystemDialog"
|
||||||
:placeholder="
|
:placeholder="
|
||||||
$t('views.application.applicationForm.form.roleSettings.placeholder')
|
$t('views.application.form.roleSettings.placeholder')
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -103,7 +103,7 @@
|
|||||||
prop="model_setting.no_references_prompt"
|
prop="model_setting.no_references_prompt"
|
||||||
:rules="{
|
:rules="{
|
||||||
required: applicationForm.model_id,
|
required: applicationForm.model_id,
|
||||||
message: $t('views.application.applicationForm.form.prompt.requiredMessage'),
|
message: $t('views.application.form.prompt.requiredMessage'),
|
||||||
trigger: 'blur'
|
trigger: 'blur'
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
@ -111,14 +111,14 @@
|
|||||||
<div class="flex align-center">
|
<div class="flex align-center">
|
||||||
<span class="mr-4"
|
<span class="mr-4"
|
||||||
>{{
|
>{{
|
||||||
$t('views.application.applicationForm.form.prompt.label') +
|
$t('views.application.form.prompt.label') +
|
||||||
$t('views.application.applicationForm.form.prompt.noReferences')
|
$t('views.application.form.prompt.noReferences')
|
||||||
}}
|
}}
|
||||||
</span>
|
</span>
|
||||||
<el-tooltip
|
<el-tooltip
|
||||||
effect="dark"
|
effect="dark"
|
||||||
:content="
|
:content="
|
||||||
$t('views.application.applicationForm.form.prompt.noReferencesTooltip', {
|
$t('views.application.form.prompt.noReferencesTooltip', {
|
||||||
question: '{question}'
|
question: '{question}'
|
||||||
})
|
})
|
||||||
"
|
"
|
||||||
@ -133,8 +133,8 @@
|
|||||||
|
|
||||||
<MdEditorMagnify
|
<MdEditorMagnify
|
||||||
:title="
|
:title="
|
||||||
$t('views.application.applicationForm.form.prompt.label') +
|
$t('views.application.form.prompt.label') +
|
||||||
$t('views.application.applicationForm.form.prompt.noReferences')
|
$t('views.application.form.prompt.noReferences')
|
||||||
"
|
"
|
||||||
v-model="applicationForm.model_setting.no_references_prompt"
|
v-model="applicationForm.model_setting.no_references_prompt"
|
||||||
style="height: 120px"
|
style="height: 120px"
|
||||||
@ -143,7 +143,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:label="$t('views.application.applicationForm.form.historyRecord.label')"
|
:label="$t('views.application.form.historyRecord.label')"
|
||||||
@click.prevent
|
@click.prevent
|
||||||
>
|
>
|
||||||
<el-input-number
|
<el-input-number
|
||||||
@ -157,12 +157,12 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="$t('views.application.applicationForm.form.relatedKnowledgeBase')"
|
label="$t('views.application.form.relatedKnowledgeBase')"
|
||||||
>
|
>
|
||||||
<template #label>
|
<template #label>
|
||||||
<div class="flex-between">
|
<div class="flex-between">
|
||||||
<span>{{
|
<span>{{
|
||||||
$t('views.application.applicationForm.form.relatedKnowledge.label')
|
$t('views.application.form.relatedKnowledge.label')
|
||||||
}}</span>
|
}}</span>
|
||||||
<div>
|
<div>
|
||||||
<el-button type="primary" link @click="openParamSettingDialog">
|
<el-button type="primary" link @click="openParamSettingDialog">
|
||||||
@ -180,7 +180,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<div class="w-full">
|
<div class="w-full">
|
||||||
<el-text type="info" v-if="applicationForm.dataset_id_list?.length === 0"
|
<el-text type="info" v-if="applicationForm.dataset_id_list?.length === 0"
|
||||||
>{{ $t('views.application.applicationForm.form.relatedKnowledge.placeholder') }}
|
>{{ $t('views.application.form.relatedKnowledge.placeholder') }}
|
||||||
</el-text>
|
</el-text>
|
||||||
<el-row :gutter="12" v-else>
|
<el-row :gutter="12" v-else>
|
||||||
<el-col
|
<el-col
|
||||||
@ -196,15 +196,15 @@
|
|||||||
<el-card class="relate-dataset-card border-r-4" shadow="never">
|
<el-card class="relate-dataset-card border-r-4" shadow="never">
|
||||||
<div class="flex-between">
|
<div class="flex-between">
|
||||||
<div class="flex align-center" style="width: 80%">
|
<div class="flex align-center" style="width: 80%">
|
||||||
<AppAvatar
|
<el-avatar
|
||||||
v-if="relatedObject(datasetList, item, 'id')?.type === '1'"
|
v-if="relatedObject(datasetList, item, 'id')?.type === '1'"
|
||||||
class="mr-8 avatar-purple"
|
class="mr-8 avatar-purple"
|
||||||
shape="square"
|
shape="square"
|
||||||
:size="32"
|
:size="32"
|
||||||
>
|
>
|
||||||
<img src="@/assets/knowledge/icon_web.svg" style="width: 58%" alt="" />
|
<img src="@/assets/knowledge/icon_web.svg" style="width: 58%" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
<AppAvatar
|
<el-avatar
|
||||||
v-else-if="relatedObject(datasetList, item, 'id')?.type === '2'"
|
v-else-if="relatedObject(datasetList, item, 'id')?.type === '2'"
|
||||||
class="mr-8 avatar-purple"
|
class="mr-8 avatar-purple"
|
||||||
shape="square"
|
shape="square"
|
||||||
@ -212,10 +212,10 @@
|
|||||||
style="background: none"
|
style="background: none"
|
||||||
>
|
>
|
||||||
<img src="@/assets/knowledge/logo_lark.svg" style="width: 100%" alt="" />
|
<img src="@/assets/knowledge/logo_lark.svg" style="width: 100%" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
<AppAvatar v-else class="mr-8 avatar-blue" shape="square" :size="32">
|
<el-avatar v-else class="mr-8 avatar-blue" shape="square" :size="32">
|
||||||
<img src="@/assets/knowledge/icon_document.svg" style="width: 58%" alt="" />
|
<img src="@/assets/knowledge/icon_document.svg" style="width: 58%" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
|
|
||||||
<span
|
<span
|
||||||
class="ellipsis cursor"
|
class="ellipsis cursor"
|
||||||
@ -236,24 +236,24 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:label="$t('views.application.applicationForm.form.prompt.label')"
|
:label="$t('views.application.form.prompt.label')"
|
||||||
prop="model_setting.prompt"
|
prop="model_setting.prompt"
|
||||||
:rules="{
|
:rules="{
|
||||||
required: applicationForm.model_id,
|
required: applicationForm.model_id,
|
||||||
message: $t('views.application.applicationForm.form.prompt.requiredMessage'),
|
message: $t('views.application.form.prompt.requiredMessage'),
|
||||||
trigger: 'blur'
|
trigger: 'blur'
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<template #label>
|
<template #label>
|
||||||
<div class="flex align-center">
|
<div class="flex align-center">
|
||||||
<span class="mr-4">
|
<span class="mr-4">
|
||||||
{{ $t('views.application.applicationForm.form.prompt.label') }}
|
{{ $t('views.application.form.prompt.label') }}
|
||||||
{{ $t('views.application.applicationForm.form.prompt.references') }}
|
{{ $t('views.application.form.prompt.references') }}
|
||||||
</span>
|
</span>
|
||||||
<el-tooltip
|
<el-tooltip
|
||||||
effect="dark"
|
effect="dark"
|
||||||
:content="
|
:content="
|
||||||
$t('views.application.applicationForm.form.prompt.referencesTooltip', {
|
$t('views.application.form.prompt.referencesTooltip', {
|
||||||
data: '{data}',
|
data: '{data}',
|
||||||
question: '{question}'
|
question: '{question}'
|
||||||
})
|
})
|
||||||
@ -269,8 +269,8 @@
|
|||||||
|
|
||||||
<MdEditorMagnify
|
<MdEditorMagnify
|
||||||
:title="
|
:title="
|
||||||
$t('views.application.applicationForm.form.prompt.label') +
|
$t('views.application.form.prompt.label') +
|
||||||
$t('views.application.applicationForm.form.prompt.references')
|
$t('views.application.form.prompt.references')
|
||||||
"
|
"
|
||||||
v-model="applicationForm.model_setting.prompt"
|
v-model="applicationForm.model_setting.prompt"
|
||||||
style="height: 150px"
|
style="height: 150px"
|
||||||
@ -278,9 +278,9 @@
|
|||||||
:placeholder="defaultPrompt"
|
:placeholder="defaultPrompt"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('views.application.applicationForm.form.prologue')">
|
<el-form-item :label="$t('views.application.form.prologue')">
|
||||||
<MdEditorMagnify
|
<MdEditorMagnify
|
||||||
:title="$t('views.application.applicationForm.form.prologue')"
|
:title="$t('views.application.form.prologue')"
|
||||||
v-model="applicationForm.prologue"
|
v-model="applicationForm.prologue"
|
||||||
style="height: 150px"
|
style="height: 150px"
|
||||||
@submitDialog="submitPrologueDialog"
|
@submitDialog="submitPrologueDialog"
|
||||||
@ -290,7 +290,7 @@
|
|||||||
<template #label>
|
<template #label>
|
||||||
<div class="flex-between">
|
<div class="flex-between">
|
||||||
<span class="mr-4">
|
<span class="mr-4">
|
||||||
{{ $t('views.application.applicationForm.form.reasoningContent.label') }}
|
{{ $t('views.application.form.reasoningContent.label') }}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
@ -312,14 +312,14 @@
|
|||||||
prop="stt_model_id"
|
prop="stt_model_id"
|
||||||
:rules="{
|
:rules="{
|
||||||
required: applicationForm.stt_model_enable,
|
required: applicationForm.stt_model_enable,
|
||||||
message: $t('views.application.applicationForm.form.voiceInput.requiredMessage'),
|
message: $t('views.application.form.voiceInput.requiredMessage'),
|
||||||
trigger: 'change'
|
trigger: 'change'
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<template #label>
|
<template #label>
|
||||||
<div class="flex-between">
|
<div class="flex-between">
|
||||||
<span class="mr-4">
|
<span class="mr-4">
|
||||||
{{ $t('views.application.applicationForm.form.voiceInput.label') }}
|
{{ $t('views.application.form.voiceInput.label') }}
|
||||||
<span class="danger" v-if="applicationForm.stt_model_enable">*</span>
|
<span class="danger" v-if="applicationForm.stt_model_enable">*</span>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
@ -328,7 +328,7 @@
|
|||||||
v-if="applicationForm.stt_model_enable"
|
v-if="applicationForm.stt_model_enable"
|
||||||
v-model="applicationForm.stt_autosend"
|
v-model="applicationForm.stt_autosend"
|
||||||
>{{
|
>{{
|
||||||
$t('views.application.applicationForm.form.voiceInput.autoSend')
|
$t('views.application.form.voiceInput.autoSend')
|
||||||
}}</el-checkbox
|
}}</el-checkbox
|
||||||
>
|
>
|
||||||
<el-switch
|
<el-switch
|
||||||
@ -343,7 +343,7 @@
|
|||||||
<ModelSelect
|
<ModelSelect
|
||||||
v-show="applicationForm.stt_model_enable"
|
v-show="applicationForm.stt_model_enable"
|
||||||
v-model="applicationForm.stt_model_id"
|
v-model="applicationForm.stt_model_id"
|
||||||
:placeholder="$t('views.application.applicationForm.form.voiceInput.placeholder')"
|
:placeholder="$t('views.application.form.voiceInput.placeholder')"
|
||||||
:options="sttModelOptions"
|
:options="sttModelOptions"
|
||||||
:model-type="'STT'"
|
:model-type="'STT'"
|
||||||
></ModelSelect>
|
></ModelSelect>
|
||||||
@ -352,14 +352,14 @@
|
|||||||
prop="tts_model_id"
|
prop="tts_model_id"
|
||||||
:rules="{
|
:rules="{
|
||||||
required: applicationForm.tts_type === 'TTS' && applicationForm.tts_model_enable,
|
required: applicationForm.tts_type === 'TTS' && applicationForm.tts_model_enable,
|
||||||
message: $t('views.application.applicationForm.form.voicePlay.requiredMessage'),
|
message: $t('views.application.form.voicePlay.requiredMessage'),
|
||||||
trigger: 'change'
|
trigger: 'change'
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<template #label>
|
<template #label>
|
||||||
<div class="flex-between">
|
<div class="flex-between">
|
||||||
<span class="mr-4"
|
<span class="mr-4"
|
||||||
>{{ $t('views.application.applicationForm.form.voicePlay.label') }}
|
>{{ $t('views.application.form.voicePlay.label') }}
|
||||||
<span
|
<span
|
||||||
class="danger"
|
class="danger"
|
||||||
v-if="
|
v-if="
|
||||||
@ -373,7 +373,7 @@
|
|||||||
v-if="applicationForm.tts_model_enable"
|
v-if="applicationForm.tts_model_enable"
|
||||||
v-model="applicationForm.tts_autoplay"
|
v-model="applicationForm.tts_autoplay"
|
||||||
>{{
|
>{{
|
||||||
$t('views.application.applicationForm.form.voicePlay.autoPlay')
|
$t('views.application.form.voicePlay.autoPlay')
|
||||||
}}</el-checkbox
|
}}</el-checkbox
|
||||||
>
|
>
|
||||||
<el-switch
|
<el-switch
|
||||||
@ -392,10 +392,10 @@
|
|||||||
class="mb-8"
|
class="mb-8"
|
||||||
>
|
>
|
||||||
<el-radio value="BROWSER">{{
|
<el-radio value="BROWSER">{{
|
||||||
$t('views.application.applicationForm.form.voicePlay.browser')
|
$t('views.application.form.voicePlay.browser')
|
||||||
}}</el-radio>
|
}}</el-radio>
|
||||||
<el-radio value="TTS">{{
|
<el-radio value="TTS">{{
|
||||||
$t('views.application.applicationForm.form.voicePlay.tts')
|
$t('views.application.form.voicePlay.tts')
|
||||||
}}</el-radio>
|
}}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</div>
|
</div>
|
||||||
@ -404,7 +404,7 @@
|
|||||||
v-if="applicationForm.tts_type === 'TTS' && applicationForm.tts_model_enable"
|
v-if="applicationForm.tts_type === 'TTS' && applicationForm.tts_model_enable"
|
||||||
v-model="applicationForm.tts_model_id"
|
v-model="applicationForm.tts_model_id"
|
||||||
:placeholder="
|
:placeholder="
|
||||||
$t('views.application.applicationForm.form.voicePlay.placeholder')
|
$t('views.application.form.voicePlay.placeholder')
|
||||||
"
|
"
|
||||||
:options="ttsModelOptions"
|
:options="ttsModelOptions"
|
||||||
@change="ttsModelChange()"
|
@change="ttsModelChange()"
|
||||||
@ -436,22 +436,22 @@
|
|||||||
@mouseenter="showEditIcon = true"
|
@mouseenter="showEditIcon = true"
|
||||||
@mouseleave="showEditIcon = false"
|
@mouseleave="showEditIcon = false"
|
||||||
>
|
>
|
||||||
<AppAvatar
|
<el-avatar
|
||||||
v-if="isAppIcon(applicationForm?.icon)"
|
v-if="isAppIcon(applicationForm?.icon)"
|
||||||
shape="square"
|
shape="square"
|
||||||
:size="32"
|
:size="32"
|
||||||
style="background: none"
|
style="background: none"
|
||||||
>
|
>
|
||||||
<img :src="applicationForm?.icon" alt="" />
|
<img :src="applicationForm?.icon" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
<AppAvatar
|
<el-avatar
|
||||||
v-else-if="applicationForm?.name"
|
v-else-if="applicationForm?.name"
|
||||||
:name="applicationForm?.name"
|
:name="applicationForm?.name"
|
||||||
pinyinColor
|
pinyinColor
|
||||||
shape="square"
|
shape="square"
|
||||||
:size="32"
|
:size="32"
|
||||||
/>
|
/>
|
||||||
<AppAvatar
|
<el-avatar
|
||||||
v-if="showEditIcon"
|
v-if="showEditIcon"
|
||||||
shape="square"
|
shape="square"
|
||||||
class="edit-mask"
|
class="edit-mask"
|
||||||
@ -459,11 +459,11 @@
|
|||||||
@click="openEditAvatar"
|
@click="openEditAvatar"
|
||||||
>
|
>
|
||||||
<el-icon><EditPen /></el-icon>
|
<el-icon><EditPen /></el-icon>
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
</div>
|
</div>
|
||||||
<h4>
|
<h4>
|
||||||
{{
|
{{
|
||||||
applicationForm?.name || $t('views.application.applicationForm.form.appName.label')
|
applicationForm?.name || $t('views.application.form.appName.label')
|
||||||
}}
|
}}
|
||||||
</h4>
|
</h4>
|
||||||
</div>
|
</div>
|
||||||
@ -518,7 +518,7 @@ const {
|
|||||||
params: { id }
|
params: { id }
|
||||||
} = route as any
|
} = route as any
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
const defaultPrompt = t('views.application.applicationForm.form.prompt.defaultPrompt', {
|
const defaultPrompt = t('views.application.form.prompt.defaultPrompt', {
|
||||||
data: '{data}',
|
data: '{data}',
|
||||||
question: '{question}'
|
question: '{question}'
|
||||||
})
|
})
|
||||||
@ -546,7 +546,7 @@ const applicationForm = ref<ApplicationFormType>({
|
|||||||
desc: '',
|
desc: '',
|
||||||
model_id: '',
|
model_id: '',
|
||||||
dialogue_number: 1,
|
dialogue_number: 1,
|
||||||
prologue: t('views.application.applicationForm.form.defaultPrologue'),
|
prologue: t('views.application.form.defaultPrologue'),
|
||||||
dataset_id_list: [],
|
dataset_id_list: [],
|
||||||
dataset_setting: {
|
dataset_setting: {
|
||||||
top_n: 3,
|
top_n: 3,
|
||||||
@ -560,7 +560,7 @@ const applicationForm = ref<ApplicationFormType>({
|
|||||||
},
|
},
|
||||||
model_setting: {
|
model_setting: {
|
||||||
prompt: defaultPrompt,
|
prompt: defaultPrompt,
|
||||||
system: t('views.application.applicationForm.form.roleSettings.placeholder'),
|
system: t('views.application.form.roleSettings.placeholder'),
|
||||||
no_references_prompt: '{question}',
|
no_references_prompt: '{question}',
|
||||||
reasoning_content_enable: false
|
reasoning_content_enable: false
|
||||||
},
|
},
|
||||||
@ -579,7 +579,7 @@ const rules = reactive<FormRules<ApplicationFormType>>({
|
|||||||
name: [
|
name: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: t('views.application.applicationForm.form.appName.placeholder'),
|
message: t('views.application.form.appName.placeholder'),
|
||||||
trigger: 'blur'
|
trigger: 'blur'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@ -14,19 +14,19 @@
|
|||||||
label-position="top"
|
label-position="top"
|
||||||
require-asterisk-position="right"
|
require-asterisk-position="right"
|
||||||
>
|
>
|
||||||
<el-form-item :label="$t('views.application.applicationForm.form.appName.label')" prop="name">
|
<el-form-item :label="$t('views.application.form.appName.label')" prop="name">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="applicationForm.name"
|
v-model="applicationForm.name"
|
||||||
maxlength="64"
|
maxlength="64"
|
||||||
:placeholder="$t('views.application.applicationForm.form.appName.placeholder')"
|
:placeholder="$t('views.application.form.appName.placeholder')"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('views.application.applicationForm.form.appDescription.label')">
|
<el-form-item :label="$t('views.application.form.appDescription.label')">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="applicationForm.desc"
|
v-model="applicationForm.desc"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
:placeholder="$t('views.application.applicationForm.form.appDescription.placeholder')"
|
:placeholder="$t('views.application.form.appDescription.placeholder')"
|
||||||
:rows="3"
|
:rows="3"
|
||||||
maxlength="256"
|
maxlength="256"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
@ -61,7 +61,7 @@ const router = useRouter()
|
|||||||
const { common, user } = useStore()
|
const { common, user } = useStore()
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
const defaultPrompt = t('views.application.applicationForm.form.prompt.defaultPrompt', {
|
const defaultPrompt = t('views.application.form.prompt.defaultPrompt', {
|
||||||
data: '{data}',
|
data: '{data}',
|
||||||
question: '{question}'
|
question: '{question}'
|
||||||
})
|
})
|
||||||
@ -75,7 +75,7 @@ const applicationForm = ref<ApplicationFormType>({
|
|||||||
desc: '',
|
desc: '',
|
||||||
model_id: '',
|
model_id: '',
|
||||||
dialogue_number: 0,
|
dialogue_number: 0,
|
||||||
prologue: t('views.application.applicationForm.form.defaultPrologue'),
|
prologue: t('views.application.form.defaultPrologue'),
|
||||||
dataset_id_list: [],
|
dataset_id_list: [],
|
||||||
dataset_setting: {
|
dataset_setting: {
|
||||||
top_n: 3,
|
top_n: 3,
|
||||||
@ -98,7 +98,7 @@ const rules = reactive<FormRules<ApplicationFormType>>({
|
|||||||
name: [
|
name: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: t('views.application.applicationForm.form.appName.placeholder'),
|
message: t('views.application.form.appName.placeholder'),
|
||||||
trigger: 'blur'
|
trigger: 'blur'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -111,7 +111,7 @@ watch(dialogVisible, (bool) => {
|
|||||||
desc: '',
|
desc: '',
|
||||||
model_id: '',
|
model_id: '',
|
||||||
dialogue_number: 0,
|
dialogue_number: 0,
|
||||||
prologue: t('views.application.applicationForm.form.defaultPrologue'),
|
prologue: t('views.application.form.defaultPrologue'),
|
||||||
dataset_id_list: [],
|
dataset_id_list: [],
|
||||||
dataset_setting: {
|
dataset_setting: {
|
||||||
top_n: 3,
|
top_n: 3,
|
||||||
|
|||||||
@ -160,7 +160,7 @@
|
|||||||
<template #label>
|
<template #label>
|
||||||
<div class="flex align-center">
|
<div class="flex align-center">
|
||||||
<span class="mr-4">{{
|
<span class="mr-4">{{
|
||||||
$t('views.application.applicationForm.form.problemOptimization.label')
|
$t('views.application.form.problemOptimization.label')
|
||||||
}}</span>
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -168,7 +168,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-if="form.problem_optimization"
|
v-if="form.problem_optimization"
|
||||||
:label="$t('views.application.applicationForm.form.prompt.label')"
|
:label="$t('views.application.form.prompt.label')"
|
||||||
>
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.problem_optimization_prompt"
|
v-model="form.problem_optimization_prompt"
|
||||||
@ -239,14 +239,14 @@ const noReferencesRules = reactive<FormRules<any>>({
|
|||||||
ai_questioning: [
|
ai_questioning: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: t('views.application.applicationForm.form.aiModel.placeholder'),
|
message: t('views.application.form.aiModel.placeholder'),
|
||||||
trigger: 'blur'
|
trigger: 'blur'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
designated_answer: [
|
designated_answer: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: t('views.application.applicationForm.form.prompt.requiredMessage'),
|
message: t('views.application.form.prompt.requiredMessage'),
|
||||||
trigger: 'blur'
|
trigger: 'blur'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@ -11,12 +11,12 @@
|
|||||||
>
|
>
|
||||||
<el-form label-position="top" ref="paramFormRef" :model="form" class="p-12-16">
|
<el-form label-position="top" ref="paramFormRef" :model="form" class="p-12-16">
|
||||||
<el-text type="info" class="color-secondary">{{
|
<el-text type="info" class="color-secondary">{{
|
||||||
$t('views.application.applicationForm.form.reasoningContent.tooltip')
|
$t('views.application.form.reasoningContent.tooltip')
|
||||||
}}</el-text>
|
}}</el-text>
|
||||||
<el-row class="mt-16" :gutter="20">
|
<el-row class="mt-16" :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:label="$t('views.application.applicationForm.form.reasoningContent.start')"
|
:label="$t('views.application.form.reasoningContent.start')"
|
||||||
>
|
>
|
||||||
<el-input
|
<el-input
|
||||||
type="textarea"
|
type="textarea"
|
||||||
@ -28,7 +28,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item :label="$t('views.application.applicationForm.form.reasoningContent.end')">
|
<el-form-item :label="$t('views.application.form.reasoningContent.end')">
|
||||||
<el-input
|
<el-input
|
||||||
type="textarea"
|
type="textarea"
|
||||||
v-model="form.reasoning_content_end"
|
v-model="form.reasoning_content_end"
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<div class="flex-between">
|
<div class="flex-between">
|
||||||
<el-button @click="testPlay" :loading="playLoading">
|
<el-button @click="testPlay" :loading="playLoading">
|
||||||
<AppIcon iconName="app-video-play" class="mr-4"></AppIcon>
|
<AppIcon iconName="app-video-play" class="mr-4"></AppIcon>
|
||||||
{{ $t('views.application.applicationForm.form.voicePlay.listeningTest') }}
|
{{ $t('views.application.form.voicePlay.listeningTest') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
|
|||||||
@ -2,15 +2,15 @@
|
|||||||
<div class="chat-pc__header" :style="customStyle">
|
<div class="chat-pc__header" :style="customStyle">
|
||||||
<div class="flex align-center">
|
<div class="flex align-center">
|
||||||
<div class="mr-12 ml-24 flex">
|
<div class="mr-12 ml-24 flex">
|
||||||
<AppAvatar
|
<el-avatar
|
||||||
v-if="isAppIcon(application_profile?.icon)"
|
v-if="isAppIcon(application_profile?.icon)"
|
||||||
shape="square"
|
shape="square"
|
||||||
:size="32"
|
:size="32"
|
||||||
style="background: none"
|
style="background: none"
|
||||||
>
|
>
|
||||||
<img :src="application_profile?.icon" alt="" />
|
<img :src="application_profile?.icon" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
<AppAvatar
|
<el-avatar
|
||||||
v-else-if="application_profile?.name"
|
v-else-if="application_profile?.name"
|
||||||
:name="application_profile?.name"
|
:name="application_profile?.name"
|
||||||
pinyinColor
|
pinyinColor
|
||||||
|
|||||||
@ -3,15 +3,15 @@
|
|||||||
<div class="chat__header" :class="!isDefaultTheme ? 'custom-header' : ''">
|
<div class="chat__header" :class="!isDefaultTheme ? 'custom-header' : ''">
|
||||||
<div class="chat-width flex align-center">
|
<div class="chat-width flex align-center">
|
||||||
<div class="mr-12 ml-24 flex">
|
<div class="mr-12 ml-24 flex">
|
||||||
<AppAvatar
|
<el-avatar
|
||||||
v-if="isAppIcon(applicationDetail?.icon)"
|
v-if="isAppIcon(applicationDetail?.icon)"
|
||||||
shape="square"
|
shape="square"
|
||||||
:size="32"
|
:size="32"
|
||||||
style="background: none"
|
style="background: none"
|
||||||
>
|
>
|
||||||
<img :src="applicationDetail?.icon" alt="" />
|
<img :src="applicationDetail?.icon" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
<AppAvatar
|
<el-avatar
|
||||||
v-else-if="applicationDetail?.name"
|
v-else-if="applicationDetail?.name"
|
||||||
:name="applicationDetail?.name"
|
:name="applicationDetail?.name"
|
||||||
pinyinColor
|
pinyinColor
|
||||||
|
|||||||
@ -11,15 +11,15 @@
|
|||||||
<div class="chat-embed__header" :style="customStyle">
|
<div class="chat-embed__header" :style="customStyle">
|
||||||
<div class="flex align-center">
|
<div class="flex align-center">
|
||||||
<div class="mr-12 ml-24 flex">
|
<div class="mr-12 ml-24 flex">
|
||||||
<AppAvatar
|
<el-avatar
|
||||||
v-if="isAppIcon(applicationDetail?.icon)"
|
v-if="isAppIcon(applicationDetail?.icon)"
|
||||||
shape="square"
|
shape="square"
|
||||||
:size="32"
|
:size="32"
|
||||||
style="background: none"
|
style="background: none"
|
||||||
>
|
>
|
||||||
<img :src="applicationDetail?.icon" alt="" />
|
<img :src="applicationDetail?.icon" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
<AppAvatar
|
<el-avatar
|
||||||
v-else-if="applicationDetail?.name"
|
v-else-if="applicationDetail?.name"
|
||||||
:name="applicationDetail?.name"
|
:name="applicationDetail?.name"
|
||||||
pinyinColor
|
pinyinColor
|
||||||
|
|||||||
@ -10,15 +10,15 @@
|
|||||||
<div class="chat-embed__header" :style="customStyle">
|
<div class="chat-embed__header" :style="customStyle">
|
||||||
<div class="flex align-center">
|
<div class="flex align-center">
|
||||||
<div class="mr-12 ml-24 flex">
|
<div class="mr-12 ml-24 flex">
|
||||||
<AppAvatar
|
<el-avatar
|
||||||
v-if="isAppIcon(applicationDetail?.icon)"
|
v-if="isAppIcon(applicationDetail?.icon)"
|
||||||
shape="square"
|
shape="square"
|
||||||
:size="32"
|
:size="32"
|
||||||
style="background: none"
|
style="background: none"
|
||||||
>
|
>
|
||||||
<img :src="applicationDetail?.icon" alt="" />
|
<img :src="applicationDetail?.icon" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
<AppAvatar
|
<el-avatar
|
||||||
v-else-if="applicationDetail?.name"
|
v-else-if="applicationDetail?.name"
|
||||||
:name="applicationDetail?.name"
|
:name="applicationDetail?.name"
|
||||||
pinyinColor
|
pinyinColor
|
||||||
|
|||||||
@ -11,15 +11,15 @@
|
|||||||
<div class="chat-pc__header" :style="customStyle">
|
<div class="chat-pc__header" :style="customStyle">
|
||||||
<div class="flex align-center">
|
<div class="flex align-center">
|
||||||
<div class="mr-12 ml-24 flex">
|
<div class="mr-12 ml-24 flex">
|
||||||
<AppAvatar
|
<el-avatar
|
||||||
v-if="isAppIcon(applicationDetail?.icon)"
|
v-if="isAppIcon(applicationDetail?.icon)"
|
||||||
shape="square"
|
shape="square"
|
||||||
:size="32"
|
:size="32"
|
||||||
style="background: none"
|
style="background: none"
|
||||||
>
|
>
|
||||||
<img :src="applicationDetail?.icon" alt="" />
|
<img :src="applicationDetail?.icon" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
<AppAvatar
|
<el-avatar
|
||||||
v-else-if="applicationDetail?.name"
|
v-else-if="applicationDetail?.name"
|
||||||
:name="applicationDetail?.name"
|
:name="applicationDetail?.name"
|
||||||
pinyinColor
|
pinyinColor
|
||||||
|
|||||||
@ -97,7 +97,7 @@ import { useRoute } from 'vue-router'
|
|||||||
import type { FormInstance } from 'element-plus'
|
import type { FormInstance } from 'element-plus'
|
||||||
import documentApi from '@/api/knowledge/document'
|
import documentApi from '@/api/knowledge/document'
|
||||||
import { MsgSuccess } from '@/utils/message'
|
import { MsgSuccess } from '@/utils/message'
|
||||||
// import { hitHandlingMethod } from '@/enums/document'
|
import { hitHandlingMethod } from '@/enums/document'
|
||||||
import { t } from '@/locales'
|
import { t } from '@/locales'
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const {
|
const {
|
||||||
|
|||||||
@ -24,23 +24,23 @@
|
|||||||
<el-card shadow="never" :class="item.id === selectDataset ? 'active' : ''">
|
<el-card shadow="never" :class="item.id === selectDataset ? 'active' : ''">
|
||||||
<el-radio :value="item.id" size="large">
|
<el-radio :value="item.id" size="large">
|
||||||
<div class="flex align-center">
|
<div class="flex align-center">
|
||||||
<AppAvatar
|
<el-avatar
|
||||||
v-if="item?.type === '0'"
|
v-if="item?.type === '0'"
|
||||||
class="mr-8 avatar-blue"
|
class="mr-8 avatar-blue"
|
||||||
shape="square"
|
shape="square"
|
||||||
:size="32"
|
:size="32"
|
||||||
>
|
>
|
||||||
<img src="@/assets/knowledge/icon_document.svg" style="width: 58%" alt="" />
|
<img src="@/assets/knowledge/icon_document.svg" style="width: 58%" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
<AppAvatar
|
<el-avatar
|
||||||
v-if="item?.type === '1'"
|
v-if="item?.type === '1'"
|
||||||
class="mr-8 avatar-purple"
|
class="mr-8 avatar-purple"
|
||||||
shape="square"
|
shape="square"
|
||||||
:size="32"
|
:size="32"
|
||||||
>
|
>
|
||||||
<img src="@/assets/knowledge/icon_web.svg" style="width: 58%" alt="" />
|
<img src="@/assets/knowledge/icon_web.svg" style="width: 58%" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
<AppAvatar
|
<el-avatar
|
||||||
v-if="item?.type === '2'"
|
v-if="item?.type === '2'"
|
||||||
class="mr-8 avatar-purple"
|
class="mr-8 avatar-purple"
|
||||||
shape="square"
|
shape="square"
|
||||||
@ -48,7 +48,7 @@
|
|||||||
style="background: none"
|
style="background: none"
|
||||||
>
|
>
|
||||||
<img src="@/assets/knowledge/logo_lark.svg" style="width: 100%" alt="" />
|
<img src="@/assets/knowledge/logo_lark.svg" style="width: 100%" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
<span class="ellipsis" :title="item.name">
|
<span class="ellipsis" :title="item.name">
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@ -71,9 +71,9 @@ const startedMap = {
|
|||||||
[TaskType.SYNC]: t('views.document.fileStatus.SYNC')
|
[TaskType.SYNC]: t('views.document.fileStatus.SYNC')
|
||||||
}
|
}
|
||||||
const taskTypeMap = {
|
const taskTypeMap = {
|
||||||
[TaskType.EMBEDDING]: t('views.dataset.setting.vectorization'),
|
[TaskType.EMBEDDING]: t('views.knowledge.setting.vectorization'),
|
||||||
[TaskType.GENERATE_PROBLEM]: t('views.document.generateQuestion.title'),
|
[TaskType.GENERATE_PROBLEM]: t('views.document.generateQuestion.title'),
|
||||||
[TaskType.SYNC]: t('views.dataset.setting.sync')
|
[TaskType.SYNC]: t('views.knowledge.setting.sync')
|
||||||
}
|
}
|
||||||
const stateMap: any = {
|
const stateMap: any = {
|
||||||
[State.PENDING]: (type: number) => t('views.document.fileStatus.PENDING'),
|
[State.PENDING]: (type: number) => t('views.document.fileStatus.PENDING'),
|
||||||
|
|||||||
@ -542,7 +542,7 @@ import { hitHandlingMethod } from '@/enums/document'
|
|||||||
import { MsgSuccess, MsgConfirm, MsgError } from '@/utils/message'
|
import { MsgSuccess, MsgConfirm, MsgError } from '@/utils/message'
|
||||||
import useStore from '@/stores'
|
import useStore from '@/stores'
|
||||||
import StatusValue from '@/views/document/component/Status.vue'
|
import StatusValue from '@/views/document/component/Status.vue'
|
||||||
// import GenerateRelatedDialog from '@/components/generate-related-dialog/index.vue'
|
import GenerateRelatedDialog from '@/components/generate-related-dialog/index.vue'
|
||||||
import EmbeddingContentDialog from '@/views/document/component/EmbeddingContentDialog.vue'
|
import EmbeddingContentDialog from '@/views/document/component/EmbeddingContentDialog.vue'
|
||||||
import { TaskType, State } from '@/utils/status'
|
import { TaskType, State } from '@/utils/status'
|
||||||
import { t } from '@/locales'
|
import { t } from '@/locales'
|
||||||
|
|||||||
@ -10,9 +10,9 @@
|
|||||||
<div class="hit-test__main p-16" v-loading="loading">
|
<div class="hit-test__main p-16" v-loading="loading">
|
||||||
<div class="question-title" :style="{ visibility: questionTitle ? 'visible' : 'hidden' }">
|
<div class="question-title" :style="{ visibility: questionTitle ? 'visible' : 'hidden' }">
|
||||||
<div class="avatar">
|
<div class="avatar">
|
||||||
<AppAvatar>
|
<el-avatar>
|
||||||
<img src="@/assets/user-icon.svg" style="width: 54%" alt="" />
|
<img src="@/assets/user-icon.svg" style="width: 54%" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<h4 class="text break-all">{{ questionTitle }}</h4>
|
<h4 class="text break-all">{{ questionTitle }}</h4>
|
||||||
@ -54,8 +54,8 @@
|
|||||||
@click="editParagraph(item)"
|
@click="editParagraph(item)"
|
||||||
>
|
>
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<AppAvatar class="mr-12 avatar-light" :size="22">
|
<el-avatar class="mr-12 avatar-light" :size="22">
|
||||||
{{ index + 1 + '' }}</AppAvatar
|
{{ index + 1 + '' }}</el-avatar
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
<div class="active-button primary">{{ item.similarity?.toFixed(3) }}</div>
|
<div class="active-button primary">{{ item.similarity?.toFixed(3) }}</div>
|
||||||
|
|||||||
@ -1,29 +1,29 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:title="$t('views.dataset.syncWeb.title')"
|
:title="$t('views.knowledge.syncWeb.title')"
|
||||||
v-model="dialogVisible"
|
v-model="dialogVisible"
|
||||||
width="600px"
|
width="600px"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
:close-on-press-escape="false"
|
:close-on-press-escape="false"
|
||||||
:destroy-on-close="true"
|
:destroy-on-close="true"
|
||||||
>
|
>
|
||||||
<p class="mb-8">{{ $t('views.dataset.syncWeb.syncMethod') }}</p>
|
<p class="mb-8">{{ $t('views.knowledge.syncWeb.syncMethod') }}</p>
|
||||||
<el-radio-group v-model="method" class="card__radio">
|
<el-radio-group v-model="method" class="card__radio">
|
||||||
<el-card shadow="never" class="mb-16" :class="method === 'replace' ? 'active' : ''">
|
<el-card shadow="never" class="mb-16" :class="method === 'replace' ? 'active' : ''">
|
||||||
<el-radio value="replace" size="large">
|
<el-radio value="replace" size="large">
|
||||||
<p class="mb-4">{{ $t('views.dataset.syncWeb.replace') }}</p>
|
<p class="mb-4">{{ $t('views.knowledge.syncWeb.replace') }}</p>
|
||||||
<el-text type="info">{{ $t('views.dataset.syncWeb.replaceText') }}</el-text>
|
<el-text type="info">{{ $t('views.knowledge.syncWeb.replaceText') }}</el-text>
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-card shadow="never" class="mb-16" :class="method === 'complete' ? 'active' : ''">
|
<el-card shadow="never" class="mb-16" :class="method === 'complete' ? 'active' : ''">
|
||||||
<el-radio value="complete" size="large">
|
<el-radio value="complete" size="large">
|
||||||
<p class="mb-4">{{ $t('views.dataset.syncWeb.complete') }}</p>
|
<p class="mb-4">{{ $t('views.knowledge.syncWeb.complete') }}</p>
|
||||||
<el-text type="info">{{ $t('views.dataset.syncWeb.completeText') }}</el-text>
|
<el-text type="info">{{ $t('views.knowledge.syncWeb.completeText') }}</el-text>
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
<p class="danger">{{ $t('views.dataset.syncWeb.tip') }}</p>
|
<p class="danger">{{ $t('views.knowledge.syncWeb.tip') }}</p>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button @click.prevent="dialogVisible = false"> {{ $t('common.cancel') }} </el-button>
|
<el-button @click.prevent="dialogVisible = false"> {{ $t('common.cancel') }} </el-button>
|
||||||
|
|||||||
@ -24,15 +24,15 @@
|
|||||||
>
|
>
|
||||||
<el-option v-for="item in datasetList" :key="item.id" :label="item.name" :value="item.id">
|
<el-option v-for="item in datasetList" :key="item.id" :label="item.name" :value="item.id">
|
||||||
<span class="flex align-center">
|
<span class="flex align-center">
|
||||||
<AppAvatar
|
<el-avatar
|
||||||
v-if="!item.dataset_id && item.type === '1'"
|
v-if="!item.dataset_id && item.type === '1'"
|
||||||
class="mr-12 avatar-purple"
|
class="mr-12 avatar-purple"
|
||||||
shape="square"
|
shape="square"
|
||||||
:size="24"
|
:size="24"
|
||||||
>
|
>
|
||||||
<img src="@/assets/knowledge/icon_web.svg" style="width: 58%" alt="" />
|
<img src="@/assets/knowledge/icon_web.svg" style="width: 58%" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
<AppAvatar
|
<el-avatar
|
||||||
v-else-if="!item.dataset_id && item.type === '2'"
|
v-else-if="!item.dataset_id && item.type === '2'"
|
||||||
class="mr-12 avatar-purple"
|
class="mr-12 avatar-purple"
|
||||||
shape="square"
|
shape="square"
|
||||||
@ -40,15 +40,15 @@
|
|||||||
style="background: none"
|
style="background: none"
|
||||||
>
|
>
|
||||||
<img src="@/assets/knowledge/logo_lark.svg" style="width: 100%" alt="" />
|
<img src="@/assets/knowledge/logo_lark.svg" style="width: 100%" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
<AppAvatar
|
<el-avatar
|
||||||
v-else-if="!item.dataset_id && item.type === '0'"
|
v-else-if="!item.dataset_id && item.type === '0'"
|
||||||
class="mr-12 avatar-blue"
|
class="mr-12 avatar-blue"
|
||||||
shape="square"
|
shape="square"
|
||||||
:size="24"
|
:size="24"
|
||||||
>
|
>
|
||||||
<img src="@/assets/knowledge/icon_document.svg" style="width: 58%" alt="" />
|
<img src="@/assets/knowledge/icon_document.svg" style="width: 58%" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</span>
|
</span>
|
||||||
</el-option>
|
</el-option>
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
<el-radio-group v-model="radioType" class="radio-block mb-16">
|
<el-radio-group v-model="radioType" class="radio-block mb-16">
|
||||||
<el-radio value="default">
|
<el-radio value="default">
|
||||||
<p>{{ $t('common.EditAvatarDialog.default') }}</p>
|
<p>{{ $t('common.EditAvatarDialog.default') }}</p>
|
||||||
<AppAvatar
|
<el-avatar
|
||||||
v-if="detail?.name"
|
v-if="detail?.name"
|
||||||
:name="detail?.name"
|
:name="detail?.name"
|
||||||
pinyinColor
|
pinyinColor
|
||||||
@ -22,7 +22,7 @@
|
|||||||
<el-radio value="custom">
|
<el-radio value="custom">
|
||||||
<p>{{ $t('common.EditAvatarDialog.customizeUpload') }}</p>
|
<p>{{ $t('common.EditAvatarDialog.customizeUpload') }}</p>
|
||||||
<div class="flex mt-8">
|
<div class="flex mt-8">
|
||||||
<AppAvatar
|
<el-avatar
|
||||||
v-if="fileURL"
|
v-if="fileURL"
|
||||||
shape="square"
|
shape="square"
|
||||||
:size="32"
|
:size="32"
|
||||||
@ -30,7 +30,7 @@
|
|||||||
class="mr-16"
|
class="mr-16"
|
||||||
>
|
>
|
||||||
<img :src="fileURL" alt="" />
|
<img :src="fileURL" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
<el-upload
|
<el-upload
|
||||||
ref="uploadRef"
|
ref="uploadRef"
|
||||||
action="#"
|
action="#"
|
||||||
|
|||||||
@ -15,7 +15,7 @@
|
|||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<div class="flex-between">
|
<div class="flex-between">
|
||||||
<div class="title flex align-center">
|
<div class="title flex align-center">
|
||||||
<AppAvatar
|
<el-avatar
|
||||||
v-if="isAppIcon(functionDetail?.icon)"
|
v-if="isAppIcon(functionDetail?.icon)"
|
||||||
shape="square"
|
shape="square"
|
||||||
:size="64"
|
:size="64"
|
||||||
@ -23,8 +23,8 @@
|
|||||||
class="mr-8"
|
class="mr-8"
|
||||||
>
|
>
|
||||||
<img :src="functionDetail?.icon" alt="" />
|
<img :src="functionDetail?.icon" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
<AppAvatar
|
<el-avatar
|
||||||
v-else-if="functionDetail?.name"
|
v-else-if="functionDetail?.name"
|
||||||
:name="functionDetail?.name"
|
:name="functionDetail?.name"
|
||||||
pinyinColor
|
pinyinColor
|
||||||
|
|||||||
@ -19,7 +19,7 @@ export const startNode = {
|
|||||||
globalFields: [
|
globalFields: [
|
||||||
{ label: t('views.applicationWorkflow.nodes.startNode.currentTime'), value: 'time' },
|
{ label: t('views.applicationWorkflow.nodes.startNode.currentTime'), value: 'time' },
|
||||||
{
|
{
|
||||||
label: t('views.application.applicationForm.form.historyRecord.label'),
|
label: t('views.application.form.historyRecord.label'),
|
||||||
value: 'history_context'
|
value: 'history_context'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -49,7 +49,7 @@ export const baseNode = {
|
|||||||
name: '',
|
name: '',
|
||||||
desc: '',
|
desc: '',
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
prologue: t('views.application.applicationForm.form.defaultPrologue'),
|
prologue: t('views.application.form.defaultPrologue'),
|
||||||
tts_type: 'BROWSER'
|
tts_type: 'BROWSER'
|
||||||
},
|
},
|
||||||
config: {},
|
config: {},
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<AppAvatar class="avatar-gradient" shape="square">
|
<el-avatar class="avatar-gradient" shape="square">
|
||||||
<img src="@/assets/icon_robot.svg" style="width: 75%" alt="" />
|
<img src="@/assets/icon_robot.svg" style="width: 75%" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts"></script>
|
<script setup lang="ts"></script>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<AppAvatar
|
<el-avatar
|
||||||
v-if="isAppIcon(item?.icon)"
|
v-if="isAppIcon(item?.icon)"
|
||||||
shape="square"
|
shape="square"
|
||||||
:size="32"
|
:size="32"
|
||||||
@ -7,8 +7,8 @@
|
|||||||
class="mr-8"
|
class="mr-8"
|
||||||
>
|
>
|
||||||
<img :src="item?.icon" alt="" />
|
<img :src="item?.icon" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
<AppAvatar
|
<el-avatar
|
||||||
v-else-if="item?.name"
|
v-else-if="item?.name"
|
||||||
:name="item?.name"
|
:name="item?.name"
|
||||||
pinyinColor
|
pinyinColor
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<AppAvatar shape="square" style="background: #FF8800;">
|
<el-avatar shape="square" style="background: #FF8800;">
|
||||||
<img src="@/assets/icon_hi.svg" style="width: 75%" alt="" />
|
<img src="@/assets/icon_hi.svg" style="width: 75%" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts"></script>
|
<script setup lang="ts"></script>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<AppAvatar shape="square" style="background: #14C0FF;">
|
<el-avatar shape="square" style="background: #14C0FF;">
|
||||||
<img src="@/assets/icon_condition.svg" style="width: 75%" alt="" />
|
<img src="@/assets/icon_condition.svg" style="width: 75%" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts"></script>
|
<script setup lang="ts"></script>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<AppAvatar shape="square" class="avatar-blue">
|
<el-avatar shape="square" class="avatar-blue">
|
||||||
<img src="@/assets/icon_docs.svg" style="width: 65%" alt="" />
|
<img src="@/assets/icon_docs.svg" style="width: 65%" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts"></script>
|
<script setup lang="ts"></script>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<AppAvatar shape="square" style="background: #34c724">
|
<el-avatar shape="square" style="background: #34c724">
|
||||||
<img src="@/assets/icon_form.svg" style="width: 75%" alt="" />
|
<img src="@/assets/icon_form.svg" style="width: 75%" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts"></script>
|
<script setup lang="ts"></script>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<AppAvatar
|
<el-avatar
|
||||||
v-if="isAppIcon(item?.icon)"
|
v-if="isAppIcon(item?.icon)"
|
||||||
shape="square"
|
shape="square"
|
||||||
:size="32"
|
:size="32"
|
||||||
@ -7,10 +7,10 @@
|
|||||||
class="mr-8"
|
class="mr-8"
|
||||||
>
|
>
|
||||||
<img :src="item?.icon" alt="" />
|
<img :src="item?.icon" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
<AppAvatar v-else shape="square" style="background: #34c724">
|
<el-avatar v-else shape="square" style="background: #34c724">
|
||||||
<img src="@/assets/icon_function_outlined.svg" style="width: 75%" alt="" />
|
<img src="@/assets/icon_function_outlined.svg" style="width: 75%" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { isAppIcon } from '@/utils/common'
|
import { isAppIcon } from '@/utils/common'
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<AppAvatar shape="square" style="background: #34c724">
|
<el-avatar shape="square" style="background: #34c724">
|
||||||
<img src="@/assets/icon_function_outlined.svg" style="width: 75%" alt="" />
|
<img src="@/assets/icon_function_outlined.svg" style="width: 75%" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts"></script>
|
<script setup lang="ts"></script>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<AppAvatar shape="square" style="background: #FF8800;">
|
<el-avatar shape="square" style="background: #FF8800;">
|
||||||
<img src="@/assets/icon_text-image.svg" style="width: 65%" alt="" />
|
<img src="@/assets/icon_text-image.svg" style="width: 65%" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts"></script>
|
<script setup lang="ts"></script>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<AppAvatar shape="square" style="background: #14C0FF;">
|
<el-avatar shape="square" style="background: #14C0FF;">
|
||||||
<img src="@/assets/icon_image.svg" style="width: 65%" alt="" />
|
<img src="@/assets/icon_image.svg" style="width: 65%" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts"></script>
|
<script setup lang="ts"></script>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<AppAvatar shape="square" style="background: #34c724">
|
<el-avatar shape="square" style="background: #34c724">
|
||||||
<img src="@/assets/icon_mcp.svg" style="width: 65%" alt="" />
|
<img src="@/assets/icon_mcp.svg" style="width: 65%" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts"></script>
|
<script setup lang="ts"></script>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<AppAvatar shape="square" style="background: #34C724">
|
<el-avatar shape="square" style="background: #34C724">
|
||||||
<img src="@/assets/icon_setting.svg" style="width: 65%" alt="" />
|
<img src="@/assets/icon_setting.svg" style="width: 65%" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts"></script>
|
<script setup lang="ts"></script>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<AppAvatar shape="square" style="background: #FF8800">
|
<el-avatar shape="square" style="background: #FF8800">
|
||||||
<img src="@/assets/icon_reply.svg" style="width: 65%" alt="" />
|
<img src="@/assets/icon_reply.svg" style="width: 65%" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts"></script>
|
<script setup lang="ts"></script>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<AppAvatar shape="square" style="background: #7F3BF5">
|
<el-avatar shape="square" style="background: #7F3BF5">
|
||||||
<img src="@/assets/icon_reranker.svg" style="width: 65%" alt="" />
|
<img src="@/assets/icon_reranker.svg" style="width: 65%" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts"></script>
|
<script setup lang="ts"></script>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<AppAvatar shape="square" class="avatar-blue">
|
<el-avatar shape="square" class="avatar-blue">
|
||||||
<img src="@/assets/icon_document.svg" style="width: 58%" alt="" />
|
<img src="@/assets/icon_document.svg" style="width: 58%" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts"></script>
|
<script setup lang="ts"></script>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<AppAvatar shape="square" style="background: #ff8800">
|
<el-avatar shape="square" style="background: #ff8800">
|
||||||
<img src="@/assets/icon_speech_to_text.svg" style="width: 100%" alt="" />
|
<img src="@/assets/icon_speech_to_text.svg" style="width: 100%" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts"></script>
|
<script setup lang="ts"></script>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<AppAvatar shape="square" style="background: #D136D1;">
|
<el-avatar shape="square" style="background: #D136D1;">
|
||||||
<img src="@/assets/icon_start.svg" style="width: 75%" alt="" />
|
<img src="@/assets/icon_start.svg" style="width: 75%" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts"></script>
|
<script setup lang="ts"></script>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<AppAvatar shape="square" style="background: #14c0ff">
|
<el-avatar shape="square" style="background: #14c0ff">
|
||||||
<img src="@/assets/icon_text_to_speech.svg" style="width: 100%" alt="" />
|
<img src="@/assets/icon_text_to_speech.svg" style="width: 100%" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts"></script>
|
<script setup lang="ts"></script>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<AppAvatar shape="square" class="avatar-blue">
|
<el-avatar shape="square" class="avatar-blue">
|
||||||
<img src="@/assets/icon_assigner.svg" style="width: 65%" alt="" />
|
<img src="@/assets/icon_assigner.svg" style="width: 65%" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts"></script>
|
<script setup lang="ts"></script>
|
||||||
|
|||||||
@ -12,11 +12,11 @@
|
|||||||
hide-required-asterisk
|
hide-required-asterisk
|
||||||
>
|
>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:label="$t('views.application.applicationForm.form.aiModel.label')"
|
:label="$t('views.application.form.aiModel.label')"
|
||||||
prop="model_id"
|
prop="model_id"
|
||||||
:rules="{
|
:rules="{
|
||||||
required: true,
|
required: true,
|
||||||
message: $t('views.application.applicationForm.form.aiModel.placeholder'),
|
message: $t('views.application.form.aiModel.placeholder'),
|
||||||
trigger: 'change'
|
trigger: 'change'
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
@ -24,7 +24,7 @@
|
|||||||
<div class="flex-between w-full">
|
<div class="flex-between w-full">
|
||||||
<div>
|
<div>
|
||||||
<span
|
<span
|
||||||
>{{ $t('views.application.applicationForm.form.aiModel.label')
|
>{{ $t('views.application.form.aiModel.label')
|
||||||
}}<span class="danger">*</span></span
|
}}<span class="danger">*</span></span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
@ -45,7 +45,7 @@
|
|||||||
@wheel="wheel"
|
@wheel="wheel"
|
||||||
:teleported="false"
|
:teleported="false"
|
||||||
v-model="chat_data.model_id"
|
v-model="chat_data.model_id"
|
||||||
:placeholder="$t('views.application.applicationForm.form.aiModel.placeholder')"
|
:placeholder="$t('views.application.form.aiModel.placeholder')"
|
||||||
:options="modelOptions"
|
:options="modelOptions"
|
||||||
@submitModel="getModel"
|
@submitModel="getModel"
|
||||||
showFooter
|
showFooter
|
||||||
@ -53,21 +53,21 @@
|
|||||||
></ModelSelect>
|
></ModelSelect>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item :label="$t('views.application.applicationForm.form.roleSettings.label')">
|
<el-form-item :label="$t('views.application.form.roleSettings.label')">
|
||||||
<MdEditorMagnify
|
<MdEditorMagnify
|
||||||
:title="$t('views.application.applicationForm.form.roleSettings.label')"
|
:title="$t('views.application.form.roleSettings.label')"
|
||||||
v-model="chat_data.system"
|
v-model="chat_data.system"
|
||||||
style="height: 100px"
|
style="height: 100px"
|
||||||
@submitDialog="submitSystemDialog"
|
@submitDialog="submitSystemDialog"
|
||||||
:placeholder="$t('views.application.applicationForm.form.roleSettings.label')"
|
:placeholder="$t('views.application.form.roleSettings.label')"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:label="$t('views.application.applicationForm.form.prompt.label')"
|
:label="$t('views.application.form.prompt.label')"
|
||||||
prop="prompt"
|
prop="prompt"
|
||||||
:rules="{
|
:rules="{
|
||||||
required: true,
|
required: true,
|
||||||
message: $t('views.application.applicationForm.form.prompt.requiredMessage'),
|
message: $t('views.application.form.prompt.requiredMessage'),
|
||||||
trigger: 'blur'
|
trigger: 'blur'
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
@ -75,13 +75,13 @@
|
|||||||
<div class="flex align-center">
|
<div class="flex align-center">
|
||||||
<div class="mr-4">
|
<div class="mr-4">
|
||||||
<span
|
<span
|
||||||
>{{ $t('views.application.applicationForm.form.prompt.label')
|
>{{ $t('views.application.form.prompt.label')
|
||||||
}}<span class="danger">*</span></span
|
}}<span class="danger">*</span></span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<el-tooltip effect="dark" placement="right" popper-class="max-w-200">
|
<el-tooltip effect="dark" placement="right" popper-class="max-w-200">
|
||||||
<template #content
|
<template #content
|
||||||
>{{ $t('views.application.applicationForm.form.prompt.tooltip') }}
|
>{{ $t('views.application.form.prompt.tooltip') }}
|
||||||
</template>
|
</template>
|
||||||
<AppIcon iconName="app-warning" class="app-warning-icon"></AppIcon>
|
<AppIcon iconName="app-warning" class="app-warning-icon"></AppIcon>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
@ -89,16 +89,16 @@
|
|||||||
</template>
|
</template>
|
||||||
<MdEditorMagnify
|
<MdEditorMagnify
|
||||||
@wheel="wheel"
|
@wheel="wheel"
|
||||||
:title="$t('views.application.applicationForm.form.prompt.label')"
|
:title="$t('views.application.form.prompt.label')"
|
||||||
v-model="chat_data.prompt"
|
v-model="chat_data.prompt"
|
||||||
style="height: 150px"
|
style="height: 150px"
|
||||||
@submitDialog="submitDialog"
|
@submitDialog="submitDialog"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('views.application.applicationForm.form.historyRecord.label')">
|
<el-form-item :label="$t('views.application.form.historyRecord.label')">
|
||||||
<template #label>
|
<template #label>
|
||||||
<div class="flex-between">
|
<div class="flex-between">
|
||||||
<div>{{ $t('views.application.applicationForm.form.historyRecord.label') }}</div>
|
<div>{{ $t('views.application.form.historyRecord.label') }}</div>
|
||||||
<el-select v-model="chat_data.dialogue_type" type="small" style="width: 100px">
|
<el-select v-model="chat_data.dialogue_type" type="small" style="width: 100px">
|
||||||
<el-option :label="$t('views.applicationWorkflow.node')" value="NODE" />
|
<el-option :label="$t('views.applicationWorkflow.node')" value="NODE" />
|
||||||
<el-option :label="$t('views.applicationWorkflow.workflow')" value="WORKFLOW" />
|
<el-option :label="$t('views.applicationWorkflow.workflow')" value="WORKFLOW" />
|
||||||
@ -128,7 +128,7 @@
|
|||||||
<div class="flex-between w-full">
|
<div class="flex-between w-full">
|
||||||
<div>
|
<div>
|
||||||
<span>{{
|
<span>{{
|
||||||
$t('views.application.applicationForm.form.reasoningContent.label')
|
$t('views.application.form.reasoningContent.label')
|
||||||
}}</span>
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
<el-button
|
<el-button
|
||||||
|
|||||||
@ -13,7 +13,7 @@
|
|||||||
:label="$t('views.applicationWorkflow.nodes.baseNode.appName.label')"
|
:label="$t('views.applicationWorkflow.nodes.baseNode.appName.label')"
|
||||||
prop="name"
|
prop="name"
|
||||||
:rules="{
|
:rules="{
|
||||||
message: t('views.application.applicationForm.form.appName.requiredMessage'),
|
message: t('views.application.form.appName.requiredMessage'),
|
||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
required: true
|
required: true
|
||||||
}"
|
}"
|
||||||
@ -21,7 +21,7 @@
|
|||||||
<el-input
|
<el-input
|
||||||
v-model="form_data.name"
|
v-model="form_data.name"
|
||||||
maxlength="64"
|
maxlength="64"
|
||||||
:placeholder="t('views.application.applicationForm.form.appName.placeholder')"
|
:placeholder="t('views.application.form.appName.placeholder')"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
@blur="form_data.name = form_data.name?.trim()"
|
@blur="form_data.name = form_data.name?.trim()"
|
||||||
/>
|
/>
|
||||||
@ -29,17 +29,17 @@
|
|||||||
<el-form-item :label="$t('views.applicationWorkflow.nodes.baseNode.appDescription.label')">
|
<el-form-item :label="$t('views.applicationWorkflow.nodes.baseNode.appDescription.label')">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form_data.desc"
|
v-model="form_data.desc"
|
||||||
:placeholder="$t('views.application.applicationForm.form.appDescription.placeholder')"
|
:placeholder="$t('views.application.form.appDescription.placeholder')"
|
||||||
:rows="3"
|
:rows="3"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
maxlength="256"
|
maxlength="256"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('views.application.applicationForm.form.prologue')">
|
<el-form-item :label="$t('views.application.form.prologue')">
|
||||||
<MdEditorMagnify
|
<MdEditorMagnify
|
||||||
@wheel="wheel"
|
@wheel="wheel"
|
||||||
:title="$t('views.application.applicationForm.form.prologue')"
|
:title="$t('views.application.form.prologue')"
|
||||||
v-model="form_data.prologue"
|
v-model="form_data.prologue"
|
||||||
style="height: 150px"
|
style="height: 150px"
|
||||||
@submitDialog="submitDialog"
|
@submitDialog="submitDialog"
|
||||||
@ -87,11 +87,11 @@
|
|||||||
<template #label>
|
<template #label>
|
||||||
<div class="flex-between">
|
<div class="flex-between">
|
||||||
<span class="mr-4">{{
|
<span class="mr-4">{{
|
||||||
$t('views.application.applicationForm.form.voiceInput.label')
|
$t('views.application.form.voiceInput.label')
|
||||||
}}</span>
|
}}</span>
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<el-checkbox v-if="form_data.stt_model_enable" v-model="form_data.stt_autosend">{{
|
<el-checkbox v-if="form_data.stt_model_enable" v-model="form_data.stt_autosend">{{
|
||||||
$t('views.application.applicationForm.form.voiceInput.autoSend')
|
$t('views.application.form.voiceInput.autoSend')
|
||||||
}}</el-checkbox>
|
}}</el-checkbox>
|
||||||
<el-switch
|
<el-switch
|
||||||
class="ml-8"
|
class="ml-8"
|
||||||
@ -106,7 +106,7 @@
|
|||||||
@wheel="wheel"
|
@wheel="wheel"
|
||||||
v-show="form_data.stt_model_enable"
|
v-show="form_data.stt_model_enable"
|
||||||
v-model="form_data.stt_model_id"
|
v-model="form_data.stt_model_id"
|
||||||
:placeholder="$t('views.application.applicationForm.form.voiceInput.placeholder')"
|
:placeholder="$t('views.application.form.voiceInput.placeholder')"
|
||||||
:options="sttModelOptions"
|
:options="sttModelOptions"
|
||||||
showFooter
|
showFooter
|
||||||
:model-type="'STT'"
|
:model-type="'STT'"
|
||||||
@ -116,11 +116,11 @@
|
|||||||
<template #label>
|
<template #label>
|
||||||
<div class="flex-between">
|
<div class="flex-between">
|
||||||
<span class="mr-4">{{
|
<span class="mr-4">{{
|
||||||
$t('views.application.applicationForm.form.voicePlay.label')
|
$t('views.application.form.voicePlay.label')
|
||||||
}}</span>
|
}}</span>
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<el-checkbox v-if="form_data.tts_model_enable" v-model="form_data.tts_autoplay">{{
|
<el-checkbox v-if="form_data.tts_model_enable" v-model="form_data.tts_autoplay">{{
|
||||||
$t('views.application.applicationForm.form.voicePlay.autoPlay')
|
$t('views.application.form.voicePlay.autoPlay')
|
||||||
}}</el-checkbox>
|
}}</el-checkbox>
|
||||||
<el-switch
|
<el-switch
|
||||||
class="ml-8"
|
class="ml-8"
|
||||||
@ -134,11 +134,11 @@
|
|||||||
<div class="w-full">
|
<div class="w-full">
|
||||||
<el-radio-group v-model="form_data.tts_type" v-show="form_data.tts_model_enable">
|
<el-radio-group v-model="form_data.tts_type" v-show="form_data.tts_model_enable">
|
||||||
<el-radio
|
<el-radio
|
||||||
:label="$t('views.application.applicationForm.form.voicePlay.browser')"
|
:label="$t('views.application.form.voicePlay.browser')"
|
||||||
value="BROWSER"
|
value="BROWSER"
|
||||||
/>
|
/>
|
||||||
<el-radio
|
<el-radio
|
||||||
:label="$t('views.application.applicationForm.form.voicePlay.tts')"
|
:label="$t('views.application.form.voicePlay.tts')"
|
||||||
value="TTS"
|
value="TTS"
|
||||||
/>
|
/>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
@ -148,7 +148,7 @@
|
|||||||
@wheel="wheel"
|
@wheel="wheel"
|
||||||
v-if="form_data.tts_type === 'TTS' && form_data.tts_model_enable"
|
v-if="form_data.tts_type === 'TTS' && form_data.tts_model_enable"
|
||||||
v-model="form_data.tts_model_id"
|
v-model="form_data.tts_model_id"
|
||||||
:placeholder="$t('views.application.applicationForm.form.voicePlay.placeholder')"
|
:placeholder="$t('views.application.form.voicePlay.placeholder')"
|
||||||
:options="ttsModelOptions"
|
:options="ttsModelOptions"
|
||||||
@change="ttsModelChange()"
|
@change="ttsModelChange()"
|
||||||
showFooter
|
showFooter
|
||||||
@ -206,7 +206,7 @@ const FileUploadSettingDialogRef = ref<InstanceType<typeof FileUploadSettingDial
|
|||||||
const form = {
|
const form = {
|
||||||
name: '',
|
name: '',
|
||||||
desc: '',
|
desc: '',
|
||||||
prologue: t('views.application.applicationForm.form.defaultPrologue')
|
prologue: t('views.application.form.defaultPrologue')
|
||||||
}
|
}
|
||||||
|
|
||||||
const wheel = (e: any) => {
|
const wheel = (e: any) => {
|
||||||
@ -247,13 +247,13 @@ const validate = () => {
|
|||||||
) {
|
) {
|
||||||
return Promise.reject({
|
return Promise.reject({
|
||||||
node: props.nodeModel,
|
node: props.nodeModel,
|
||||||
errMessage: t('views.application.applicationForm.form.voicePlay.requiredMessage')
|
errMessage: t('views.application.form.voicePlay.requiredMessage')
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (form_data.value.stt_model_enable && !form_data.value.stt_model_id) {
|
if (form_data.value.stt_model_enable && !form_data.value.stt_model_id) {
|
||||||
return Promise.reject({
|
return Promise.reject({
|
||||||
node: props.nodeModel,
|
node: props.nodeModel,
|
||||||
errMessage: t('views.application.applicationForm.form.voiceInput.requiredMessage')
|
errMessage: t('views.application.form.voiceInput.requiredMessage')
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return baseNodeFormRef.value?.validate().catch((err) => {
|
return baseNodeFormRef.value?.validate().catch((err) => {
|
||||||
@ -297,7 +297,7 @@ function sttModelEnableChange() {
|
|||||||
const openTTSParamSettingDialog = () => {
|
const openTTSParamSettingDialog = () => {
|
||||||
const model_id = form_data.value.tts_model_id
|
const model_id = form_data.value.tts_model_id
|
||||||
if (!model_id) {
|
if (!model_id) {
|
||||||
MsgSuccess(t('views.application.applicationForm.form.voicePlay.requiredMessage'))
|
MsgSuccess(t('views.application.form.voicePlay.requiredMessage'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
TTSModeParamSettingDialogRef.value?.open(model_id, id, form_data.value.tts_model_params_setting)
|
TTSModeParamSettingDialogRef.value?.open(model_id, id, form_data.value.tts_model_params_setting)
|
||||||
|
|||||||
@ -59,7 +59,7 @@
|
|||||||
prop="prompt"
|
prop="prompt"
|
||||||
:rules="{
|
:rules="{
|
||||||
required: true,
|
required: true,
|
||||||
message: $t('views.application.applicationForm.form.prompt.requiredMessage'),
|
message: $t('views.application.form.prompt.requiredMessage'),
|
||||||
trigger: 'blur'
|
trigger: 'blur'
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
@ -92,7 +92,7 @@
|
|||||||
prop="prompt"
|
prop="prompt"
|
||||||
:rules="{
|
:rules="{
|
||||||
required: false,
|
required: false,
|
||||||
message: $t('views.application.applicationForm.form.prompt.requiredMessage'),
|
message: $t('views.application.form.prompt.requiredMessage'),
|
||||||
trigger: 'blur'
|
trigger: 'blur'
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
|
|||||||
@ -55,21 +55,21 @@
|
|||||||
></ModelSelect>
|
></ModelSelect>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item :label="$t('views.application.applicationForm.form.roleSettings.label')">
|
<el-form-item :label="$t('views.application.form.roleSettings.label')">
|
||||||
<MdEditorMagnify
|
<MdEditorMagnify
|
||||||
:title="$t('views.application.applicationForm.form.roleSettings.label')"
|
:title="$t('views.application.form.roleSettings.label')"
|
||||||
v-model="form_data.system"
|
v-model="form_data.system"
|
||||||
style="height: 100px"
|
style="height: 100px"
|
||||||
@submitDialog="submitSystemDialog"
|
@submitDialog="submitSystemDialog"
|
||||||
:placeholder="$t('views.application.applicationForm.form.roleSettings.label')"
|
:placeholder="$t('views.application.form.roleSettings.label')"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:label="$t('views.application.applicationForm.form.prompt.label')"
|
:label="$t('views.application.form.prompt.label')"
|
||||||
prop="prompt"
|
prop="prompt"
|
||||||
:rules="{
|
:rules="{
|
||||||
required: true,
|
required: true,
|
||||||
message: $t('views.application.applicationForm.form.prompt.requiredMessage'),
|
message: $t('views.application.form.prompt.requiredMessage'),
|
||||||
trigger: 'blur'
|
trigger: 'blur'
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
@ -77,13 +77,13 @@
|
|||||||
<div class="flex align-center">
|
<div class="flex align-center">
|
||||||
<div class="mr-4">
|
<div class="mr-4">
|
||||||
<span
|
<span
|
||||||
>{{ $t('views.application.applicationForm.form.prompt.label')
|
>{{ $t('views.application.form.prompt.label')
|
||||||
}}<span class="danger">*</span></span
|
}}<span class="danger">*</span></span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<el-tooltip effect="dark" placement="right" popper-class="max-w-200">
|
<el-tooltip effect="dark" placement="right" popper-class="max-w-200">
|
||||||
<template #content
|
<template #content
|
||||||
>{{ $t('views.application.applicationForm.form.prompt.tooltip') }}
|
>{{ $t('views.application.form.prompt.tooltip') }}
|
||||||
</template>
|
</template>
|
||||||
<AppIcon iconName="app-warning" class="app-warning-icon"></AppIcon>
|
<AppIcon iconName="app-warning" class="app-warning-icon"></AppIcon>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
@ -91,7 +91,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<MdEditorMagnify
|
<MdEditorMagnify
|
||||||
@wheel="wheel"
|
@wheel="wheel"
|
||||||
:title="$t('views.application.applicationForm.form.prompt.label')"
|
:title="$t('views.application.form.prompt.label')"
|
||||||
v-model="form_data.prompt"
|
v-model="form_data.prompt"
|
||||||
style="height: 150px"
|
style="height: 150px"
|
||||||
@submitDialog="submitDialog"
|
@submitDialog="submitDialog"
|
||||||
@ -100,7 +100,7 @@
|
|||||||
<el-form-item>
|
<el-form-item>
|
||||||
<template #label>
|
<template #label>
|
||||||
<div class="flex-between">
|
<div class="flex-between">
|
||||||
<div>{{ $t('views.application.applicationForm.form.historyRecord.label') }}</div>
|
<div>{{ $t('views.application.form.historyRecord.label') }}</div>
|
||||||
<el-select v-model="form_data.dialogue_type" type="small" style="width: 100px">
|
<el-select v-model="form_data.dialogue_type" type="small" style="width: 100px">
|
||||||
<el-option :label="$t('views.applicationWorkflow.node')" value="NODE" />
|
<el-option :label="$t('views.applicationWorkflow.node')" value="NODE" />
|
||||||
<el-option :label="$t('views.applicationWorkflow.workflow')" value="WORKFLOW" />
|
<el-option :label="$t('views.applicationWorkflow.workflow')" value="WORKFLOW" />
|
||||||
|
|||||||
@ -13,11 +13,11 @@
|
|||||||
hide-required-asterisk
|
hide-required-asterisk
|
||||||
>
|
>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:label="$t('views.application.applicationForm.form.aiModel.label')"
|
:label="$t('views.application.form.aiModel.label')"
|
||||||
prop="model_id"
|
prop="model_id"
|
||||||
:rules="{
|
:rules="{
|
||||||
required: true,
|
required: true,
|
||||||
message: $t('views.application.applicationForm.form.aiModel.placeholder'),
|
message: $t('views.application.form.aiModel.placeholder'),
|
||||||
trigger: 'change'
|
trigger: 'change'
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
@ -25,7 +25,7 @@
|
|||||||
<div class="flex-between">
|
<div class="flex-between">
|
||||||
<div>
|
<div>
|
||||||
<span
|
<span
|
||||||
>{{ $t('views.application.applicationForm.form.aiModel.label')
|
>{{ $t('views.application.form.aiModel.label')
|
||||||
}}<span class="danger">*</span></span
|
}}<span class="danger">*</span></span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
@ -45,28 +45,28 @@
|
|||||||
@wheel="wheel"
|
@wheel="wheel"
|
||||||
:teleported="false"
|
:teleported="false"
|
||||||
v-model="form_data.model_id"
|
v-model="form_data.model_id"
|
||||||
:placeholder="$t('views.application.applicationForm.form.aiModel.placeholder')"
|
:placeholder="$t('views.application.form.aiModel.placeholder')"
|
||||||
:options="modelOptions"
|
:options="modelOptions"
|
||||||
@submitModel="getModel"
|
@submitModel="getModel"
|
||||||
showFooter
|
showFooter
|
||||||
:model-type="'LLM'"
|
:model-type="'LLM'"
|
||||||
></ModelSelect>
|
></ModelSelect>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('views.application.applicationForm.form.roleSettings.label')">
|
<el-form-item :label="$t('views.application.form.roleSettings.label')">
|
||||||
<MdEditorMagnify
|
<MdEditorMagnify
|
||||||
:title="$t('views.application.applicationForm.form.roleSettings.label')"
|
:title="$t('views.application.form.roleSettings.label')"
|
||||||
v-model="form_data.system"
|
v-model="form_data.system"
|
||||||
style="height: 100px"
|
style="height: 100px"
|
||||||
@submitDialog="submitSystemDialog"
|
@submitDialog="submitSystemDialog"
|
||||||
:placeholder="$t('views.application.applicationForm.form.roleSettings.label')"
|
:placeholder="$t('views.application.form.roleSettings.label')"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:label="$t('views.application.applicationForm.form.prompt.label')"
|
:label="$t('views.application.form.prompt.label')"
|
||||||
prop="prompt"
|
prop="prompt"
|
||||||
:rules="{
|
:rules="{
|
||||||
required: true,
|
required: true,
|
||||||
message: $t('views.application.applicationForm.form.prompt.tooltip'),
|
message: $t('views.application.form.prompt.tooltip'),
|
||||||
trigger: 'blur'
|
trigger: 'blur'
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
@ -74,13 +74,13 @@
|
|||||||
<div class="flex align-center">
|
<div class="flex align-center">
|
||||||
<div class="mr-4">
|
<div class="mr-4">
|
||||||
<span
|
<span
|
||||||
>{{ $t('views.application.applicationForm.form.prompt.label')
|
>{{ $t('views.application.form.prompt.label')
|
||||||
}}<span class="danger">*</span></span
|
}}<span class="danger">*</span></span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<el-tooltip effect="dark" placement="right" popper-class="max-w-200">
|
<el-tooltip effect="dark" placement="right" popper-class="max-w-200">
|
||||||
<template #content>{{
|
<template #content>{{
|
||||||
$t('views.application.applicationForm.form.prompt.tooltip')
|
$t('views.application.form.prompt.tooltip')
|
||||||
}}</template>
|
}}</template>
|
||||||
<AppIcon iconName="app-warning" class="app-warning-icon"></AppIcon>
|
<AppIcon iconName="app-warning" class="app-warning-icon"></AppIcon>
|
||||||
<el-icon><EditPen /></el-icon>
|
<el-icon><EditPen /></el-icon>
|
||||||
@ -89,13 +89,13 @@
|
|||||||
</template>
|
</template>
|
||||||
<MdEditorMagnify
|
<MdEditorMagnify
|
||||||
@wheel="wheel"
|
@wheel="wheel"
|
||||||
:title="$t('views.application.applicationForm.form.prompt.label')"
|
:title="$t('views.application.form.prompt.label')"
|
||||||
v-model="form_data.prompt"
|
v-model="form_data.prompt"
|
||||||
style="height: 150px"
|
style="height: 150px"
|
||||||
@submitDialog="submitDialog"
|
@submitDialog="submitDialog"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('views.application.applicationForm.form.historyRecord.label')">
|
<el-form-item :label="$t('views.application.form.historyRecord.label')">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="form_data.dialogue_number"
|
v-model="form_data.dialogue_number"
|
||||||
:min="0"
|
:min="0"
|
||||||
|
|||||||
@ -21,20 +21,20 @@
|
|||||||
</template>
|
</template>
|
||||||
<div class="w-full">
|
<div class="w-full">
|
||||||
<el-text type="info" v-if="form_data.dataset_id_list?.length === 0">
|
<el-text type="info" v-if="form_data.dataset_id_list?.length === 0">
|
||||||
{{ $t('views.application.applicationForm.form.relatedKnowledge.placeholder') }}
|
{{ $t('views.application.form.relatedKnowledge.placeholder') }}
|
||||||
</el-text>
|
</el-text>
|
||||||
<template v-for="(item, index) in form_data.dataset_id_list" :key="index" v-else>
|
<template v-for="(item, index) in form_data.dataset_id_list" :key="index" v-else>
|
||||||
<div class="flex-between border border-r-4 white-bg mb-4" style="padding: 5px 8px">
|
<div class="flex-between border border-r-4 white-bg mb-4" style="padding: 5px 8px">
|
||||||
<div class="flex align-center" style="line-height: 20px">
|
<div class="flex align-center" style="line-height: 20px">
|
||||||
<AppAvatar
|
<el-avatar
|
||||||
v-if="relatedObject(datasetList, item, 'id')?.type === '1'"
|
v-if="relatedObject(datasetList, item, 'id')?.type === '1'"
|
||||||
class="mr-8 avatar-purple"
|
class="mr-8 avatar-purple"
|
||||||
shape="square"
|
shape="square"
|
||||||
:size="20"
|
:size="20"
|
||||||
>
|
>
|
||||||
<img src="@/assets/knowledge/icon_web.svg" style="width: 58%" alt="" />
|
<img src="@/assets/knowledge/icon_web.svg" style="width: 58%" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
<AppAvatar
|
<el-avatar
|
||||||
v-else-if="relatedObject(datasetList, item, 'id')?.type === '2'"
|
v-else-if="relatedObject(datasetList, item, 'id')?.type === '2'"
|
||||||
class="mr-8 avatar-purple"
|
class="mr-8 avatar-purple"
|
||||||
shape="square"
|
shape="square"
|
||||||
@ -42,10 +42,10 @@
|
|||||||
style="background: none"
|
style="background: none"
|
||||||
>
|
>
|
||||||
<img src="@/assets/knowledge/logo_lark.svg" style="width: 100%" alt="" />
|
<img src="@/assets/knowledge/logo_lark.svg" style="width: 100%" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
<AppAvatar v-else class="mr-8 avatar-blue" shape="square" :size="20">
|
<el-avatar v-else class="mr-8 avatar-blue" shape="square" :size="20">
|
||||||
<img src="@/assets/knowledge/icon_document.svg" style="width: 58%" alt="" />
|
<img src="@/assets/knowledge/icon_document.svg" style="width: 58%" alt="" />
|
||||||
</AppAvatar>
|
</el-avatar>
|
||||||
|
|
||||||
<div class="ellipsis" :title="relatedObject(datasetList, item, 'id')?.name">
|
<div class="ellipsis" :title="relatedObject(datasetList, item, 'id')?.name">
|
||||||
{{ relatedObject(datasetList, item, 'id')?.name }}
|
{{ relatedObject(datasetList, item, 'id')?.name }}
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
prop="stt_model_id"
|
prop="stt_model_id"
|
||||||
:rules="{
|
:rules="{
|
||||||
required: true,
|
required: true,
|
||||||
message: $t('views.application.applicationForm.form.voiceInput.placeholder'),
|
message: $t('views.application.form.voiceInput.placeholder'),
|
||||||
trigger: 'change'
|
trigger: 'change'
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
@ -34,7 +34,7 @@
|
|||||||
@wheel="wheel"
|
@wheel="wheel"
|
||||||
:teleported="false"
|
:teleported="false"
|
||||||
v-model="form_data.stt_model_id"
|
v-model="form_data.stt_model_id"
|
||||||
:placeholder="$t('views.application.applicationForm.form.voiceInput.placeholder')"
|
:placeholder="$t('views.application.form.voiceInput.placeholder')"
|
||||||
:options="modelOptions"
|
:options="modelOptions"
|
||||||
showFooter
|
showFooter
|
||||||
:model-type="'STT'"
|
:model-type="'STT'"
|
||||||
|
|||||||
@ -34,7 +34,7 @@ const showicon = ref(false)
|
|||||||
const globalFields = [
|
const globalFields = [
|
||||||
{ label: t('views.applicationWorkflow.nodes.startNode.currentTime'), value: 'time' },
|
{ label: t('views.applicationWorkflow.nodes.startNode.currentTime'), value: 'time' },
|
||||||
{
|
{
|
||||||
label: t('views.application.applicationForm.form.historyRecord.label'),
|
label: t('views.application.form.historyRecord.label'),
|
||||||
value: 'history_context'
|
value: 'history_context'
|
||||||
},
|
},
|
||||||
{ label: t('chat.chatId'), value: 'chat_id' }
|
{ label: t('chat.chatId'), value: 'chat_id' }
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
prop="tts_model_id"
|
prop="tts_model_id"
|
||||||
:rules="{
|
:rules="{
|
||||||
required: true,
|
required: true,
|
||||||
message: $t('views.application.applicationForm.form.voicePlay.placeholder'),
|
message: $t('views.application.form.voicePlay.placeholder'),
|
||||||
trigger: 'change'
|
trigger: 'change'
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
@ -43,7 +43,7 @@
|
|||||||
@wheel="wheel"
|
@wheel="wheel"
|
||||||
:teleported="false"
|
:teleported="false"
|
||||||
v-model="form_data.tts_model_id"
|
v-model="form_data.tts_model_id"
|
||||||
:placeholder="$t('views.application.applicationForm.form.voicePlay.placeholder')"
|
:placeholder="$t('views.application.form.voicePlay.placeholder')"
|
||||||
:options="modelOptions"
|
:options="modelOptions"
|
||||||
showFooter
|
showFooter
|
||||||
:model-type="'TTS'"
|
:model-type="'TTS'"
|
||||||
@ -184,7 +184,7 @@ function getModel() {
|
|||||||
const openTTSParamSettingDialog = () => {
|
const openTTSParamSettingDialog = () => {
|
||||||
const model_id = form_data.value.tts_model_id
|
const model_id = form_data.value.tts_model_id
|
||||||
if (!model_id) {
|
if (!model_id) {
|
||||||
MsgSuccess(t('views.application.applicationForm.form.voicePlay.requiredMessage'))
|
MsgSuccess(t('views.application.form.voicePlay.requiredMessage'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
TTSModeParamSettingDialogRef.value?.open(model_id, id, form_data.value.model_params_setting)
|
TTSModeParamSettingDialogRef.value?.open(model_id, id, form_data.value.model_params_setting)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user