mirror of
https://github.com/yangjian102621/geekai.git
synced 2026-03-03 02:34:27 +08:00
修改模型选择功能,提升用户体验
This commit is contained in:
@@ -24,6 +24,8 @@
|
||||
<el-tag type="success" v-else>聊天</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="category" label="模型类别" />
|
||||
<el-table-column prop="value" label="模型值">
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.value }}</span>
|
||||
@@ -32,6 +34,13 @@
|
||||
</el-icon>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="description" label="模型描述" width="180">
|
||||
<template #default="scope">
|
||||
<el-tooltip :content="scope.row.description || ''" placement="top" :show-after="200">
|
||||
<div class="description-cell">{{ scope.row.description }}</div>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="power" label="费率" />
|
||||
<el-table-column prop="max_tokens" label="最大响应长度" />
|
||||
<el-table-column prop="max_context" label="最大上下文长度" />
|
||||
@@ -78,6 +87,10 @@
|
||||
<el-input v-model="item.value" autocomplete="off" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="模型类别" prop="category">
|
||||
<el-input v-model="item.category" autocomplete="off" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="消耗算力:" prop="power">
|
||||
<template #label>
|
||||
<div class="flex items-center">
|
||||
@@ -111,6 +124,10 @@
|
||||
<el-input v-model.number="item.max_context" autocomplete="off" placeholder="模型最大上下文长度" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="模型描述" prop="description">
|
||||
<el-input v-model="item.description" autocomplete="off" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="创意度:" prop="temperature">
|
||||
<template #label>
|
||||
<div class="flex items-center">
|
||||
@@ -289,7 +306,7 @@ onUnmounted(() => {
|
||||
const add = function () {
|
||||
title.value = "新增模型";
|
||||
showDialog.value = true;
|
||||
item.value = { enabled: true, power: 1, open: true, max_tokens: 1024, max_context: 8192, temperature: 0.9, options: {} };
|
||||
item.value = { enabled: true, power: 1, open: true, description: "", max_tokens: 1024, max_context: 8192, temperature: 0.9 };
|
||||
};
|
||||
|
||||
const edit = function (row) {
|
||||
@@ -361,6 +378,13 @@ const remove = function (row) {
|
||||
}
|
||||
}
|
||||
|
||||
.description-cell {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 160px;
|
||||
}
|
||||
|
||||
.el-select {
|
||||
width: 100%
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user