fix: do not update logs when viewing pre page
This commit is contained in:
@@ -23,7 +23,8 @@ import {
|
||||
EditOutlined,
|
||||
ExperimentOutlined,
|
||||
PictureOutlined,
|
||||
SyncOutlined
|
||||
SyncOutlined,
|
||||
WechatWorkOutlined
|
||||
} from '@ant-design/icons';
|
||||
import { PageContainer } from '@ant-design/pro-components';
|
||||
import { Access, useAccess, useIntl, useNavigate } from '@umijs/max';
|
||||
@@ -651,6 +652,23 @@ const Models: React.FC<ModelsProps> = ({
|
||||
</Tag>
|
||||
);
|
||||
}
|
||||
if (record.categories?.includes(modelCategoriesMap.llm)) {
|
||||
return (
|
||||
<Tag
|
||||
icon={<WechatWorkOutlined />}
|
||||
style={{
|
||||
margin: 0,
|
||||
opacity: 1,
|
||||
paddingInline: 8,
|
||||
borderRadius: 12,
|
||||
transform: 'scale(0.9)'
|
||||
}}
|
||||
color="green"
|
||||
>
|
||||
LLM
|
||||
</Tag>
|
||||
);
|
||||
}
|
||||
return null;
|
||||
},
|
||||
[intl]
|
||||
|
||||
@@ -248,11 +248,13 @@ export const modelCategoriesMap = {
|
||||
text_to_speech: 'text_to_speech',
|
||||
speech_to_text: 'speech_to_text',
|
||||
embedding: 'embedding',
|
||||
reranker: 'reranker'
|
||||
reranker: 'reranker',
|
||||
llm: 'llm'
|
||||
};
|
||||
|
||||
export const modelCategories = [
|
||||
{ label: 'common.options.auto', value: null, locale: true },
|
||||
{ label: 'LLM', value: modelCategoriesMap.llm },
|
||||
{ label: 'Image', value: 'image' },
|
||||
{ label: 'Text-to-speech', value: 'text_to_speech' },
|
||||
{ label: 'Speech-to-text', value: 'speech_to_text' },
|
||||
|
||||
Reference in New Issue
Block a user