Unverified Commit f3b9647b authored by zxhlyh's avatar zxhlyh Committed by GitHub

feat: add spark 3.0 tip (#1516)

parent 9de67c58
...@@ -14,7 +14,6 @@ import ModelItem from './model-item' ...@@ -14,7 +14,6 @@ import ModelItem from './model-item'
import ModelModal from './model-modal' import ModelModal from './model-modal'
import config from './configs' import config from './configs'
import { ConfigurableProviders } from './utils' import { ConfigurableProviders } from './utils'
import { ChevronDownDouble } from '@/app/components/base/icons/src/vender/line/arrows'
import { HelpCircle } from '@/app/components/base/icons/src/vender/line/general' import { HelpCircle } from '@/app/components/base/icons/src/vender/line/general'
import { import {
changeModelProviderPriority, changeModelProviderPriority,
...@@ -62,7 +61,6 @@ const ModelPage = () => { ...@@ -62,7 +61,6 @@ const ModelPage = () => {
} = useProviderContext() } = useProviderContext()
const { data: providers, mutate: mutateProviders } = useSWR('/workspaces/current/model-providers', fetchModelProviders) const { data: providers, mutate: mutateProviders } = useSWR('/workspaces/current/model-providers', fetchModelProviders)
const { data: textGenerationDefaultModel, mutate: mutateTextGenerationDefaultModel } = useSWR('/workspaces/current/default-model?model_type=text-generation', fetchDefaultModal) const { data: textGenerationDefaultModel, mutate: mutateTextGenerationDefaultModel } = useSWR('/workspaces/current/default-model?model_type=text-generation', fetchDefaultModal)
const [showMoreModel, setShowMoreModel] = useState(false)
const [showModal, setShowModal] = useState(false) const [showModal, setShowModal] = useState(false)
const { notify } = useToastContext() const { notify } = useToastContext()
const { eventEmitter } = useEventEmitterContextContext() const { eventEmitter } = useEventEmitterContextContext()
...@@ -94,8 +92,8 @@ const ModelPage = () => { ...@@ -94,8 +92,8 @@ const ModelPage = () => {
modelList = [ modelList = [
config.huggingface_hub, config.huggingface_hub,
config.zhipuai, config.zhipuai,
config.baichuan,
config.spark, config.spark,
config.baichuan,
config.minimax, config.minimax,
config.azure_openai, config.azure_openai,
config.replicate, config.replicate,
...@@ -315,7 +313,7 @@ const ModelPage = () => { ...@@ -315,7 +313,7 @@ const ModelPage = () => {
} }
</div> </div>
{ {
modelList.slice(0, showMoreModel ? modelList.length : 3).map((model, index) => ( modelList.map((model, index) => (
<ModelItem <ModelItem
key={index} key={index}
modelItem={model.item} modelItem={model.item}
...@@ -326,14 +324,6 @@ const ModelPage = () => { ...@@ -326,14 +324,6 @@ const ModelPage = () => {
/> />
)) ))
} }
{
!showMoreModel && (
<div className='inline-flex items-center px-1 h-[26px] cursor-pointer' onClick={() => setShowMoreModel(true)}>
<ChevronDownDouble className='mr-1 w-3 h-3 text-gray-500' />
<div className='text-xs font-medium text-gray-500'>{t('common.modelProvider.showMoreModelProvider')}</div>
</div>
)
}
<ModelModal <ModelModal
isShow={showModal} isShow={showModal}
modelModal={modelModalConfig} modelModal={modelModalConfig}
......
...@@ -16,8 +16,8 @@ const TIP_MAP: { [k: string]: TypeWithI18N } = { ...@@ -16,8 +16,8 @@ const TIP_MAP: { [k: string]: TypeWithI18N } = {
'zh-Hans': '免费获取 100 万个 token', 'zh-Hans': '免费获取 100 万个 token',
}, },
[ProviderEnumValue.spark]: { [ProviderEnumValue.spark]: {
'en': 'Earn 6 million tokens for free', 'en': 'Earn 3 million tokens (v3.0) for free',
'zh-Hans': '免费获取 600 万个 token', 'zh-Hans': '免费获取 300 万个 token (v3.0)',
}, },
[ProviderEnumValue.zhipuai]: { [ProviderEnumValue.zhipuai]: {
'en': 'Earn 10 million tokens for free', 'en': 'Earn 10 million tokens for free',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment