feat(web): model add volcano provider
This commit is contained in:
BIN
web/src/assets/images/model/volcano.png
Normal file
BIN
web/src/assets/images/model/volcano.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.1 KiB |
@@ -608,6 +608,7 @@ export const en = {
|
|||||||
official: 'Official',
|
official: 'Official',
|
||||||
deprecated: 'Deprecated',
|
deprecated: 'Deprecated',
|
||||||
|
|
||||||
|
image: 'Image',
|
||||||
llm: 'LLM',
|
llm: 'LLM',
|
||||||
chat: 'Chat',
|
chat: 'Chat',
|
||||||
embedding: 'Embedding',
|
embedding: 'Embedding',
|
||||||
|
|||||||
@@ -1246,6 +1246,7 @@ export const zh = {
|
|||||||
official: '官方',
|
official: '官方',
|
||||||
deprecated: '已弃用',
|
deprecated: '已弃用',
|
||||||
|
|
||||||
|
image: '图片',
|
||||||
llm: 'LLM',
|
llm: 'LLM',
|
||||||
chat: 'Chat',
|
chat: 'Chat',
|
||||||
embedding: 'Embedding',
|
embedding: 'Embedding',
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: ZhaoYing
|
* @Author: ZhaoYing
|
||||||
* @Date: 2026-02-03 16:50:10
|
* @Date: 2026-02-03 16:50:10
|
||||||
* @Last Modified by: ZhaoYing
|
* @Last Modified by: ZhaoYing
|
||||||
* @Last Modified time: 2026-03-25 12:27:51
|
* @Last Modified time: 2026-03-25 14:21:01
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* Model List View
|
* Model List View
|
||||||
@@ -72,10 +72,10 @@ const ModelList = forwardRef<BaseRef, { query: any; handleEdit: (vo?: ModelListI
|
|||||||
avatarUrl={getListLogoUrl(item.provider, item.logo)}
|
avatarUrl={getListLogoUrl(item.provider, item.logo)}
|
||||||
avatarText={item.provider[0].toUpperCase()}
|
avatarText={item.provider[0].toUpperCase()}
|
||||||
title={<Flex vertical gap={6}>
|
title={<Flex vertical gap={6}>
|
||||||
<Tooltip title={t(`modelNew.${item.provider}`)}>
|
<Tooltip title={String(item.provider).charAt(0).toUpperCase() + String(item.provider).slice(1)}>
|
||||||
<div className="rb:wrap-break-word rb:line-clamp-1">{t(`modelNew.${item.provider}`)}</div>
|
<div className="rb:wrap-break-word rb:line-clamp-1">{String(item.provider).charAt(0).toUpperCase() + String(item.provider).slice(1)}</div>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Flex gap={8}>{item.tags.map(tag => <Tag key={tag}>{t(`modelNew.${tag}`)}</Tag>)}</Flex>
|
<Flex gap={8} className="rb:overflow-hidden rb:flex-nowrap rb:w-auto!">{item.tags.map(tag => <Tag key={tag} className="rb:shrink-0">{t(`modelNew.${tag}`)}</Tag>)}</Flex>
|
||||||
</Flex>}
|
</Flex>}
|
||||||
isNeedTooltip={false}
|
isNeedTooltip={false}
|
||||||
footer={<Row gutter={9} className="rb:pt-2!">
|
footer={<Row gutter={9} className="rb:pt-2!">
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ const ModelSquare = forwardRef <BaseRef, { query: any; }>(({ query }, ref) => {
|
|||||||
'rb:text-[#171719]': activeProvider === vo.provider,
|
'rb:text-[#171719]': activeProvider === vo.provider,
|
||||||
})}
|
})}
|
||||||
onClick={() => setActiveProvider(vo.provider)}
|
onClick={() => setActiveProvider(vo.provider)}
|
||||||
>{t(`modelNew.${vo.provider}`)}</div>
|
>{String(vo.provider).charAt(0).toUpperCase() + String(vo.provider).slice(1)}</div>
|
||||||
))}
|
))}
|
||||||
</Space>
|
</Space>
|
||||||
{list.filter(vo => vo.provider === activeProvider).map(vo => (
|
{list.filter(vo => vo.provider === activeProvider).map(vo => (
|
||||||
@@ -105,7 +105,7 @@ const ModelSquare = forwardRef <BaseRef, { query: any; }>(({ query }, ref) => {
|
|||||||
}
|
}
|
||||||
isNeedTooltip={false}
|
isNeedTooltip={false}
|
||||||
footer={<Flex justify="space-between" align="center" className="rb:text-[#5B6167] rb:text-[12px]">
|
footer={<Flex justify="space-between" align="center" className="rb:text-[#5B6167] rb:text-[12px]">
|
||||||
@{t(`modelNew.${vo.provider}`)}
|
@{String(item.provider).charAt(0).toUpperCase() + String(item.provider).slice(1)}
|
||||||
<Space size={4}><UsergroupAddOutlined /> {item.add_count}</Space>
|
<Space size={4}><UsergroupAddOutlined /> {item.add_count}</Space>
|
||||||
</Flex>}
|
</Flex>}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: ZhaoYing
|
* @Author: ZhaoYing
|
||||||
* @Date: 2026-02-03 16:49:28
|
* @Date: 2026-02-03 16:49:28
|
||||||
* @Last Modified by: ZhaoYing
|
* @Last Modified by: ZhaoYing
|
||||||
* @Last Modified time: 2026-03-25 12:27:33
|
* @Last Modified time: 2026-03-25 14:07:10
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* Custom Model Modal
|
* Custom Model Modal
|
||||||
@@ -210,7 +210,7 @@ const CustomModelModal = forwardRef<CustomModelModalRef, CustomModelModalProps>(
|
|||||||
url={modelProviderUrl}
|
url={modelProviderUrl}
|
||||||
hasAll={false}
|
hasAll={false}
|
||||||
disabled={isEdit}
|
disabled={isEdit}
|
||||||
format={(items) => items.map((item) => ({ label: t(`modelNew.${item}`), value: String(item) }))}
|
format={(items) => items.map((item) => ({ label: String(item).charAt(0).toUpperCase() + String(item).slice(1), value: String(item) }))}
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: ZhaoYing
|
* @Author: ZhaoYing
|
||||||
* @Date: 2026-02-03 16:49:20
|
* @Date: 2026-02-03 16:49:20
|
||||||
* @Last Modified by: ZhaoYing
|
* @Last Modified by: ZhaoYing
|
||||||
* @Last Modified time: 2026-03-04 11:51:01
|
* @Last Modified time: 2026-03-25 14:07:08
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* Sub-Model Modal
|
* Sub-Model Modal
|
||||||
@@ -178,7 +178,7 @@ const SubModelModal = forwardRef<SubModelModalRef, SubModelModalProps>(({
|
|||||||
url={modelProviderUrl}
|
url={modelProviderUrl}
|
||||||
hasAll={false}
|
hasAll={false}
|
||||||
format={(items) => items.map((item) => ({
|
format={(items) => items.map((item) => ({
|
||||||
label: t(`modelNew.${typeof item === 'object' ? item.value : item}`),
|
label: String(typeof item === 'object' ? item.value : item).charAt(0).toUpperCase() + String(typeof item === 'object' ? item.value : item).slice(1),
|
||||||
value: typeof item === 'object' ? item.value : item
|
value: typeof item === 'object' ? item.value : item
|
||||||
}))}
|
}))}
|
||||||
onChange={(value) => handleChangeProvider(value)}
|
onChange={(value) => handleChangeProvider(value)}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: ZhaoYing
|
* @Author: ZhaoYing
|
||||||
* @Date: 2026-02-03 16:49:12
|
* @Date: 2026-02-03 16:49:12
|
||||||
* @Last Modified by: ZhaoYing
|
* @Last Modified by: ZhaoYing
|
||||||
* @Last Modified time: 2026-02-03 16:49:12
|
* @Last Modified time: 2026-03-25 14:14:14
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* Model Implementation Component
|
* Model Implementation Component
|
||||||
@@ -106,7 +106,7 @@ const ModelImplement: FC<ModelImplementProps> = ({ type, value, onChange }) => {
|
|||||||
></div>
|
></div>
|
||||||
</Flex>
|
</Flex>
|
||||||
<div className="rb:text-[#5B6167] rb:my-2">{item.api_key}</div>
|
<div className="rb:text-[#5B6167] rb:my-2">{item.api_key}</div>
|
||||||
<Tag className="rb:mb-2">{t(`modelNew.${item.provider}`)}</Tag>
|
<Tag className="rb:mb-2">{String(item.provider).charAt(0).toUpperCase() + String(item.provider).slice(1)}</Tag>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ const ModelListDetail = forwardRef<ModelListDetailRef, ModelListDetailProps>(({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<RbDrawer
|
<RbDrawer
|
||||||
title={<>{t(`modelNew.${data.provider}`)} {t('modelNew.modelList')} ({list.length}{t('modelNew.item')})</>}
|
title={<>{String(data.provider).charAt(0).toUpperCase() + String(data.provider).slice(1)} {t('modelNew.modelList')} ({list.length}{t('modelNew.item')})</>}
|
||||||
open={open}
|
open={open}
|
||||||
onClose={handleClose}
|
onClose={handleClose}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ const tabKeys = ['group', 'list', 'square']
|
|||||||
<CustomSelect
|
<CustomSelect
|
||||||
url={modelProviderUrl}
|
url={modelProviderUrl}
|
||||||
hasAll={false}
|
hasAll={false}
|
||||||
format={(items) => items.map((item) => ({ label: t(`modelNew.${item}`), value: String(item) }))}
|
format={(items) => items.map((item) => ({ label: String(item).charAt(0).toUpperCase() + String(item).slice(1), value: String(item) }))}
|
||||||
className="rb:w-40"
|
className="rb:w-40"
|
||||||
allowClear={true}
|
allowClear={true}
|
||||||
placeholder={t('modelNew.provider')}
|
placeholder={t('modelNew.provider')}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: ZhaoYing
|
* @Author: ZhaoYing
|
||||||
* @Date: 2026-02-03 16:50:22
|
* @Date: 2026-02-03 16:50:22
|
||||||
* @Last Modified by: ZhaoYing
|
* @Last Modified by: ZhaoYing
|
||||||
* @Last Modified time: 2026-02-27 10:22:46
|
* @Last Modified time: 2026-03-25 14:03:13
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* Utility functions for Model Management
|
* Utility functions for Model Management
|
||||||
@@ -14,6 +14,7 @@ import gpustackIcon from '@/assets/images/model/gpustack.png'
|
|||||||
import ollamaIcon from '@/assets/images/model/ollama.svg'
|
import ollamaIcon from '@/assets/images/model/ollama.svg'
|
||||||
import openaiIcon from '@/assets/images/model/openai.svg'
|
import openaiIcon from '@/assets/images/model/openai.svg'
|
||||||
import xinferenceIcon from '@/assets/images/model/xinference.svg'
|
import xinferenceIcon from '@/assets/images/model/xinference.svg'
|
||||||
|
import volcanoIcon from '@/assets/images/model/volcano.png'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provider icon mapping
|
* Provider icon mapping
|
||||||
@@ -24,7 +25,8 @@ export const ICONS = {
|
|||||||
gpustack: gpustackIcon,
|
gpustack: gpustackIcon,
|
||||||
ollama: ollamaIcon,
|
ollama: ollamaIcon,
|
||||||
openai: openaiIcon,
|
openai: openaiIcon,
|
||||||
xinference: xinferenceIcon
|
xinference: xinferenceIcon,
|
||||||
|
volcano: volcanoIcon,
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user