chore: backend description
This commit is contained in:
@@ -15,7 +15,13 @@ const NoteInfo: React.FC<NoteInfoProps> = (props) => {
|
||||
return (
|
||||
<span className="label-text">
|
||||
{description ? (
|
||||
<Tooltip title={description}>
|
||||
<Tooltip
|
||||
title={description}
|
||||
overlayInnerStyle={{
|
||||
maxWidth: 'var(--width-tooltip-max)',
|
||||
width: 'max-content'
|
||||
}}
|
||||
>
|
||||
<span>{label}</span>
|
||||
<span className="note-info">
|
||||
{required && (
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { useIntl } from '@umijs/max';
|
||||
import React from 'react';
|
||||
import styled from 'styled-components';
|
||||
import OverlayScroller from '../overlay-scroller';
|
||||
|
||||
const UL = styled.ul`
|
||||
list-style: none;
|
||||
@@ -30,23 +31,25 @@ const TooltipList: React.FC<TooltipListProps> = (props) => {
|
||||
const intl = useIntl();
|
||||
const { list } = props;
|
||||
return (
|
||||
<UL>
|
||||
{list.map((item, index: number) => {
|
||||
return (
|
||||
<li key={index}>
|
||||
<span className="title">
|
||||
{item.title?.locale
|
||||
? intl.formatMessage({ id: item.title?.text || '' })
|
||||
: item.title}
|
||||
:
|
||||
</span>
|
||||
<span className="content">
|
||||
{intl.formatMessage({ id: item.tips })}
|
||||
</span>
|
||||
</li>
|
||||
);
|
||||
})}
|
||||
</UL>
|
||||
<OverlayScroller style={{ padding: 0 }}>
|
||||
<UL>
|
||||
{list.map((item, index: number) => {
|
||||
return (
|
||||
<li key={index}>
|
||||
<span className="title">
|
||||
{item.title?.locale
|
||||
? intl.formatMessage({ id: item.title?.text || '' })
|
||||
: item.title}
|
||||
:
|
||||
</span>
|
||||
<span className="content">
|
||||
{intl.formatMessage({ id: item.tips })}
|
||||
</span>
|
||||
</li>
|
||||
);
|
||||
})}
|
||||
</UL>
|
||||
</OverlayScroller>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -89,6 +89,7 @@ html {
|
||||
--color-border-1: rgba(217, 217, 217, 100%);
|
||||
--ant-rate-star-color: #fadb14;
|
||||
--color-fill-mask: rgba(255, 255, 255, 60%);
|
||||
--width-tooltip-max: 300px;
|
||||
// ======== input ============
|
||||
--ant-input-active-shadow: 0 0 0 2px rgba(5, 255, 105, 6%);
|
||||
--ant-input-active-border-color: #007bff;
|
||||
|
||||
@@ -85,8 +85,11 @@ export default {
|
||||
'models.form.backend.llamabox':
|
||||
'For GGUF format models, supports Linux, macOS, and Windows.',
|
||||
'models.form.backend.vllm':
|
||||
'For non-GGUF format models, supports x86 Linux only.',
|
||||
'models.form.backend.voxbox': 'For non-GGUF format audio models.',
|
||||
'For non-GGUF format models, supported only on Linux (amd64/x86_64).',
|
||||
'models.form.backend.voxbox':
|
||||
'For non-GGUF format audio models, supported only on NVIDIA GPUs and CPUs.',
|
||||
'models.form.backend.mindie':
|
||||
'For non-GGUF format models, supported only on Ascend 910B and 310P.',
|
||||
'models.form.search.gguftips':
|
||||
'If using macOS or Windows as a worker, check GGUF (uncheck for audio models).',
|
||||
'models.form.button.addlabel': 'Add Label',
|
||||
|
||||
@@ -82,8 +82,11 @@ export default {
|
||||
'models.form.backend.llamabox':
|
||||
'GGUF形式のモデル用(Linux、macOS、Windowsをサポート)。',
|
||||
'models.form.backend.vllm':
|
||||
'非GGUF形式のモデル用(x86 Linuxのみをサポート)。',
|
||||
'models.form.backend.voxbox': '非GGUF形式の音声モデル用。',
|
||||
'For non-GGUF format models, supported only on Linux (amd64/x86_64).',
|
||||
'models.form.backend.voxbox':
|
||||
'For non-GGUF format audio models, supported only on NVIDIA GPUs and CPUs.',
|
||||
'models.form.backend.mindie':
|
||||
'For non-GGUF format models, supported only on Ascend 910B and 310P.',
|
||||
'models.form.search.gguftips':
|
||||
'macOSまたはWindowsをワーカーとして使用する場合、GGUFをチェックしてください(音声モデルの場合はオフにしてください)。',
|
||||
'models.form.button.addlabel': 'ラベルを追加',
|
||||
@@ -169,4 +172,7 @@ export default {
|
||||
// 23. 'models.table.apiAccessInfo.openaiCompatible',
|
||||
// 24. 'models.table.apiAccessInfo.jinaCompatible',
|
||||
// 25. 'models.table.apiAccessInfo.gotoCreate',
|
||||
// 26. 'models.form.backend.vllm',
|
||||
// 27. 'models.form.backend.voxbox',
|
||||
// 28. 'models.form.backend.mindie',
|
||||
// ========== End of To-Do List ==========
|
||||
|
||||
@@ -84,8 +84,12 @@ export default {
|
||||
'models.form.gpuselector': 'Селектор GPU',
|
||||
'models.form.backend.llamabox':
|
||||
'Для моделей формата GGUF. Поддержка Linux, macOS и Windows.',
|
||||
'models.form.backend.vllm': 'Для моделей не-GGUF формата. Только x86 Linux.',
|
||||
'models.form.backend.voxbox': 'Для аудиомоделей не-GGUF формата.',
|
||||
'models.form.backend.vllm':
|
||||
'For non-GGUF format models, supported only on Linux (amd64/x86_64).',
|
||||
'models.form.backend.voxbox':
|
||||
'For non-GGUF format audio models, supported only on NVIDIA GPUs and CPUs.',
|
||||
'models.form.backend.mindie':
|
||||
'For non-GGUF format models, supported only on Ascend 910B and 310P.',
|
||||
'models.form.search.gguftips':
|
||||
'Для воркеров на macOS/Windows отметьте GGUF (для аудиомоделей снимите).',
|
||||
'models.form.button.addlabel': 'Добавить метку',
|
||||
@@ -160,4 +164,7 @@ export default {
|
||||
// 11. 'models.table.apiAccessInfo.openaiCompatible',
|
||||
// 12. 'models.table.apiAccessInfo.jinaCompatible',
|
||||
// 13. 'models.table.apiAccessInfo.gotoCreate',
|
||||
// 14. 'models.form.backend.vllm',
|
||||
// 15. 'models.form.backend.voxbox',
|
||||
// 16. 'models.form.backend.mindie',
|
||||
// ========== End of To-Do List ==========
|
||||
|
||||
@@ -82,9 +82,13 @@ export default {
|
||||
'固定以使用期望的 {backend} 版本,在线环境会自动创建虚拟环境安装对应版本的 {backend}。在 GPUStack 升级后也将保持固定的后端版本。{link}',
|
||||
'models.form.gpuselector': 'GPU 选择器',
|
||||
'models.form.backend.llamabox':
|
||||
'用于 GGUF 格式模型,支持 Linux, macOS 和 Windows',
|
||||
'models.form.backend.vllm': '用于非 GGUF 格式模型,仅支持 x86 Linux',
|
||||
'models.form.backend.voxbox': '用于非 GGUF 格式的语音模型',
|
||||
'用于 GGUF 格式模型,支持 Linux, macOS 和 Windows。',
|
||||
'models.form.backend.vllm':
|
||||
'用于非 GGUF 格式模型,仅支持 x86 Linux(amd64/x86_64)。',
|
||||
'models.form.backend.voxbox':
|
||||
'用于非 GGUF 格式的语音模型,仅支持 NVIDIA GPU 与 CPU。',
|
||||
'models.form.backend.mindie':
|
||||
'用于非 GGUF 格式模型,仅支持昇腾 910B 和 310P。',
|
||||
'models.form.search.gguftips':
|
||||
'当 macOS 或 Windows 作 Worker 时勾选 GGUF(搜索语音模型时取消勾选)',
|
||||
'models.form.button.addlabel': '添加标签',
|
||||
|
||||
@@ -98,6 +98,10 @@ export const backendTipsList = [
|
||||
title: 'vLLM',
|
||||
tips: 'models.form.backend.vllm'
|
||||
},
|
||||
{
|
||||
title: 'Ascend MindIE',
|
||||
tips: 'models.form.backend.mindie'
|
||||
},
|
||||
{
|
||||
title: 'vox-box',
|
||||
tips: 'models.form.backend.voxbox'
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import { createAxiosToken } from '@/hooks/use-chunk-request';
|
||||
import { queryModelFilesList, queryWorkersList } from '@/pages/resources/apis';
|
||||
import { WorkerStatusMap } from '@/pages/resources/config';
|
||||
import {
|
||||
WorkerStatusMap,
|
||||
WorkerStatusMapValue
|
||||
} from '@/pages/resources/config';
|
||||
import { ListItem as WorkerListItem } from '@/pages/resources/config/types';
|
||||
import { convertFileSize } from '@/utils';
|
||||
import { useIntl } from '@umijs/max';
|
||||
@@ -40,6 +43,7 @@ export const useGenerateFormEditInitialValues = () => {
|
||||
list: GPUListItem[],
|
||||
workerList: WorkerListItem[]
|
||||
) => {
|
||||
// pick the worker fields from gpuList
|
||||
const workerFields = new Set(['worker_name', 'worker_id', 'worker_ip']);
|
||||
|
||||
// generate a map for workerList by name to data
|
||||
@@ -59,11 +63,11 @@ export const useGenerateFormEditInitialValues = () => {
|
||||
const gpuSelectorList = Array.from(workersMap.entries()).map(
|
||||
([workerName, items]) => {
|
||||
const firstItem = items[0];
|
||||
const disDisabled =
|
||||
WorkerStatusMap.ready !== workerDataMap.get(workerName)?.state;
|
||||
const currentState = workerDataMap.get(workerName)?.state || '';
|
||||
const disDisabled = WorkerStatusMap.ready !== currentState;
|
||||
return {
|
||||
label: disDisabled
|
||||
? `${workerName} [${workerDataMap.get(workerName)?.state}]`
|
||||
? `${workerName} [${WorkerStatusMapValue[currentState]}]`
|
||||
: workerName,
|
||||
value: workerName,
|
||||
parent: true,
|
||||
|
||||
Reference in New Issue
Block a user