From 729f7785f055e321196c9276d7a46231e5febce8 Mon Sep 17 00:00:00 2001 From: jialin Date: Wed, 24 Jul 2024 16:49:04 +0800 Subject: [PATCH] chore: update ollama model options --- src/components/delete-modal/index.tsx | 32 ++++++++------ src/locales/en-US/common.ts | 3 +- src/locales/zh-CN/common.ts | 3 +- src/pages/llmodels/config/index.ts | 44 ++----------------- .../playground/components/chat-footer.tsx | 19 ++++++-- 5 files changed, 41 insertions(+), 60 deletions(-) diff --git a/src/components/delete-modal/index.tsx b/src/components/delete-modal/index.tsx index 26bd4004..1f2c7d15 100644 --- a/src/components/delete-modal/index.tsx +++ b/src/components/delete-modal/index.tsx @@ -71,20 +71,24 @@ const DeleteModal = forwardRef((props, ref) => { -
- {config.content && - intl.formatMessage( - { - id: config.selection - ? 'common.delete.confirm' - : 'common.delete.single.confirm' - }, - { - type: intl.formatMessage({ id: config.content }), - name: config.name - } - )} -
+
); }); diff --git a/src/locales/en-US/common.ts b/src/locales/en-US/common.ts index 3ab9c70d..1b12f98a 100644 --- a/src/locales/en-US/common.ts +++ b/src/locales/en-US/common.ts @@ -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 {name}?', 'common.filter.name': 'Filter by name', 'common.form.password': 'Password', 'common.form.username': 'Username', diff --git a/src/locales/zh-CN/common.ts b/src/locales/zh-CN/common.ts index 1116de91..ff51b364 100644 --- a/src/locales/zh-CN/common.ts +++ b/src/locales/zh-CN/common.ts @@ -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': + '删除 {name},确定吗?', 'common.filter.name': '名称查询', 'common.form.password': '密码', 'common.form.username': '用户名', diff --git a/src/pages/llmodels/config/index.ts b/src/pages/llmodels/config/index.ts index 0af0f925..824191b5 100644 --- a/src/pages/llmodels/config/index.ts +++ b/src/pages/llmodels/config/index.ts @@ -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' - } -]; diff --git a/src/pages/playground/components/chat-footer.tsx b/src/pages/playground/components/chat-footer.tsx index 2a2bce07..700bd130 100644 --- a/src/pages/playground/components/chat-footer.tsx +++ b/src/pages/playground/components/chat-footer.tsx @@ -54,7 +54,7 @@ const ChatFooter: React.FC = (props) => { return (
- + - {feedback} - + + {feedback} + +