Skip to content

perf: 优化模型类型显示 #845

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified ui/src/assets/theme/orange.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions ui/src/enums/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,10 @@ export enum PermissionDesc {
PRIVATE = '仅自己使用',
PUBLIC = '所有用户都可使用,不能编辑'
}

export enum modelType {
EMBEDDING = '向量模型',
LLM = '大语言模型'
}


3 changes: 2 additions & 1 deletion ui/src/views/template/component/ModelCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<ul>
<li class="flex mt-16">
<el-text type="info">模型类型</el-text>
<span class="ellipsis ml-16"> {{ model.model_type }}</span>
<span class="ellipsis ml-16"> {{ modelType[model.model_type as keyof typeof modelType] }}</span>
</li>
<li class="flex mt-12">
<el-text type="info">基础模型</el-text>
Expand Down Expand Up @@ -90,6 +90,7 @@ import { computed, ref, onMounted, onBeforeUnmount } from 'vue'
import EditModel from '@/views/template/component/EditModel.vue'
import DownloadLoading from '@/components/loading/DownloadLoading.vue'
import { MsgConfirm } from '@/utils/message'
import { modelType } from '@/enums/model'
import useStore from '@/stores'
const props = defineProps<{
model: Model
Expand Down
Loading