diff --git a/config/config.ts b/config/config.ts index 9dbc3ccd..36546891 100644 --- a/config/config.ts +++ b/config/config.ts @@ -14,7 +14,7 @@ const isProduction = env === 'production'; const t = Date.now(); export default defineConfig({ proxy: { - ...proxy('http://192.168.50.166:8080') + ...proxy() }, history: { type: 'hash' diff --git a/src/components/status-tag/index.tsx b/src/components/status-tag/index.tsx index bcabe3ff..e858ccae 100644 --- a/src/components/status-tag/index.tsx +++ b/src/components/status-tag/index.tsx @@ -52,7 +52,7 @@ const StatusTag: React.FC = ({ const renderContent = () => { const percent = download?.percent || 0; - if (download && percent > 0 && percent < 100) { + if (download && percent > 0 && percent <= 100) { return ( <> {download?.percent || 0}% diff --git a/src/global.less b/src/global.less index b442f879..daa66a67 100644 --- a/src/global.less +++ b/src/global.less @@ -283,7 +283,7 @@ body { // form item help .ant-form-item-with-help .ant-form-item-explain { - padding-left: 24px; + padding-left: 16px; } // icon @@ -536,6 +536,10 @@ body { } } +.rc-virtual-list-scrollbar { + width: var(--scrollbar-size) !important; +} + .ant-dropdown-menu .ant-dropdown-menu-item.ant-dropdown-menu-item-danger:not( .ant-dropdown-menu-item-disabled @@ -671,6 +675,10 @@ body { } } +.ant-drawer .ant-drawer-title { + font-weight: var(--font-weight-bold); +} + .tooltip-wrapper { display: flex; flex-direction: column; diff --git a/src/locales/en-US/models.ts b/src/locales/en-US/models.ts index 24aa405f..ca20aa80 100644 --- a/src/locales/en-US/models.ts +++ b/src/locales/en-US/models.ts @@ -59,5 +59,6 @@ export default { 'models.form.backend': 'Backend', 'models.form.backend_parameters': 'Backend Parameters', 'models.search.gguf.tips': '1. GGUF model backend is llama-box(llama.cpp).', - 'models.search.vllm.tips': '2. Non-GGUF model backend is vLLM.' + 'models.search.vllm.tips': '2. Non-GGUF model backend is vLLM.', + 'models.form.ollamalink': 'Find More in Ollama Library' }; diff --git a/src/locales/zh-CN/models.ts b/src/locales/zh-CN/models.ts index da8f92bb..0dc61ddb 100644 --- a/src/locales/zh-CN/models.ts +++ b/src/locales/zh-CN/models.ts @@ -58,5 +58,6 @@ export default { 'models.form.backend': '后端', 'models.form.backend_parameters': '后端参数', 'models.search.gguf.tips': '1. GGUF 模型后端为 llama-box(llama.cpp)', - 'models.search.vllm.tips': '2. 非 GGUF 模型后端为 vLLM' + 'models.search.vllm.tips': '2. 非 GGUF 模型后端为 vLLM', + 'models.form.ollamalink': '在 Ollama Library 中查找' }; diff --git a/src/pages/api-keys/components/add-apikey.tsx b/src/pages/api-keys/components/add-apikey.tsx index 8c586cbf..430fbaed 100644 --- a/src/pages/api-keys/components/add-apikey.tsx +++ b/src/pages/api-keys/components/add-apikey.tsx @@ -185,6 +185,7 @@ const AddModal: React.FC = ({
diff --git a/src/pages/llmodels/components/data-form.tsx b/src/pages/llmodels/components/data-form.tsx index e93fcb20..8c0a8071 100644 --- a/src/pages/llmodels/components/data-form.tsx +++ b/src/pages/llmodels/components/data-form.tsx @@ -1,10 +1,11 @@ +import IconFont from '@/components/icon-font'; import SealAutoComplete from '@/components/seal-form/auto-complete'; import SealInput from '@/components/seal-form/seal-input'; import SealSelect from '@/components/seal-form/seal-select'; import { PageAction } from '@/config'; import { PageActionType } from '@/config/types'; import { useIntl } from '@umijs/max'; -import { Form } from 'antd'; +import { Form, Tooltip, Typography } from 'antd'; import _ from 'lodash'; import React, { forwardRef, @@ -222,6 +223,22 @@ const DataForm: React.FC = forwardRef((props, ref) => { options={ollamaModelOptions} label={intl.formatMessage({ id: 'model.form.ollama.model' })} placeholder={intl.formatMessage({ id: 'model.form.ollamaholder' })} + addAfter={ + + + + + + } required > diff --git a/src/pages/llmodels/components/instance-item.tsx b/src/pages/llmodels/components/instance-item.tsx index bdc14a4b..06b873b3 100644 --- a/src/pages/llmodels/components/instance-item.tsx +++ b/src/pages/llmodels/components/instance-item.tsx @@ -254,9 +254,17 @@ const InstanceItem: React.FC = ({ : undefined } statusValue={{ - status: status[item.state] as any, + status: + item.state === InstanceStatusMap.Downloading && + item.download_progress === 100 + ? status[InstanceStatusMap.Running] + : (status[item.state] as any), text: InstanceStatusMapValue[item.state], - message: item.state_message + message: + item.state === InstanceStatusMap.Downloading && + item.download_progress === 100 + ? '' + : item.state_message }} > )} diff --git a/src/pages/llmodels/config/index.ts b/src/pages/llmodels/config/index.ts index e4b306ac..adb690f6 100644 --- a/src/pages/llmodels/config/index.ts +++ b/src/pages/llmodels/config/index.ts @@ -16,13 +16,6 @@ export const ollamaModelOptions = [ tags: ['Tools', '0.5B', '1.5B', '3B', '7B', '14B', '32B', '72B'], id: 'gemma2' }, - { - label: 'llama3.1', - value: 'llama3.1', - name: 'llama3.1', - id: 'llama3.1', - tags: ['8B', '70B', '405B'] - }, { label: 'gemma2', value: 'gemma2', @@ -30,13 +23,6 @@ export const ollamaModelOptions = [ tags: ['2B', '9B', '27B'], id: 'gemma2' }, - { - label: 'llava', - value: 'llava', - name: 'llava', - tags: ['7B', '13B', '34B'], - id: 'llava' - }, { label: 'mistral-nemo', value: 'mistral-nemo', @@ -58,13 +44,6 @@ export const ollamaModelOptions = [ tags: ['7B'], id: 'mistral' }, - { - label: 'qwen2', - value: 'qwen2', - name: 'qwen2', - tags: ['0.5B', '1.5B', '7B', '72B'], - id: 'qwen2' - }, { label: 'phi3.5', value: 'phi3.5',