Merge branch 'main' of github.com:maxkb-dev/maxkb
This commit is contained in:
commit
4589555af6
@ -82,6 +82,10 @@ model_dict = {
|
|||||||
'llama2-chinese:13b-maxkb',
|
'llama2-chinese:13b-maxkb',
|
||||||
'由于Llama2本身的中文对齐较弱,我们采用中文指令集,对meta-llama/Llama-2-13b-chat-hf进行LoRA微调,使其具备较强的中文对话能力。fi2cloud专用',
|
'由于Llama2本身的中文对齐较弱,我们采用中文指令集,对meta-llama/Llama-2-13b-chat-hf进行LoRA微调,使其具备较强的中文对话能力。fi2cloud专用',
|
||||||
ModelTypeConst.LLM, ollama_llm_model_credential),
|
ModelTypeConst.LLM, ollama_llm_model_credential),
|
||||||
|
'baichuan2:13b-chat': ModelInfo(
|
||||||
|
'baichuan2:13b-chat',
|
||||||
|
'Baichuan 2 是百川智能推出的新一代开源大语言模型,采用 2.6 万亿 Tokens 的高质量语料训练,在权威的中文和英文 benchmark 上均取得同尺寸最好的效果',
|
||||||
|
ModelTypeConst.LLM, ollama_llm_model_credential),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "web",
|
"name": "web",
|
||||||
"version": "0.0.0",
|
"version": "v1.0.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
@ -37,55 +37,62 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
<el-dropdown-menu>
|
<el-scrollbar>
|
||||||
<template v-for="(item, index) in list" :key="index">
|
<div style="max-height: 400px">
|
||||||
<div :class="item.id === id ? 'dropdown-active' : ''">
|
<el-dropdown-menu>
|
||||||
<el-dropdown-item :command="item.id">
|
<template v-for="(item, index) in list" :key="index">
|
||||||
<div class="flex align-center">
|
<div :class="item.id === id ? 'dropdown-active' : ''">
|
||||||
<AppAvatar
|
<el-dropdown-item :command="item.id">
|
||||||
v-if="isApplication"
|
<div class="flex align-center">
|
||||||
:name="item.name"
|
<AppAvatar
|
||||||
pinyinColor
|
v-if="isApplication"
|
||||||
class="mr-12"
|
:name="item.name"
|
||||||
shape="square"
|
pinyinColor
|
||||||
:size="24"
|
class="mr-12"
|
||||||
/>
|
shape="square"
|
||||||
<AppAvatar
|
:size="24"
|
||||||
v-else-if="isDataset && item.type === '1'"
|
/>
|
||||||
class="mr-12 avatar-purple"
|
<AppAvatar
|
||||||
shape="square"
|
v-else-if="isDataset && item.type === '1'"
|
||||||
:size="24"
|
class="mr-12 avatar-purple"
|
||||||
>
|
shape="square"
|
||||||
<img src="@/assets/icon_web.svg" style="width: 58%" alt="" />
|
:size="24"
|
||||||
</AppAvatar>
|
>
|
||||||
<AppAvatar v-else class="mr-12" shape="square" :size="24">
|
<img src="@/assets/icon_web.svg" style="width: 58%" alt="" />
|
||||||
<img src="@/assets/icon_document.svg" style="width: 58%" alt="" />
|
</AppAvatar>
|
||||||
</AppAvatar>
|
<AppAvatar v-else class="mr-12" shape="square" :size="24">
|
||||||
<span class="ellipsis"> {{ item?.name }}</span>
|
<img src="@/assets/icon_document.svg" style="width: 58%" alt="" />
|
||||||
|
</AppAvatar>
|
||||||
|
<span class="ellipsis"> {{ item?.name }}</span>
|
||||||
|
</div>
|
||||||
|
</el-dropdown-item>
|
||||||
</div>
|
</div>
|
||||||
</el-dropdown-item>
|
</template>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
<div class="breadcrumb__footer border-t" style="padding: 8px 11px; min-width: 200px">
|
||||||
|
<template v-if="isApplication">
|
||||||
|
<div
|
||||||
|
class="w-full text-left cursor"
|
||||||
|
@click="router.push({ path: '/application/create' })"
|
||||||
|
>
|
||||||
|
<el-button link>
|
||||||
|
<el-icon class="mr-4"><Plus /></el-icon> 创建应用
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template v-else-if="isDataset">
|
||||||
|
<div
|
||||||
|
class="w-full text-left cursor"
|
||||||
|
@click="router.push({ path: '/dataset/create' })"
|
||||||
|
>
|
||||||
|
<el-button link>
|
||||||
|
<el-icon class="mr-4"><Plus /></el-icon> 创建知识库
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</div>
|
||||||
</el-dropdown-menu>
|
</el-scrollbar>
|
||||||
<div class="breadcrumb__footer border-t" style="padding: 8px 11px; min-width: 200px">
|
|
||||||
<template v-if="isApplication">
|
|
||||||
<div
|
|
||||||
class="w-full text-left cursor"
|
|
||||||
@click="router.push({ path: '/application/create' })"
|
|
||||||
>
|
|
||||||
<el-button link>
|
|
||||||
<el-icon class="mr-4"><Plus /></el-icon> 创建应用
|
|
||||||
</el-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<template v-else-if="isDataset">
|
|
||||||
<div class="w-full text-left cursor" @click="router.push({ path: '/dataset/create' })">
|
|
||||||
<el-button link>
|
|
||||||
<el-icon class="mr-4"><Plus /></el-icon> 创建知识库
|
|
||||||
</el-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -22,7 +22,9 @@
|
|||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
<div class="text-right p-24 pt-0" v-if="problemId && isEdit">
|
<div class="text-right p-24 pt-0" v-if="problemId && isEdit">
|
||||||
<el-button @click.prevent="cancelEdit"> 取消 </el-button>
|
<el-button @click.prevent="cancelEdit"> 取消 </el-button>
|
||||||
<el-button type="primary" :disabled="loading" @click="submitHandle"> 保存 </el-button>
|
<el-button type="primary" :disabled="loading" @click="handleDebounceClick">
|
||||||
|
保存
|
||||||
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8" class="border-l">
|
<el-col :span="8" class="border-l">
|
||||||
@ -38,7 +40,9 @@
|
|||||||
<template #footer v-if="!problemId">
|
<template #footer v-if="!problemId">
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button @click.prevent="dialogVisible = false"> 取消 </el-button>
|
<el-button @click.prevent="dialogVisible = false"> 取消 </el-button>
|
||||||
<el-button :disabled="loading" type="primary" @click="submitHandle"> 提交 </el-button>
|
<el-button :disabled="loading" type="primary" @click="handleDebounceClick">
|
||||||
|
提交
|
||||||
|
</el-button>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@ -46,7 +50,8 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, watch, nextTick } from 'vue'
|
import { ref, watch, nextTick } from 'vue'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
import { cloneDeep } from 'lodash'
|
import { cloneDeep, debounce } from 'lodash'
|
||||||
|
|
||||||
import ParagraphForm from '@/views/paragraph/component/ParagraphForm.vue'
|
import ParagraphForm from '@/views/paragraph/component/ParagraphForm.vue'
|
||||||
import ProblemComponent from '@/views/paragraph/component/ProblemComponent.vue'
|
import ProblemComponent from '@/views/paragraph/component/ProblemComponent.vue'
|
||||||
import paragraphApi from '@/api/paragraph'
|
import paragraphApi from '@/api/paragraph'
|
||||||
@ -108,8 +113,8 @@ const open = (data: any) => {
|
|||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
}
|
}
|
||||||
const submitHandle = async () => {
|
const submitHandle = async () => {
|
||||||
loading.value = true
|
|
||||||
if (await paragraphFormRef.value?.validate()) {
|
if (await paragraphFormRef.value?.validate()) {
|
||||||
|
loading.value = true
|
||||||
if (problemId.value) {
|
if (problemId.value) {
|
||||||
paragraph
|
paragraph
|
||||||
.asyncPutParagraph(
|
.asyncPutParagraph(
|
||||||
@ -138,6 +143,9 @@ const submitHandle = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const handleDebounceClick = debounce(() => {
|
||||||
|
submitHandle()
|
||||||
|
}, 200)
|
||||||
|
|
||||||
defineExpose({ open })
|
defineExpose({ open })
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user