mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 10:12:51 +00:00
Merge branch 'main' of github.com:maxkb-dev/maxkb
This commit is contained in:
commit
1befd93038
|
|
@ -18,6 +18,7 @@
|
|||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, watch, useSlots } from 'vue'
|
||||
import empty from '@/assets/empty.png'
|
||||
|
||||
defineOptions({ name: 'CommonList' })
|
||||
|
||||
|
|
|
|||
|
|
@ -254,7 +254,7 @@ export const iconMap: any = {
|
|||
h('path', {
|
||||
d: 'M6.71305 11.5149C6.48293 11.5149 6.29639 11.7015 6.29639 11.9316V12.6134C6.29639 12.8435 6.48294 13.0301 6.71305 13.0301H9.58342C9.81354 13.0301 10.0001 12.8435 10.0001 12.6134V11.9316C10.0001 11.7015 9.81354 11.5149 9.58342 11.5149H6.71305Z',
|
||||
fill: 'white'
|
||||
}),
|
||||
})
|
||||
]
|
||||
)
|
||||
])
|
||||
|
|
@ -491,18 +491,91 @@ export const iconMap: any = {
|
|||
'svg',
|
||||
{
|
||||
style: { height: '100%', width: '100%' },
|
||||
viewBox: '0 0 1024 1024',
|
||||
viewBox: '0 0 20 20',
|
||||
version: '1.1',
|
||||
xmlns: 'http://www.w3.org/2000/svg'
|
||||
},
|
||||
|
||||
[
|
||||
h('path', {
|
||||
d: 'M893.515135 43.149508L904.443831 119.556169l76.406661 10.834483a50.403901 50.403901 0 0 1 28.26387 85.356887l-65.477965 65.383752a502.060539 502.060539 0 1 1-216.689668-209.058423l15.450916 8.102309 65.383752-65.477965a50.309688 50.309688 0 0 1 71.036526 0 50.969178 50.969178 0 0 1 14.226147 28.26387zM502.437391 94.212899a427.067071 427.067071 0 1 0 384.671267 241.185022 50.403901 50.403901 0 0 1-33.162941 6.783328l-103.822615-14.979851-9.42129 9.42129A301.481277 301.481277 0 1 1 687.754163 283.3924l9.42129-9.42129L681.912963 169.583218a50.309688 50.309688 0 0 1 3.580091-27.039102l2.9206-5.558561A425.371239 425.371239 0 0 0 502.437391 94.212899z m0 200.956114A226.110958 226.110958 0 1 0 686.812034 390.512467l-91.763363 91.763363a100.619376 100.619376 0 1 1-53.324501-53.230288l91.763363-91.857576a226.110958 226.110958 0 0 0-131.050142-41.830527zM826.058699 103.634189l-67.833287 67.739074L770.002024 254.374827l82.624713 11.305548 67.739074-67.833287-26.66225-3.768516a75.370319 75.370319 0 0 1-62.557365-56.527739l-1.413194-6.971755-3.768516-26.944889z',
|
||||
fill: 'currentColor'
|
||||
d: 'M1.6665 9.99986C1.6665 5.3975 5.39748 1.66653 9.99984 1.66653H10.8332V3.3332H9.99984C6.31795 3.3332 3.33317 6.31797 3.33317 9.99986C3.33317 13.6818 6.31795 16.6665 9.99984 16.6665C13.6817 16.6665 16.6665 13.6818 16.6665 9.99986V9.16653H18.3332V9.99986C18.3332 14.6022 14.6022 18.3332 9.99984 18.3332C5.39748 18.3332 1.6665 14.6022 1.6665 9.99986Z',
|
||||
fill: 'currentColor',
|
||||
fillRule: 'evenodd',
|
||||
clipRule: 'evenodd'
|
||||
}),
|
||||
h('path', {
|
||||
d: 'M5.4165 9.99986C5.4165 7.46854 7.46852 5.41653 9.99984 5.41653H10.8332V7.0832H9.99984C8.38899 7.0832 7.08317 8.38902 7.08317 9.99986C7.08317 11.6107 8.38899 12.9165 9.99984 12.9165C11.6107 12.9165 12.9165 11.6107 12.9165 9.99986V9.16653H14.5832V9.99986C14.5832 12.5312 12.5312 14.5832 9.99984 14.5832C7.46852 14.5832 5.4165 12.5312 5.4165 9.99986Z',
|
||||
fill: 'currentColor',
|
||||
fillRule: 'evenodd',
|
||||
clipRule: 'evenodd'
|
||||
}),
|
||||
h('path', {
|
||||
d: 'M13.2138 6.78296C13.5394 7.10825 13.5397 7.63588 13.2144 7.96147L10.5894 10.5889C10.2641 10.9145 9.73644 10.9147 9.41085 10.5894C9.08527 10.2641 9.08502 9.73651 9.41031 9.41092L12.0353 6.7835C12.3606 6.45792 12.8882 6.45767 13.2138 6.78296Z',
|
||||
fill: 'currentColor',
|
||||
fillRule: 'evenodd',
|
||||
clipRule: 'evenodd'
|
||||
}),
|
||||
h('path', {
|
||||
d: 'M15.1942 1.72962C15.506 1.8584 15.7095 2.16249 15.7095 2.49986V4.29161H17.4998C17.8365 4.29161 18.1401 4.49423 18.2693 4.80516C18.3985 5.11608 18.3279 5.47421 18.0904 5.71284L15.8508 7.96276C15.6944 8.11987 15.4819 8.2082 15.2602 8.2082H12.6248C12.1645 8.2082 11.7914 7.8351 11.7914 7.37486V4.76086C11.7914 4.54046 11.8787 4.32904 12.0342 4.17287L14.2856 1.91186C14.5237 1.6728 14.8824 1.60085 15.1942 1.72962ZM13.4581 5.105V6.54153H14.9139L15.4945 5.95828H14.8761C14.4159 5.95828 14.0428 5.58518 14.0428 5.12495V4.51779L13.4581 5.105Z',
|
||||
fill: 'currentColor',
|
||||
fillRule: 'evenodd',
|
||||
clipRule: 'evenodd'
|
||||
})
|
||||
]
|
||||
)
|
||||
])
|
||||
}
|
||||
},
|
||||
'app-warning': {
|
||||
iconReader: () => {
|
||||
return h('i', [
|
||||
h(
|
||||
'svg',
|
||||
{
|
||||
style: { height: '100%', width: '100%' },
|
||||
viewBox: '0 0 16 16',
|
||||
version: '1.1',
|
||||
xmlns: 'http://www.w3.org/2000/svg'
|
||||
},
|
||||
[
|
||||
h('path', {
|
||||
d: 'M7.99984 3.66667C8.46007 3.66667 8.83317 4.03977 8.83317 4.5C8.83317 4.96023 8.46007 5.33333 7.99984 5.33333C7.5396 5.33333 7.1665 4.96023 7.1665 4.5C7.1665 4.03977 7.5396 3.66667 7.99984 3.66667Z',
|
||||
fill: 'currentColor'
|
||||
}),
|
||||
h('path', {
|
||||
d: 'M8.1665 6H7.33317C7.05703 6 6.83317 6.22386 6.83317 6.5V6.83333C6.83317 7.10948 7.05703 7.33333 7.33317 7.33333H7.49984V10.6667H6.83317C6.55703 10.6667 6.33317 10.8905 6.33317 11.1667V11.5C6.33317 11.7761 6.55703 12 6.83317 12H9.49984C9.77598 12 9.99984 11.7761 9.99984 11.5V11.1667C9.99984 10.8905 9.77598 10.6667 9.49984 10.6667H8.83317V6.66667C8.83317 6.29848 8.53469 6 8.1665 6Z',
|
||||
fill: 'currentColor'
|
||||
}),
|
||||
h('path', {
|
||||
d: 'M7.99984 15.3332C3.94984 15.3332 0.666504 12.0498 0.666504 7.99984C0.666504 3.94984 3.94984 0.666504 7.99984 0.666504C12.0498 0.666504 15.3332 3.94984 15.3332 7.99984C15.3332 12.0498 12.0498 15.3332 7.99984 15.3332ZM7.99984 13.9998C11.3135 13.9998 13.9998 11.3135 13.9998 7.99984C13.9998 4.68617 11.3135 1.99984 7.99984 1.99984C4.68617 1.99984 1.99984 4.68617 1.99984 7.99984C1.99984 11.3135 4.68617 13.9998 7.99984 13.9998Z',
|
||||
fill: 'currentColor',
|
||||
fillRule: 'evenodd',
|
||||
clipRule: 'evenodd'
|
||||
})
|
||||
]
|
||||
)
|
||||
])
|
||||
}
|
||||
},
|
||||
'app-operation': {
|
||||
iconReader: () => {
|
||||
return h('i', [
|
||||
h(
|
||||
'svg',
|
||||
{
|
||||
style: { height: '100%', width: '100%' },
|
||||
viewBox: '0 0 16 16',
|
||||
version: '1.1',
|
||||
xmlns: 'http://www.w3.org/2000/svg'
|
||||
},
|
||||
[
|
||||
h('path', {
|
||||
d: 'M11.0002 11.3333H14.2395C14.3881 11.3333 14.442 11.3487 14.4963 11.3778C14.5506 11.4068 14.5933 11.4495 14.6223 11.5038C14.6514 11.5581 14.6668 11.612 14.6668 11.7606V12.2393C14.6668 12.3879 14.6514 12.4417 14.6223 12.4961C14.5933 12.5504 14.5506 12.593 14.4963 12.6221C14.442 12.6511 14.3881 12.6666 14.2395 12.6666H11.0002V14.2393C11.0002 14.3879 10.9847 14.4417 10.9556 14.4961C10.9266 14.5504 10.884 14.593 10.8296 14.6221C10.7753 14.6511 10.7214 14.6666 10.5728 14.6666H10.0941C9.94556 14.6666 9.89168 14.6511 9.83736 14.6221C9.78304 14.593 9.7404 14.5504 9.71135 14.4961C9.6823 14.4417 9.66683 14.3879 9.66683 14.2393V12.6666H1.76081C1.61222 12.6666 1.55834 12.6511 1.50402 12.6221C1.4497 12.593 1.40707 12.5504 1.37802 12.4961C1.34897 12.4417 1.3335 12.3879 1.3335 12.2393V11.7606C1.3335 11.612 1.34897 11.5581 1.37802 11.5038C1.40707 11.4495 1.4497 11.4068 1.50402 11.3778C1.55834 11.3487 1.61222 11.3333 1.76081 11.3333H9.66683V9.76057C9.66683 9.61198 9.6823 9.5581 9.71135 9.50378C9.7404 9.44946 9.78304 9.40683 9.83736 9.37778C9.89168 9.34872 9.94556 9.33325 10.0941 9.33325H10.5728C10.7214 9.33325 10.7753 9.34872 10.8296 9.37778C10.884 9.40683 10.9266 9.44946 10.9556 9.50378C10.9847 9.5581 11.0002 9.61198 11.0002 9.76057V11.3333ZM5.00016 3.33325V1.76057C5.00016 1.61198 5.01563 1.5581 5.04469 1.50378C5.07374 1.44946 5.11637 1.40683 5.17069 1.37777C5.22501 1.34872 5.27889 1.33325 5.42748 1.33325H5.90618C6.05477 1.33325 6.10865 1.34872 6.16297 1.37777C6.21729 1.40683 6.25992 1.44946 6.28897 1.50378C6.31803 1.5581 6.3335 1.61198 6.3335 1.76057V3.33325H14.2395C14.3881 3.33325 14.442 3.34872 14.4963 3.37777C14.5506 3.40683 14.5933 3.44946 14.6223 3.50378C14.6514 3.5581 14.6668 3.61198 14.6668 3.76057V4.23927C14.6668 4.38786 14.6514 4.44174 14.6223 4.49606C14.5933 4.55038 14.5506 4.59301 14.4963 4.62206C14.442 4.65111 14.3881 4.66659 14.2395 4.66659H6.3335V6.23927C6.3335 6.38786 6.31803 6.44174 6.28897 6.49606C6.25992 6.55038 6.21729 6.59301 6.16297 6.62206C6.10865 6.65111 6.05477 6.66659 5.90618 6.66659H5.42748C5.27889 6.66659 5.22501 6.65111 5.17069 6.62206C5.11637 6.59301 5.07374 6.55038 5.04469 6.49606C5.01563 6.44174 5.00016 6.38786 5.00016 6.23927V4.66659H1.76081C1.61222 4.66659 1.55834 4.65111 1.50402 4.62206C1.4497 4.59301 1.40707 4.55038 1.37802 4.49606C1.34897 4.44174 1.3335 4.38786 1.3335 4.23927V3.76057C1.3335 3.61198 1.34897 3.5581 1.37802 3.50378C1.40707 3.44946 1.4497 3.40683 1.50402 3.37777C1.55834 3.34872 1.61222 3.33325 1.76081 3.33325H5.00016Z',
|
||||
fill: 'currentColor'
|
||||
})
|
||||
]
|
||||
)
|
||||
])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -421,6 +421,11 @@ h4 {
|
|||
color: var(--el-color-info);
|
||||
}
|
||||
|
||||
.app-warning-icon {
|
||||
font-size: 16px;
|
||||
color: #646a73;
|
||||
}
|
||||
|
||||
.dotting {
|
||||
display: inline-block;
|
||||
width: 10px;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
--el-box-shadow-light: 0px 2px 4px 0px rgba(31, 35, 41, 0.12);
|
||||
--el-border-color: #dee0e3;
|
||||
--el-text-color-regular: #1f2329;
|
||||
--el-color-info: #8F959E
|
||||
--el-color-info: #8f959e;
|
||||
}
|
||||
|
||||
.el-button {
|
||||
|
|
@ -84,6 +84,9 @@
|
|||
padding-top: 0;
|
||||
}
|
||||
|
||||
.el-message {
|
||||
--el-message-close-icon-color: var(--app-text-color-secondary);
|
||||
}
|
||||
.el-message-box {
|
||||
--el-messagebox-font-size: 16px;
|
||||
padding: 24px;
|
||||
|
|
@ -251,9 +254,6 @@
|
|||
padding-left: 11px;
|
||||
}
|
||||
|
||||
.el-select {
|
||||
min-width: 200px;
|
||||
}
|
||||
.el-select__caret {
|
||||
color: var(--app-text-color-secondary);
|
||||
}
|
||||
|
|
@ -301,3 +301,7 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.el-popover {
|
||||
--el-popover-padding: 16px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,14 +44,29 @@
|
|||
show-word-limit
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="model_id">
|
||||
<el-form-item label="提示词" prop="model_setting.prompt">
|
||||
<template #label>
|
||||
<div class="flex-between">
|
||||
<span>AI 模型 <span class="danger">*</span></span>
|
||||
|
||||
<el-button type="primary" link @click="promptChange('open')">提示词</el-button>
|
||||
<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">
|
||||
<el-select
|
||||
v-model="applicationForm.model_id"
|
||||
placeholder="请选择 AI 模型"
|
||||
|
|
@ -103,14 +118,14 @@
|
|||
<div class="flex-between">
|
||||
<span>关联知识库</span>
|
||||
<div>
|
||||
<el-popover :visible="popoverVisible" :width="300" trigger="click">
|
||||
<el-popover :visible="popoverVisible" :width="280" trigger="click">
|
||||
<template #reference>
|
||||
<el-button type="primary" link @click="datasetSettingChange('open')"
|
||||
><el-icon class="mr-4"><Operation /></el-icon>参数设置</el-button
|
||||
><AppIcon iconName="app-operation" class="mr-4"></AppIcon>参数设置</el-button
|
||||
>
|
||||
</template>
|
||||
<div class="dataset_setting">
|
||||
<div class="form-item mb-16 p-8">
|
||||
<div class="form-item mb-16">
|
||||
<div class="title flex align-center mb-8">
|
||||
<span style="margin-right: 4px">相似度</span>
|
||||
<el-tooltip
|
||||
|
|
@ -118,9 +133,7 @@
|
|||
content="相似度越高相关性越强。"
|
||||
placement="right"
|
||||
>
|
||||
<el-icon style="font-size: 16px">
|
||||
<Warning />
|
||||
</el-icon>
|
||||
<AppIcon iconName="app-warning" class="app-warning-icon"></AppIcon>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<div @click.stop>
|
||||
|
|
@ -137,7 +150,7 @@
|
|||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-item mb-16 p-8">
|
||||
<div class="form-item mb-16">
|
||||
<div class="title mb-8">引用分段数</div>
|
||||
<div @click.stop>
|
||||
TOP
|
||||
|
|
@ -153,7 +166,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-item mb-16 p-8">
|
||||
<div class="form-item mb-16">
|
||||
<div class="title mb-8">最多引用字符数</div>
|
||||
<div class="flex align-center">
|
||||
<el-slider
|
||||
|
|
@ -171,11 +184,8 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<el-button size="small" @click="popoverVisible = false">取消</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="datasetSettingChange('close')"
|
||||
size="small"
|
||||
<el-button @click="popoverVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="datasetSettingChange('close')"
|
||||
>确认</el-button
|
||||
>
|
||||
</div>
|
||||
|
|
@ -187,8 +197,10 @@
|
|||
</div>
|
||||
</template>
|
||||
<div class="w-full">
|
||||
<el-text type="info">关联的知识库展示在这里</el-text>
|
||||
<el-row :gutter="12">
|
||||
<el-text type="info" v-if="applicationForm.dataset_id_list?.length === 0"
|
||||
>关联的知识库展示在这里</el-text
|
||||
>
|
||||
<el-row :gutter="12" v-else>
|
||||
<!-- <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12" class="mb-8">
|
||||
<CardAdd
|
||||
title="关联知识库"
|
||||
|
|
@ -252,9 +264,7 @@
|
|||
content="根据历史聊天优化完善当前问题,更利于匹配知识点。"
|
||||
placement="right"
|
||||
>
|
||||
<el-icon :size="16">
|
||||
<Warning />
|
||||
</el-icon>
|
||||
<AppIcon iconName="app-warning" class="app-warning-icon"></AppIcon>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -280,25 +290,7 @@
|
|||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- 提示词 -->
|
||||
<el-dialog v-model="dialogFormVisible" title="提示词">
|
||||
<el-alert type="info" show-icon class="mb-16" :closable="false">
|
||||
<p>通过调整提示词内容,可以引导大模型聊天方向,该提示词会被固定在上下文的开头。</p>
|
||||
<p>可以使用变量:{data} 是携带知识库中已知信息;{question}是用户提出的问题。</p>
|
||||
</el-alert>
|
||||
<el-input
|
||||
v-model="model_setting_prompt"
|
||||
:rows="13"
|
||||
type="textarea"
|
||||
:placeholder="defaultPrompt"
|
||||
/>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="promptChange('close')"> 确认 </el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<AddDatasetDialog
|
||||
ref="AddDatasetDialogRef"
|
||||
@addData="addDataset"
|
||||
|
|
@ -375,7 +367,7 @@ const applicationForm = ref<ApplicationFormType>({
|
|||
max_paragraph_char_number: 5000
|
||||
},
|
||||
model_setting: {
|
||||
prompt: defaultPrompt
|
||||
prompt: ''
|
||||
},
|
||||
problem_optimization: false
|
||||
})
|
||||
|
|
@ -390,14 +382,12 @@ const rules = reactive<FormRules<ApplicationFormType>>({
|
|||
message: '请选择模型',
|
||||
trigger: 'change'
|
||||
}
|
||||
]
|
||||
],
|
||||
'model_setting.prompt': [{ required: true, message: '请输入提示词', trigger: 'blur' }]
|
||||
})
|
||||
const modelOptions = ref<any>(null)
|
||||
const providerOptions = ref<Array<Provider>>([])
|
||||
const datasetList = ref([])
|
||||
const dialogFormVisible = ref(false)
|
||||
|
||||
const model_setting_prompt = ref('')
|
||||
const dataset_setting = ref<any>({})
|
||||
|
||||
function datasetSettingChange(val: string) {
|
||||
|
|
@ -410,16 +400,6 @@ function datasetSettingChange(val: string) {
|
|||
}
|
||||
}
|
||||
|
||||
function promptChange(val: string) {
|
||||
if (val === 'open') {
|
||||
dialogFormVisible.value = true
|
||||
model_setting_prompt.value = applicationForm.value.model_setting.prompt
|
||||
} else if (val === 'close') {
|
||||
dialogFormVisible.value = false
|
||||
applicationForm.value.model_setting.prompt = model_setting_prompt.value
|
||||
}
|
||||
}
|
||||
|
||||
const submit = async (formEl: FormInstance | undefined) => {
|
||||
if (!formEl) return
|
||||
await formEl.validate((valid, fields) => {
|
||||
|
|
@ -551,9 +531,8 @@ onMounted(() => {
|
|||
height: 150px;
|
||||
}
|
||||
.dataset_setting {
|
||||
.form-item {
|
||||
background: var(--app-layout-bg-color);
|
||||
}
|
||||
color: var(--el-text-color-regular);
|
||||
font-weight: 400;
|
||||
}
|
||||
.custom-slider {
|
||||
:deep(.el-input-number.is-without-controls .el-input__wrapper) {
|
||||
|
|
|
|||
|
|
@ -36,7 +36,12 @@
|
|||
<div class="create-dataset__footer text-right border-t" v-if="active !== 2">
|
||||
<el-button @click="router.go(-1)" :disabled="loading">取消</el-button>
|
||||
<el-button @click="prev" v-if="active === 1" :disabled="loading">上一步</el-button>
|
||||
<el-button @click="next" type="primary" v-if="active === 0" :disabled="loading">
|
||||
<el-button
|
||||
@click="next"
|
||||
type="primary"
|
||||
v-if="active === 0"
|
||||
:disabled="loading || StepFirstRef?.loading"
|
||||
>
|
||||
创建并导入
|
||||
</el-button>
|
||||
<el-button @click="submit" type="primary" v-if="active === 1" :disabled="loading">
|
||||
|
|
@ -84,12 +89,16 @@ const StepFirstRef = ref()
|
|||
const StepSecondRef = ref()
|
||||
|
||||
const loading = ref(false)
|
||||
const disabled = ref(false)
|
||||
const active = ref(0)
|
||||
const successInfo = ref<any>(null)
|
||||
|
||||
async function next() {
|
||||
disabled.value = true
|
||||
if (await StepFirstRef.value?.onSubmit()) {
|
||||
if (active.value++ > 2) active.value = 0
|
||||
} else {
|
||||
disabled.value = false
|
||||
}
|
||||
}
|
||||
const prev = () => {
|
||||
|
|
|
|||
|
|
@ -117,6 +117,7 @@ async function submit() {
|
|||
const obj =
|
||||
detail.value.type === '1'
|
||||
? {
|
||||
application_id_list: application_id_list.value,
|
||||
...BaseFormRef.value.form,
|
||||
...form.value
|
||||
}
|
||||
|
|
|
|||
|
|
@ -167,7 +167,8 @@ const onSubmit = async () => {
|
|||
onMounted(() => {})
|
||||
|
||||
defineExpose({
|
||||
onSubmit
|
||||
onSubmit,
|
||||
loading
|
||||
})
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
|
|
|
|||
|
|
@ -36,9 +36,7 @@
|
|||
content="按照所选符号先后顺序做递归分割,分割结果超出分段长度将截取至分段长度。"
|
||||
placement="right"
|
||||
>
|
||||
<el-icon style="font-size: 16px">
|
||||
<Warning />
|
||||
</el-icon>
|
||||
<AppIcon iconName="app-warning" class="app-warning-icon"></AppIcon>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<div @click.stop>
|
||||
|
|
@ -210,8 +208,6 @@ defineExpose({
|
|||
}
|
||||
|
||||
&__form {
|
||||
|
||||
|
||||
.title {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
|
|
|
|||
|
|
@ -75,37 +75,39 @@
|
|||
<ParagraphDialog ref="ParagraphDialogRef" :title="title" @refresh="refresh" />
|
||||
</LayoutContainer>
|
||||
<div class="hit-test__operate p-24 pt-0">
|
||||
<el-popover :visible="popoverVisible" placement="top-start" :width="570" trigger="click">
|
||||
<el-popover :visible="popoverVisible" placement="right-end" :width="225" trigger="click">
|
||||
<template #reference>
|
||||
<el-button icon="Setting" class="mb-8" @click="settingChange('open')">参数设置</el-button>
|
||||
</template>
|
||||
<div class="flex">
|
||||
<div>
|
||||
相似度高于
|
||||
<el-input-number
|
||||
v-model="cloneForm.similarity"
|
||||
:min="0"
|
||||
:max="1"
|
||||
:precision="3"
|
||||
:step="0.1"
|
||||
controls-position="right"
|
||||
style="width: 100px"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="ml-16">
|
||||
返回 Top
|
||||
<el-input-number
|
||||
v-model="cloneForm.top_number"
|
||||
:min="1"
|
||||
:max="10"
|
||||
controls-position="right"
|
||||
style="width: 100px"
|
||||
/>
|
||||
个分段
|
||||
</div>
|
||||
<el-button class="ml-16" @click="popoverVisible = false">取消</el-button>
|
||||
<el-button class="ml-16" type="primary" @click="settingChange('close')">确认</el-button>
|
||||
<div class="mb-16">
|
||||
相似度高于
|
||||
<el-input-number
|
||||
size="small"
|
||||
v-model="cloneForm.similarity"
|
||||
:min="0"
|
||||
:max="1"
|
||||
:precision="3"
|
||||
:step="0.1"
|
||||
controls-position="right"
|
||||
style="width: 100px"
|
||||
/>
|
||||
</div>
|
||||
<div class="mb-16">
|
||||
返回 Top
|
||||
<el-input-number
|
||||
size="small"
|
||||
v-model="cloneForm.top_number"
|
||||
:min="1"
|
||||
:max="10"
|
||||
controls-position="right"
|
||||
style="width: 80px"
|
||||
/>
|
||||
个分段
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<el-button @click="popoverVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="settingChange('close')">确认</el-button>
|
||||
</div>
|
||||
</el-popover>
|
||||
<div class="operate-textarea flex">
|
||||
|
|
|
|||
|
|
@ -33,11 +33,12 @@
|
|||
<el-table-column prop="chat_record_count" label="对话提问数" align="right" />
|
||||
<el-table-column prop="star_num" align="right">
|
||||
<template #header>
|
||||
<div>
|
||||
<div class="flex align-center">
|
||||
<span>用户反馈</span>
|
||||
<el-popover :width="160" trigger="click" :visible="popoverVisible">
|
||||
<template #reference>
|
||||
<el-button
|
||||
style="margin-top: -2px;"
|
||||
:type="filter.min_star || filter.min_trample ? 'primary' : ''"
|
||||
link
|
||||
@click="popoverVisible = !popoverVisible"
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
<template #footer v-if="!problemId">
|
||||
<span class="dialog-footer">
|
||||
<el-button @click.prevent="dialogVisible = false"> 取消 </el-button>
|
||||
<el-button type="primary" @click="submitHandle"> 提交 </el-button>
|
||||
<el-button :disabled="loading" type="primary" @click="submitHandle"> 提交 </el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
|
|
|||
|
|
@ -74,10 +74,10 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { onMounted, ref, computed, watch } from 'vue'
|
||||
import ModelApi from '@/api/model'
|
||||
import type { Provider, Model } from '@/api/type/model'
|
||||
|
||||
import AppIcon from '@/components/icons/AppIcon.vue'
|
||||
import ModelCard from '@/views/template/component/ModelCard.vue'
|
||||
import { splitArray } from '@/utils/common'
|
||||
|
|
|
|||
Loading…
Reference in New Issue