mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 10:02:46 +00:00
Merge branch 'main' of github.com:maxkb-dev/maxkb
This commit is contained in:
commit
592dfaa8e5
|
|
@ -40,6 +40,7 @@
|
|||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, nextTick, watch, computed, onMounted } from 'vue'
|
||||
import { MsgError } from '@/utils/message'
|
||||
defineOptions({ name: 'AppTable' })
|
||||
|
||||
const props = defineProps({
|
||||
|
|
@ -72,12 +73,16 @@ watch(showInput, (bool) => {
|
|||
})
|
||||
|
||||
function submitHandle() {
|
||||
loading.value = true
|
||||
emit('creatQuick', inputValue.value)
|
||||
setTimeout(() => {
|
||||
showInput.value = false
|
||||
loading.value = false
|
||||
}, 200)
|
||||
if (inputValue.value) {
|
||||
loading.value = true
|
||||
emit('creatQuick', inputValue.value)
|
||||
setTimeout(() => {
|
||||
showInput.value = false
|
||||
loading.value = false
|
||||
}, 200)
|
||||
} else {
|
||||
MsgError('文件名称不能为空!')
|
||||
}
|
||||
}
|
||||
|
||||
function quickCreateHandel() {
|
||||
|
|
|
|||
|
|
@ -309,3 +309,8 @@
|
|||
.el-radio__input.is-checked + .el-radio__label {
|
||||
color: var(--app-text-color);
|
||||
}
|
||||
|
||||
.el-input-number .el-input__wrapper {
|
||||
padding-left: 15px !important;;
|
||||
padding-right: 42px !important;;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,28 +44,7 @@
|
|||
show-word-limit
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="提示词" prop="model_setting.prompt">
|
||||
<template #label>
|
||||
<div class="flex align-center">
|
||||
<div class="flex-between mr-4">
|
||||
<span>提示词 <span class="danger">*</span></span>
|
||||
</div>
|
||||
<el-tooltip effect="dark" placement="right">
|
||||
<template #content
|
||||
>通过调整提示词内容,可以引导大模型聊天方向,该提示词会被固定在上下文的开头。<br />可以使用变量:{data}
|
||||
是携带知识库中已知信息;{question}是用户提出的问题。</template
|
||||
>
|
||||
<AppIcon iconName="app-warning" class="app-warning-icon"></AppIcon>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</template>
|
||||
<el-input
|
||||
v-model="applicationForm.model_setting.prompt"
|
||||
:rows="6"
|
||||
type="textarea"
|
||||
:placeholder="defaultPrompt"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="AI 模型" prop="model_id">
|
||||
<template #label>
|
||||
<div class="flex-between">
|
||||
|
|
@ -111,7 +90,28 @@
|
|||
</template>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="提示词" prop="model_setting.prompt">
|
||||
<template #label>
|
||||
<div class="flex align-center">
|
||||
<div class="flex-between mr-4">
|
||||
<span>提示词 <span class="danger">*</span></span>
|
||||
</div>
|
||||
<el-tooltip effect="dark" placement="right">
|
||||
<template #content
|
||||
>通过调整提示词内容,可以引导大模型聊天方向,该提示词会被固定在上下文的开头。<br />可以使用变量:{data}
|
||||
是携带知识库中已知信息;{question}是用户提出的问题。</template
|
||||
>
|
||||
<AppIcon iconName="app-warning" class="app-warning-icon"></AppIcon>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</template>
|
||||
<el-input
|
||||
v-model="applicationForm.model_setting.prompt"
|
||||
:rows="6"
|
||||
type="textarea"
|
||||
:placeholder="defaultPrompt"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="多轮对话" @click.prevent>
|
||||
<el-switch
|
||||
size="small"
|
||||
|
|
@ -123,16 +123,17 @@
|
|||
<div class="flex-between">
|
||||
<span>关联知识库</span>
|
||||
<div>
|
||||
<el-popover :visible="popoverVisible" :width="280" trigger="click">
|
||||
<el-popover :visible="popoverVisible" :width="214" trigger="click">
|
||||
<template #reference>
|
||||
<el-button type="primary" link @click="datasetSettingChange('open')"
|
||||
><AppIcon iconName="app-operation" class="mr-4"></AppIcon>参数设置</el-button
|
||||
><AppIcon iconName="app-operation" class="mr-4"></AppIcon
|
||||
>参数设置</el-button
|
||||
>
|
||||
</template>
|
||||
<div class="dataset_setting">
|
||||
<div class="form-item mb-16">
|
||||
<div class="title flex align-center mb-8">
|
||||
<span style="margin-right: 4px">相似度</span>
|
||||
<span style="margin-right: 4px">相似度高于</span>
|
||||
<el-tooltip
|
||||
effect="dark"
|
||||
content="相似度越高相关性越强。"
|
||||
|
|
@ -142,7 +143,6 @@
|
|||
</el-tooltip>
|
||||
</div>
|
||||
<div @click.stop>
|
||||
高于
|
||||
<el-input-number
|
||||
v-model="dataset_setting.similarity"
|
||||
:min="0"
|
||||
|
|
@ -150,24 +150,20 @@
|
|||
:precision="3"
|
||||
:step="0.1"
|
||||
controls-position="right"
|
||||
style="width: 100px"
|
||||
size="small"
|
||||
style="width: 180px"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-item mb-16">
|
||||
<div class="title mb-8">引用分段数</div>
|
||||
<div class="title mb-8">引用分段数 TOP</div>
|
||||
<div @click.stop>
|
||||
TOP
|
||||
<el-input-number
|
||||
v-model="dataset_setting.top_n"
|
||||
:min="1"
|
||||
:max="10"
|
||||
controls-position="right"
|
||||
style="width: 100px"
|
||||
size="small"
|
||||
style="width: 180px"
|
||||
/>
|
||||
个分段
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -180,11 +176,9 @@
|
|||
:show-input-controls="false"
|
||||
:min="500"
|
||||
:max="10000"
|
||||
style="width: 200px"
|
||||
size="small"
|
||||
style="width: 180px"
|
||||
class="custom-slider"
|
||||
/>
|
||||
<span class="ml-4">个字符</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ import ImportDocumentDialog from './component/ImportDocumentDialog.vue'
|
|||
import SyncWebDialog from '@/views/dataset/component/SyncWebDialog.vue'
|
||||
import { numberFormat } from '@/utils/utils'
|
||||
import { datetimeFormat } from '@/utils/time'
|
||||
import { MsgSuccess, MsgConfirm } from '@/utils/message'
|
||||
import { MsgSuccess, MsgConfirm, MsgError } from '@/utils/message'
|
||||
import useStore from '@/stores'
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
|
|
@ -336,10 +336,15 @@ function changeState(bool: Boolean, row: any) {
|
|||
}
|
||||
|
||||
function editName(val: string) {
|
||||
const obj = {
|
||||
name: val
|
||||
console.log()
|
||||
if (val) {
|
||||
const obj = {
|
||||
name: val
|
||||
}
|
||||
currentMouseId.value && updateData(currentMouseId.value, obj, '修改成功')
|
||||
} else {
|
||||
MsgError('文件名称不能为空!')
|
||||
}
|
||||
currentMouseId.value && updateData(currentMouseId.value, obj, '修改成功')
|
||||
}
|
||||
|
||||
function cellMouseEnter(row: any) {
|
||||
|
|
|
|||
|
|
@ -75,35 +75,33 @@
|
|||
<ParagraphDialog ref="ParagraphDialogRef" :title="title" @refresh="refresh" />
|
||||
</LayoutContainer>
|
||||
<div class="hit-test__operate p-24 pt-0">
|
||||
<el-popover :visible="popoverVisible" placement="right-end" :width="225" trigger="click">
|
||||
<el-popover :visible="popoverVisible" placement="right-end" :width="180" trigger="click">
|
||||
<template #reference>
|
||||
<el-button icon="Setting" class="mb-8" @click="settingChange('open')">参数设置</el-button>
|
||||
</template>
|
||||
|
||||
<div class="mb-16">
|
||||
相似度高于
|
||||
<div class="title mb-8">相似度高于</div>
|
||||
<el-input-number
|
||||
size="small"
|
||||
v-model="cloneForm.similarity"
|
||||
:min="0"
|
||||
:max="1"
|
||||
:precision="3"
|
||||
:step="0.1"
|
||||
controls-position="right"
|
||||
style="width: 100px"
|
||||
style="width: 145px"
|
||||
/>
|
||||
</div>
|
||||
<div class="mb-16">
|
||||
返回 Top
|
||||
<div class="title mb-8">返回分段数 Top</div>
|
||||
|
||||
<el-input-number
|
||||
size="small"
|
||||
v-model="cloneForm.top_number"
|
||||
:min="1"
|
||||
:max="10"
|
||||
controls-position="right"
|
||||
style="width: 80px"
|
||||
style="width: 145px"
|
||||
/>
|
||||
个分段
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<el-button @click="popoverVisible = false">取消</el-button>
|
||||
|
|
|
|||
Loading…
Reference in New Issue