chore: modelscope downloading state
This commit is contained in:
@@ -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<DataFormProps> = forwardRef((props, ref) => {
|
||||
options={ollamaModelOptions}
|
||||
label={intl.formatMessage({ id: 'model.form.ollama.model' })}
|
||||
placeholder={intl.formatMessage({ id: 'model.form.ollamaholder' })}
|
||||
addAfter={
|
||||
<Typography.Link
|
||||
href="https://www.ollama.com/library"
|
||||
target="_blank"
|
||||
>
|
||||
<Tooltip
|
||||
title={intl.formatMessage({ id: 'models.form.ollamalink' })}
|
||||
placement="topRight"
|
||||
>
|
||||
<IconFont
|
||||
type="icon-external-link"
|
||||
className="font-size-14"
|
||||
></IconFont>
|
||||
</Tooltip>
|
||||
</Typography.Link>
|
||||
}
|
||||
required
|
||||
></SealAutoComplete>
|
||||
</Form.Item>
|
||||
|
||||
@@ -254,9 +254,17 @@ const InstanceItem: React.FC<InstanceItemProps> = ({
|
||||
: 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
|
||||
}}
|
||||
></StatusTag>
|
||||
)}
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user