perf: Optimize markdown image style
parent
902f5dd2d5
commit
2a88651610
|
|
@ -31,6 +31,12 @@
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.el-button--text {
|
||||||
|
border: none !important;
|
||||||
|
&:focus {
|
||||||
|
border: none !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
.el-button--large {
|
.el-button--large {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,15 @@
|
||||||
}
|
}
|
||||||
img {
|
img {
|
||||||
border: 0 !important;
|
border: 0 !important;
|
||||||
|
max-width: 360px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media only screen and (max-width: 768px) {
|
||||||
|
.md-editor-preview {
|
||||||
|
img {
|
||||||
|
max-width: 100% !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
<div class="flex-between">
|
<div class="flex-between">
|
||||||
<el-upload
|
<el-upload
|
||||||
:file-list="[]"
|
:file-list="[]"
|
||||||
class="flex-between"
|
class="flex-between mr-12"
|
||||||
action="#"
|
action="#"
|
||||||
multiple
|
multiple
|
||||||
:auto-upload="false"
|
:auto-upload="false"
|
||||||
|
|
@ -275,18 +275,18 @@ function mapToUrlParams(map: any[]) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function getAccessToken(id: string) {
|
function getAccessToken(id: string) {
|
||||||
applicationList.value.filter((app)=>app.id === id)[0]?.work_flow?.nodes
|
applicationList.value
|
||||||
?.filter((v: any) => v.id === 'base-node')
|
.filter((app) => app.id === id)[0]
|
||||||
.map((v: any) => {
|
?.work_flow?.nodes?.filter((v: any) => v.id === 'base-node')
|
||||||
apiInputParams.value = v.properties.api_input_field_list
|
.map((v: any) => {
|
||||||
? v.properties.api_input_field_list
|
apiInputParams.value = v.properties.api_input_field_list
|
||||||
.map((v: any) => {
|
? v.properties.api_input_field_list.map((v: any) => {
|
||||||
return {
|
return {
|
||||||
name: v.variable,
|
name: v.variable,
|
||||||
value: v.default_value
|
value: v.default_value
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
: v.properties.input_field_list
|
: v.properties.input_field_list
|
||||||
? v.properties.input_field_list
|
? v.properties.input_field_list
|
||||||
.filter((v: any) => v.assignment_method === 'api_input')
|
.filter((v: any) => v.assignment_method === 'api_input')
|
||||||
.map((v: any) => {
|
.map((v: any) => {
|
||||||
|
|
@ -296,9 +296,11 @@ function getAccessToken(id: string) {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
: []
|
: []
|
||||||
})
|
})
|
||||||
|
|
||||||
const apiParams = mapToUrlParams(apiInputParams.value) ? '?' + mapToUrlParams(apiInputParams.value) : ''
|
const apiParams = mapToUrlParams(apiInputParams.value)
|
||||||
|
? '?' + mapToUrlParams(apiInputParams.value)
|
||||||
|
: ''
|
||||||
application.asyncGetAccessToken(id, loading).then((res: any) => {
|
application.asyncGetAccessToken(id, loading).then((res: any) => {
|
||||||
window.open(application.location + res?.data?.access_token + apiParams)
|
window.open(application.location + res?.data?.access_token + apiParams)
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,9 @@
|
||||||
<el-tooltip effect="dark" placement="right">
|
<el-tooltip effect="dark" placement="right">
|
||||||
<template #content>
|
<template #content>
|
||||||
<p>大语言模型:在应用中与AI对话的推理模型。</p>
|
<p>大语言模型:在应用中与AI对话的推理模型。</p>
|
||||||
<p>向量模型:在知识库中导入文档进行向量化和向量检索召回分段时使用的向量模型。</p>
|
<p>
|
||||||
|
向量模型:在知识库中导入文档进行向量化和向量检索召回分段时使用的向量模型。
|
||||||
|
</p>
|
||||||
<p>
|
<p>
|
||||||
重排模型:在二次召回中根据召回的候选分段和用户问题的匹配度重新排序,从而得到更精确的结果。
|
重排模型:在二次召回中根据召回的候选分段和用户问题的匹配度重新排序,从而得到更精确的结果。
|
||||||
</p>
|
</p>
|
||||||
|
|
@ -155,13 +157,17 @@
|
||||||
</DynamicsForm>
|
</DynamicsForm>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="高级设置" name="advanced-info">
|
<el-tab-pane label="高级设置" name="advanced-info">
|
||||||
<div class="flex-between">
|
<div class="flex-between mb-8">
|
||||||
<h5>模型参数</h5>
|
<h5>模型参数</h5>
|
||||||
<el-button type="text" @click="openAddDrawer()" :disabled="form_data.model_type !== 'LLM' && form_data.model_type !== 'IMAGE' && form_data.model_type !== 'TTS' && form_data.model_type !== 'TTI'">
|
<el-button type="text" @click.stop="openAddDrawer()">
|
||||||
<AppIcon iconName="Plus" class="add-icon" />添加
|
<AppIcon iconName="Plus" class="add-icon" />添加
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-table :data="base_form_data.model_params_form" v-if="base_form_data.model_params_form?.length > 0" class="mb-16">
|
<el-table
|
||||||
|
:data="base_form_data.model_params_form"
|
||||||
|
v-if="base_form_data.model_params_form?.length > 0"
|
||||||
|
class="mb-16"
|
||||||
|
>
|
||||||
<el-table-column prop="label" label="显示名称" show-overflow-tooltip>
|
<el-table-column prop="label" label="显示名称" show-overflow-tooltip>
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<span v-if="row.label && row.label.input_type === 'TooltipLabel'">{{
|
<span v-if="row.label && row.label.input_type === 'TooltipLabel'">{{
|
||||||
|
|
@ -216,7 +222,6 @@
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<AddParamDrawer ref="AddParamRef" @refresh="refresh" />
|
<AddParamDrawer ref="AddParamRef" @refresh="refresh" />
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed } from 'vue'
|
import { ref, computed } from 'vue'
|
||||||
|
|
@ -245,7 +250,6 @@ const dialogVisible = ref<boolean>(false)
|
||||||
const activeName = ref('base-info')
|
const activeName = ref('base-info')
|
||||||
const AddParamRef = ref()
|
const AddParamRef = ref()
|
||||||
|
|
||||||
|
|
||||||
const base_form_data_rule = ref<FormRules>({
|
const base_form_data_rule = ref<FormRules>({
|
||||||
name: { required: true, trigger: 'blur', message: '模型名称不能为空' },
|
name: { required: true, trigger: 'blur', message: '模型名称不能为空' },
|
||||||
permission_type: { required: true, trigger: 'change', message: '权限不能为空' },
|
permission_type: { required: true, trigger: 'change', message: '权限不能为空' },
|
||||||
|
|
@ -296,10 +300,14 @@ const getModelForm = (model_name: string) => {
|
||||||
dynamicsFormRef.value?.render(model_form_field.value, undefined)
|
dynamicsFormRef.value?.render(model_form_field.value, undefined)
|
||||||
})
|
})
|
||||||
|
|
||||||
ModelApi.listBaseModelParamsForm(providerValue.value.provider, form_data.value.model_type, model_name, base_model_loading)
|
ModelApi.listBaseModelParamsForm(
|
||||||
.then((ok) => {
|
providerValue.value.provider,
|
||||||
base_form_data.value.model_params_form = ok.data
|
form_data.value.model_type,
|
||||||
})
|
model_name,
|
||||||
|
base_model_loading
|
||||||
|
).then((ok) => {
|
||||||
|
base_form_data.value.model_params_form = ok.data
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -325,7 +333,13 @@ const list_base_model = (model_type: any, change?: boolean) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const close = () => {
|
const close = () => {
|
||||||
base_form_data.value = { name: '', model_type: '', model_name: '', permission_type: 'PRIVATE', model_params_form: [] }
|
base_form_data.value = {
|
||||||
|
name: '',
|
||||||
|
model_type: '',
|
||||||
|
model_name: '',
|
||||||
|
permission_type: 'PRIVATE',
|
||||||
|
model_params_form: []
|
||||||
|
}
|
||||||
credential_form_data.value = {}
|
credential_form_data.value = {}
|
||||||
model_form_field.value = []
|
model_form_field.value = []
|
||||||
base_model_list.value = []
|
base_model_list.value = []
|
||||||
|
|
@ -386,7 +400,6 @@ function refresh(data: any, index: any) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const toSelectProvider = () => {
|
const toSelectProvider = () => {
|
||||||
close()
|
close()
|
||||||
emit('change')
|
emit('change')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue