fix: do not update logs when viewing pre page

This commit is contained in:
jialin
2025-01-03 20:38:44 +08:00
parent 472ef1a231
commit 95058f7890
13 changed files with 164 additions and 64 deletions
+19 -1
View File
@@ -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]
+3 -1
View File
@@ -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' },