chore: update iconfont static files

This commit is contained in:
jialin
2025-04-11 12:16:35 +08:00
parent 5b20a7edb8
commit b27ebaaccf
12 changed files with 392 additions and 127 deletions
@@ -29,6 +29,7 @@ import {
} from '../config';
import { useFormContext } from '../config/form-context';
import llamaConfig from '../config/llama-config';
import mindieConfig from '../config/mindie-config';
import { FormData } from '../config/types';
import vllmConfig from '../config/vllm-config';
import dataformStyles from '../style/data-form.less';
@@ -118,6 +119,9 @@ const AdvanceConfig: React.FC<AdvanceConfigProps> = (props) => {
if (backend === backendOptionsMap.vllm) {
return vllmConfig;
}
if (backend === backendOptionsMap.ascendMindie) {
return mindieConfig;
}
return [];
}, [backend]);
@@ -136,6 +140,7 @@ const AdvanceConfig: React.FC<AdvanceConfigProps> = (props) => {
link: 'https://docs.vllm.ai/en/stable/serving/openai_compatible_server.html#cli-reference'
};
}
return null;
}, [backend]);
@@ -11,35 +11,23 @@ import styled from 'styled-components';
import { modelCategoriesMap } from '../config';
const ApiAccessInfoWrapper = styled.div`
display: flex;
flex-direction: column;
gap: 12px;
display: grid;
padding-left: 20px;
.item {
grid-template-columns: max-content 1fr max-content;
gap: 12px 0px;
justify-items: start;
align-items: center;
.label {
font-weight: 600;
}
.value {
margin-left: 20px;
display: flex;
justify-content: space-between;
align-items: center;
.label-wrapper {
display: flex;
justify-content: flex-start;
align-items: center;
gap: 16px;
.label {
width: 86px;
font-weight: 600;
}
.value {
display: flex;
align-items: center;
color: var(--ant-color-text-secondary);
}
}
.copy-btn {
display: flex;
align-items: center;
gap: 4px;
}
color: var(--ant-color-text-secondary);
}
.copy-btn {
margin-left: 8px;
}
`;
@@ -129,67 +117,55 @@ const ApiAccessInfo = ({ open, data, onClose }: ApiAccessInfoProps) => {
</dl>
</Tips>
<ApiAccessInfoWrapper>
<div className="item">
<span className="label-wrapper">
<span className="label">
{intl.formatMessage({ id: 'models.table.apiAccessInfo.enpoint' })}
</span>
<span className="value">
<AutoTooltip ghost maxWidth={200}>
{endPoint}
</AutoTooltip>
<APITAG color="geekblue">
{intl.formatMessage({
id: isRanker
? 'models.table.apiAccessInfo.jinaCompatible'
: 'models.table.apiAccessInfo.openaiCompatible'
})}
</APITAG>
</span>
</span>
<span className="copy-btn">
<CopyButton text={endPoint} type="link" size="small"></CopyButton>
</span>
</div>
<div className="item">
<span className="label-wrapper">
<span className="label">
{intl.formatMessage({
id: 'models.table.apiAccessInfo.modelName'
})}
</span>
<span className="value">
<AutoTooltip ghost maxWidth={300}>
{data.name}
</AutoTooltip>
</span>
</span>
<span className="copy-btn">
<CopyButton text={data.name} type="link" size="small"></CopyButton>
</span>
</div>
<div className="item">
<span className="label-wrapper">
<span className="label">
{intl.formatMessage({ id: 'models.table.apiAccessInfo.apikey' })}
</span>
<span className="value">
<CreateButton
type="link"
size="small"
onClick={() => navigate('/api-keys')}
>
{intl.formatMessage({
id: 'models.table.apiAccessInfo.gotoCreate'
})}
<IconFont
type="icon-external-link"
className="font-size-14"
></IconFont>
</CreateButton>
</span>
</span>
</div>
<span className="label">
{intl.formatMessage({ id: 'models.table.apiAccessInfo.enpoint' })}
</span>
<span className="value">
<AutoTooltip ghost maxWidth={200}>
{endPoint}
</AutoTooltip>
<APITAG color="geekblue">
{intl.formatMessage({
id: isRanker
? 'models.table.apiAccessInfo.jinaCompatible'
: 'models.table.apiAccessInfo.openaiCompatible'
})}
</APITAG>
</span>
<span className="copy-btn">
<CopyButton text={endPoint} type="link" size="small"></CopyButton>
</span>
<span className="label">
{intl.formatMessage({
id: 'models.table.apiAccessInfo.modelName'
})}
</span>
<span className="value">
<AutoTooltip ghost maxWidth={300}>
{data.name}
</AutoTooltip>
</span>
<span className="copy-btn">
<CopyButton text={data.name} type="link" size="small"></CopyButton>
</span>
<span className="label">
{intl.formatMessage({ id: 'models.table.apiAccessInfo.apikey' })}
</span>
<span className="value">
<CreateButton
type="link"
size="small"
onClick={() => navigate('/api-keys')}
>
{intl.formatMessage({
id: 'models.table.apiAccessInfo.gotoCreate'
})}
<IconFont
type="icon-external-link"
className="font-size-14"
></IconFont>
</CreateButton>
</span>
</ApiAccessInfoWrapper>
</ScrollerModal>
);
@@ -0,0 +1,96 @@
const options = [
{
label: '--log-level',
value: '--log-level',
options: ['Verbose', 'Info', 'Warning', 'Warn', 'Error', 'Debug']
},
{
label: '--max-seq-len',
value: '--max-seq-len'
},
{
label: '--max-input-token-len',
value: '--max-input-token-len'
},
{
label: '--cpu-mem-size',
value: '--cpu-mem-size'
},
{
label: '--npu-memory-fraction',
value: '--npu-memory-fraction'
},
{
label: '--cache-block-size',
value: '--cache-block-size'
},
{
label: '--max-prefill-batch-size',
value: '--max-prefill-batch-size'
},
{
label: '--prefill-time-ms-per-req',
value: '--prefill-time-ms-per-req',
options: ['0', '1', '2', '3']
},
{
label: '--prefill-policy-type',
value: '--prefill-policy-type'
},
{
label: '--max-batch-size',
value: '--max-batch-size'
},
{
label: '--decode-time-ms-per-req',
value: '--decode-time-ms-per-req'
},
{
label: '--decode-policy-type',
value: '--decode-policy-type',
options: ['0', '1', '2', '3']
},
{
label: '--max-preempt-count',
value: '--max-preempt-count'
},
{
label: '--support-select-batch',
value: '--support-select-batch'
},
{
label: '--max-queue-delay-microseconds',
value: '--max-queue-delay-microseconds'
},
{
label: '--enable-prefix-caching',
value: '--enable-prefix-caching'
},
{
label: '--metrics',
value: '--metrics'
},
{
label: '--enforce-eager',
value: '--enforce-eager'
},
{
label: '--trust-remote-code',
value: '--trust-remote-code'
}
];
const resultList = options.map((option) => {
return {
label: option.label,
value: option.value,
opts: option.options?.map((opt) => {
return {
label: opt,
value: opt
};
})
};
});
export default resultList;