chore: update ollama model options

This commit is contained in:
jialin
2024-07-24 16:50:06 +08:00
parent 8097ba0df9
commit 729f7785f0
5 changed files with 41 additions and 60 deletions
+18 -14
View File
@@ -71,20 +71,24 @@ const DeleteModal = forwardRef((props, ref) => {
</span>
</span>
</div>
<div className={Styles['content']}>
{config.content &&
intl.formatMessage(
{
id: config.selection
? 'common.delete.confirm'
: 'common.delete.single.confirm'
},
{
type: intl.formatMessage({ id: config.content }),
name: config.name
}
)}
</div>
<div
className={Styles['content']}
dangerouslySetInnerHTML={{
__html:
config.content &&
intl.formatMessage(
{
id: config.selection
? 'common.delete.confirm'
: 'common.delete.single.confirm'
},
{
type: intl.formatMessage({ id: config.content }),
name: config.name
}
)
}}
></div>
</Modal>
);
});
+2 -1
View File
@@ -183,7 +183,8 @@ export default {
'common.settings.language': 'Language',
'common.delete.confirm':
'Are you sure you want to delete the selected {type}?',
'common.delete.single.confirm': 'Are you sure you want to delete {name}?',
'common.delete.single.confirm':
'Are you sure you want to delete <span style="font-size: 13px;font-weight: 700">{name}</span>?',
'common.filter.name': 'Filter by name',
'common.form.password': 'Password',
'common.form.username': 'Username',
+2 -1
View File
@@ -176,7 +176,8 @@ export default {
'common.settings.instructions': '操作指引',
'common.settings.language': '语言',
'common.delete.confirm': '删除选中的{type},确定吗?',
'common.delete.single.confirm': '删除 {name},确定吗?',
'common.delete.single.confirm':
'删除 <span style="font-size: 13px;font-weight: 700">{name}</span>,确定吗?',
'common.filter.name': '名称查询',
'common.form.password': '密码',
'common.form.username': '用户名',
+3 -41
View File
@@ -2,11 +2,11 @@ import { StatusMaps } from '@/config';
import { EditOutlined } from '@ant-design/icons';
export const ollamaModelOptions = [
{ label: 'llama3.1', value: 'llama3.1' },
{ label: 'llama3', value: 'llama3' },
{ label: 'gemma', value: 'gemma' },
{ label: 'gemma2', value: 'gemma2' },
{ label: 'mistral', value: 'mistral' },
{ label: 'qwen', value: 'qwen' },
{ label: 'llama2', value: 'llama2' },
{ label: 'qwen2', value: 'qwen2' },
{ label: 'phi3', value: 'phi3' },
{ label: 'codellama', value: 'codellama' },
{ label: 'deepseek-coder', value: 'deepseek-coder' }
@@ -71,41 +71,3 @@ export const ActionList = [
icon: EditOutlined
}
];
export const columns = [
{
title: 'models.name',
dataIndex: 'name',
key: 'name'
},
{
title: 'models.type',
dataIndex: 'type',
key: 'type'
},
{
title: 'models.source',
dataIndex: 'source',
key: 'source'
},
{
title: 'models.status',
dataIndex: 'status',
key: 'status'
},
{
title: 'models.createdat',
dataIndex: 'createdAt',
key: 'createdAt'
},
{
title: 'models.updatedat',
dataIndex: 'updatedAt',
key: 'updatedAt'
},
{
title: 'models.action',
dataIndex: 'action',
key: 'action'
}
];
@@ -54,7 +54,7 @@ const ChatFooter: React.FC<ChatFooterProps> = (props) => {
return (
<div className="chat-footer">
<Row style={{ width: '100%' }}>
<Col lg={hasTokenResult ? 8 : 12} xs={24} sm={24} md={12}>
<Col lg={hasTokenResult ? 8 : 12} xs={24} sm={24} md={24}>
<Space size={20}>
<Button
disabled={disabled}
@@ -72,8 +72,21 @@ const ChatFooter: React.FC<ChatFooterProps> = (props) => {
</Button>
</Space>
</Col>
<Col span={hasTokenResult ? 8 : 0}>{feedback}</Col>
<Col span={hasTokenResult ? 8 : 12} style={{ textAlign: 'right' }}>
<Col
lg={hasTokenResult ? 8 : 0}
xs={hasTokenResult ? 24 : 0}
sm={hasTokenResult ? 24 : 0}
md={hasTokenResult ? 24 : 0}
>
{feedback}
</Col>
<Col
lg={hasTokenResult ? 8 : 12}
xs={24}
sm={24}
md={24}
style={{ textAlign: 'right' }}
>
<Space size={20}>
<Button
icon={