update database info and fix dim bugs

This commit is contained in:
Wenjie Zhang 2024-09-11 01:09:03 +08:00
parent effa086c36
commit 5b1911fe83
2 changed files with 7 additions and 7 deletions

View File

@ -89,10 +89,10 @@
添加到知识库
</a-button>
<a-button @click="handleRefresh" :loading="state.refrashing">刷新状态</a-button>
<a-table :columns="columns" :data-source="database.files" row-key="file_id" class="my-table">
<a-table :columns="columns" :data-source="database.files" row-key="filename" class="my-table">
<template #bodyCell="{ column, text, record }">
<template v-if="column.key === 'file_id'">
<a-button class="main-btn" type="link" @click="openFileDetail(record)">{{ text.toUpperCase() }}</a-button>
<template v-if="column.key === 'filename'">
<a-button class="main-btn" type="link" @click="openFileDetail(record)">{{ text }}</a-button>
</template>
<template v-else-if="column.key === 'type'"><span :class="text">{{ text.toUpperCase() }}</span></template>
<template v-else-if="column.key === 'status' && text === 'done'">
@ -110,7 +110,7 @@
<template v-else-if="column.key === 'action'">
<a-button class="del-btn" type="link"
@click="deleteFile(text)"
:disabled="state.lock || record.status == 'processing' || record.status == 'waiting' "
:disabled="state.lock || record.status === 'processing' || record.status === 'waiting' "
>删除
</a-button>
</template>
@ -469,7 +469,7 @@ const addDocumentByFile = () => {
}
const columns = [
{ title: '文件ID', dataIndex: 'file_id', key: 'file_id' },
// { title: 'ID', dataIndex: 'file_id', key: 'file_id' },
{ title: '文件名', dataIndex: 'filename', key: 'filename' },
{ title: '上传时间', dataIndex: 'created_at', key: 'created_at' },
{ title: '状态', dataIndex: 'status', key: 'status' },

View File

@ -11,9 +11,9 @@
placeholder="新建数据库描述"
:auto-size="{ minRows: 2, maxRows: 5 }"
/>
<h3 style="margin-top: 20px;">向量维度</h3>
<!-- <h3 style="margin-top: 20px;">向量维度</h3>
<p>必须与向量模型 {{ configStore.config.embed_model }} 一致</p>
<a-input v-model:value="newDatabase.dimension" placeholder="向量维度 (e.g. 768, 1024)" />
<a-input v-model:value="newDatabase.dimension" placeholder="向量维度 (e.g. 768, 1024)" /> -->
<template #footer>
<a-button key="back" @click="newDatabase.open=false">取消</a-button>
<a-button key="submit" type="primary" :loading="newDatabase.loading" @click="createDatabase">创建</a-button>