diff --git a/.eslintignore b/.eslintignore index 93f1b3dd..bf4091e3 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1 +1 @@ -src/components/icon-font/iconfont.js +src/components/icon-font/iconfont/iconfont.js diff --git a/src/components/icon-font/iconfont/iconfont.css b/src/components/icon-font/iconfont/iconfont.css index 494a0708..afd05784 100644 --- a/src/components/icon-font/iconfont/iconfont.css +++ b/src/components/icon-font/iconfont/iconfont.css @@ -1,9 +1,9 @@ @font-face { font-family: iconfont; /* Project id 4613488 */ src: - url('iconfont.woff2?t=1737340346059') format('woff2'), - url('iconfont.woff?t=1737340346059') format('woff'), - url('iconfont.ttf?t=1737340346059') format('truetype'); + url('iconfont.woff2?t=1744337857781') format('woff2'), + url('iconfont.woff?t=1744337857781') format('woff'), + url('iconfont.ttf?t=1744337857781') format('truetype'); } .iconfont { @@ -14,6 +14,74 @@ -moz-osx-font-smoothing: grayscale; } +.icon-uncollapse_all::before { + content: '\e657'; +} + +.icon-collapse::before { + content: '\e656'; +} + +.icon-rocket-launch::before { + content: '\e689'; +} + +.icon-user-filled::before { + content: '\e625'; +} + +.icon-assistant::before { + content: '\e62d'; +} + +.icon-assistant-filled::before { + content: '\e847'; +} + +.icon-save3::before { + content: '\e655'; +} + +.icon-fankuifaqs::before { + content: '\e7bf'; +} + +.icon-issues::before { + content: '\e816'; +} + +.icon-neicun::before { + content: '\e688'; +} + +.icon-collapse_all::before { + content: '\e66f'; +} + +.icon-down::before { + content: '\e654'; +} + +.icon-fenxiang::before { + content: '\e604'; +} + +.icon-mosaic-2::before { + content: '\e64f'; +} + +.icon-stars::before { + content: '\e8a8'; +} + +.icon-mosaic::before { + content: '\e636'; +} + +.icon-outline-play::before { + content: '\e653'; +} + .icon-SelectionInverse::before { content: '\eace'; } diff --git a/src/components/icon-font/iconfont/iconfont.js b/src/components/icon-font/iconfont/iconfont.js index 3c878548..32c6ec9d 100644 --- a/src/components/icon-font/iconfont/iconfont.js +++ b/src/components/icon-font/iconfont/iconfont.js @@ -1,70 +1,70 @@ (window._iconfont_svg_string_4613488 = - ''), + ''), ((h) => { - var a = (l = (l = document.getElementsByTagName('script'))[ - l.length - 1 + var l = (a = (a = document.getElementsByTagName('script'))[ + a.length - 1 ]).getAttribute('data-injectcss'), - l = l.getAttribute('data-disable-injectsvg'); - if (!l) { + a = a.getAttribute('data-disable-injectsvg'); + if (!a) { var c, - z, v, + z, t, i, - m = function (a, l) { - l.parentNode.insertBefore(a, l); + o = function (l, a) { + a.parentNode.insertBefore(l, a); }; - if (a && !h.__iconfont__svg__cssinject__) { + if (l && !h.__iconfont__svg__cssinject__) { h.__iconfont__svg__cssinject__ = !0; try { document.write( '' ); - } catch (a) { - console && console.log(a); + } catch (l) { + console && console.log(l); } } (c = function () { - var a, - l = document.createElement('div'); - (l.innerHTML = h._iconfont_svg_string_4613488), - (l = l.getElementsByTagName('svg')[0]) && - (l.setAttribute('aria-hidden', 'true'), - (l.style.position = 'absolute'), - (l.style.width = 0), - (l.style.height = 0), - (l.style.overflow = 'hidden'), - (l = l), - (a = document.body).firstChild - ? m(l, a.firstChild) - : a.appendChild(l)); + var l, + a = document.createElement('div'); + (a.innerHTML = h._iconfont_svg_string_4613488), + (a = a.getElementsByTagName('svg')[0]) && + (a.setAttribute('aria-hidden', 'true'), + (a.style.position = 'absolute'), + (a.style.width = 0), + (a.style.height = 0), + (a.style.overflow = 'hidden'), + (a = a), + (l = document.body).firstChild + ? o(a, l.firstChild) + : l.appendChild(a)); }), document.addEventListener ? ~['complete', 'loaded', 'interactive'].indexOf(document.readyState) ? setTimeout(c, 0) - : ((z = function () { - document.removeEventListener('DOMContentLoaded', z, !1), c(); + : ((v = function () { + document.removeEventListener('DOMContentLoaded', v, !1), c(); }), - document.addEventListener('DOMContentLoaded', z, !1)) + document.addEventListener('DOMContentLoaded', v, !1)) : document.attachEvent && - ((v = c), + ((z = c), (t = h.document), (i = !1), p(), (t.onreadystatechange = function () { 'complete' == t.readyState && - ((t.onreadystatechange = null), o()); + ((t.onreadystatechange = null), m()); })); } - function o() { - i || ((i = !0), v()); + function m() { + i || ((i = !0), z()); } function p() { try { t.documentElement.doScroll('left'); - } catch (a) { + } catch (l) { return void setTimeout(p, 50); } - o(); + m(); } })(window); diff --git a/src/components/icon-font/iconfont/iconfont.json b/src/components/icon-font/iconfont/iconfont.json index f214cb71..b023f5a4 100644 --- a/src/components/icon-font/iconfont/iconfont.json +++ b/src/components/icon-font/iconfont/iconfont.json @@ -5,6 +5,125 @@ "css_prefix_text": "icon-", "description": "", "glyphs": [ + { + "icon_id": "43808249", + "name": "uncollapse_all", + "font_class": "uncollapse_all", + "unicode": "e657", + "unicode_decimal": 58967 + }, + { + "icon_id": "43807590", + "name": "collapse", + "font_class": "collapse", + "unicode": "e656", + "unicode_decimal": 58966 + }, + { + "icon_id": "22575690", + "name": "rocket-launch", + "font_class": "rocket-launch", + "unicode": "e689", + "unicode_decimal": 59017 + }, + { + "icon_id": "6050653", + "name": "user", + "font_class": "user-filled", + "unicode": "e625", + "unicode_decimal": 58917 + }, + { + "icon_id": "37486588", + "name": "assistant", + "font_class": "assistant", + "unicode": "e62d", + "unicode_decimal": 58925 + }, + { + "icon_id": "43220044", + "name": "AIAssistant", + "font_class": "assistant-filled", + "unicode": "e847", + "unicode_decimal": 59463 + }, + { + "icon_id": "43626126", + "name": "save", + "font_class": "save3", + "unicode": "e655", + "unicode_decimal": 58965 + }, + { + "icon_id": "20186129", + "name": "反馈faqs", + "font_class": "fankuifaqs", + "unicode": "e7bf", + "unicode_decimal": 59327 + }, + { + "icon_id": "42800361", + "name": "issues", + "font_class": "issues", + "unicode": "e816", + "unicode_decimal": 59414 + }, + { + "icon_id": "8211955", + "name": "ram", + "font_class": "neicun", + "unicode": "e688", + "unicode_decimal": 59016 + }, + { + "icon_id": "37125227", + "name": "collapse_all", + "font_class": "collapse_all", + "unicode": "e66f", + "unicode_decimal": 58991 + }, + { + "icon_id": "43363249", + "name": "down", + "font_class": "down", + "unicode": "e654", + "unicode_decimal": 58964 + }, + { + "icon_id": "159932", + "name": "search", + "font_class": "fenxiang", + "unicode": "e604", + "unicode_decimal": 58884 + }, + { + "icon_id": "40678285", + "name": "mosaic", + "font_class": "mosaic-2", + "unicode": "e64f", + "unicode_decimal": 58959 + }, + { + "icon_id": "22859935", + "name": "stars", + "font_class": "stars", + "unicode": "e8a8", + "unicode_decimal": 59560 + }, + { + "icon_id": "39566959", + "name": "mosaic", + "font_class": "mosaic", + "unicode": "e636", + "unicode_decimal": 58934 + }, + { + "icon_id": "43256197", + "name": "play circle", + "font_class": "outline-play", + "unicode": "e653", + "unicode_decimal": 58963 + }, { "icon_id": "27116743", "name": "SelectionInverse", diff --git a/src/components/icon-font/iconfont/iconfont.ttf b/src/components/icon-font/iconfont/iconfont.ttf index c80e7bb2..c84ac48f 100644 Binary files a/src/components/icon-font/iconfont/iconfont.ttf and b/src/components/icon-font/iconfont/iconfont.ttf differ diff --git a/src/components/icon-font/iconfont/iconfont.woff b/src/components/icon-font/iconfont/iconfont.woff index 079613ec..7bef8dc4 100644 Binary files a/src/components/icon-font/iconfont/iconfont.woff and b/src/components/icon-font/iconfont/iconfont.woff differ diff --git a/src/components/icon-font/iconfont/iconfont.woff2 b/src/components/icon-font/iconfont/iconfont.woff2 index 10dfa0dc..52113ff2 100644 Binary files a/src/components/icon-font/iconfont/iconfont.woff2 and b/src/components/icon-font/iconfont/iconfont.woff2 differ diff --git a/src/components/icon-font/index.tsx b/src/components/icon-font/index.tsx index bf7779b6..2c4fbc7b 100644 --- a/src/components/icon-font/index.tsx +++ b/src/components/icon-font/index.tsx @@ -1,8 +1,8 @@ import { createFromIconfontCN } from '@ant-design/icons'; -// import './iconfont/iconfont.js'; +import './iconfont/iconfont.js'; const IconFont = createFromIconfontCN({ - scriptUrl: '//at.alicdn.com/t/c/font_4613488_hlvsvytu57b.js' + scriptUrl: '' }); export default IconFont; diff --git a/src/pages/llmodels/components/advance-config.tsx b/src/pages/llmodels/components/advance-config.tsx index 45f5ad8e..436cd230 100644 --- a/src/pages/llmodels/components/advance-config.tsx +++ b/src/pages/llmodels/components/advance-config.tsx @@ -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 = (props) => { if (backend === backendOptionsMap.vllm) { return vllmConfig; } + if (backend === backendOptionsMap.ascendMindie) { + return mindieConfig; + } return []; }, [backend]); @@ -136,6 +140,7 @@ const AdvanceConfig: React.FC = (props) => { link: 'https://docs.vllm.ai/en/stable/serving/openai_compatible_server.html#cli-reference' }; } + return null; }, [backend]); diff --git a/src/pages/llmodels/components/api-access-info.tsx b/src/pages/llmodels/components/api-access-info.tsx index f779a050..6828d19c 100644 --- a/src/pages/llmodels/components/api-access-info.tsx +++ b/src/pages/llmodels/components/api-access-info.tsx @@ -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) => { -
- - - {intl.formatMessage({ id: 'models.table.apiAccessInfo.enpoint' })} - - - - {endPoint} - - - {intl.formatMessage({ - id: isRanker - ? 'models.table.apiAccessInfo.jinaCompatible' - : 'models.table.apiAccessInfo.openaiCompatible' - })} - - - - - - -
-
- - - {intl.formatMessage({ - id: 'models.table.apiAccessInfo.modelName' - })} - - - - {data.name} - - - - - - -
-
- - - {intl.formatMessage({ id: 'models.table.apiAccessInfo.apikey' })} - - - navigate('/api-keys')} - > - {intl.formatMessage({ - id: 'models.table.apiAccessInfo.gotoCreate' - })} - - - - -
+ + {intl.formatMessage({ id: 'models.table.apiAccessInfo.enpoint' })} + + + + {endPoint} + + + {intl.formatMessage({ + id: isRanker + ? 'models.table.apiAccessInfo.jinaCompatible' + : 'models.table.apiAccessInfo.openaiCompatible' + })} + + + + + + + {intl.formatMessage({ + id: 'models.table.apiAccessInfo.modelName' + })} + + + + {data.name} + + + + + + + {intl.formatMessage({ id: 'models.table.apiAccessInfo.apikey' })} + + + navigate('/api-keys')} + > + {intl.formatMessage({ + id: 'models.table.apiAccessInfo.gotoCreate' + })} + + +
); diff --git a/src/pages/llmodels/config/mindie-config.ts b/src/pages/llmodels/config/mindie-config.ts new file mode 100644 index 00000000..70ec1287 --- /dev/null +++ b/src/pages/llmodels/config/mindie-config.ts @@ -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; diff --git a/src/pages/resources/components/gpus.tsx b/src/pages/resources/components/gpus.tsx index d237b8bf..179ad44c 100644 --- a/src/pages/resources/components/gpus.tsx +++ b/src/pages/resources/components/gpus.tsx @@ -95,9 +95,10 @@ const GPUList: React.FC = () => { title={intl.formatMessage({ id: 'common.table.name' })} dataIndex="name" key="name" + width={240} render={(text, record) => { return ( - + {text} );