Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

feat: add spark 3.0 tip (#1516)

zxhlyhf3b9647bb4b2
diff --git a/web/app/components/header/account-setting/model-page/index.tsx b/web/app/components/header/account-setting/model-page/index.tsx
index 033ba964295..d7cc899fa31 100644
--- a/web/app/components/header/account-setting/model-page/index.tsx
+++ b/web/app/components/header/account-setting/model-page/index.tsx
@@ -14,7 +14,6 @@ import ModelItem from './model-item'
import ModelModal from './model-modal'
import config from './configs'
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 {
changeModelProviderPriority,
@@ -62,7 +61,6 @@ const ModelPage = () => {
} = useProviderContext()
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 [showMoreModel, setShowMoreModel] = useState(false)
const [showModal, setShowModal] = useState(false)
const { notify } = useToastContext()
const { eventEmitter } = useEventEmitterContextContext()
@@ -94,8 +92,8 @@ const ModelPage = () => {
modelList = [
config.huggingface_hub,
config.zhipuai,
- config.baichuan,
config.spark,
+ config.baichuan,
config.minimax,
config.azure_openai,
config.replicate,
@@ -315,7 +313,7 @@ const ModelPage = () => {
}
</div>
{
- modelList.slice(0, showMoreModel ? modelList.length : 3).map((model, index) => (
+ modelList.map((model, index) => (
<ModelItem
key={index}
modelItem={model.item}
@@ -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
isShow={showModal}
modelModal={modelModalConfig}
diff --git a/web/app/components/header/account-setting/model-page/model-item/FreeQuota.tsx b/web/app/components/header/account-setting/model-page/model-item/FreeQuota.tsx
index 90e4b5cd297..b66563d0186 100644
--- a/web/app/components/header/account-setting/model-page/model-item/FreeQuota.tsx
+++ b/web/app/components/header/account-setting/model-page/model-item/FreeQuota.tsx
@@ -16,8 +16,8 @@ const TIP_MAP: { [k: string]: TypeWithI18N } = {
'zh-Hans': '免费获取 100 万个 token',
},
[ProviderEnumValue.spark]: {
- 'en': 'Earn 6 million tokens for free',
- 'zh-Hans': '免费获取 600 万个 token',
+ 'en': 'Earn 3 million tokens (v3.0) for free',
+ 'zh-Hans': '免费获取 300 万个 token (v3.0)',
},
[ProviderEnumValue.zhipuai]: {
'en': 'Earn 10 million tokens for free',