ソースを参照

feat: add spark 3.0 tip (#1516)

zxhlyh 1 年間 前
コミット
f3b9647bb4

+ 2 - 12
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}

+ 2 - 2
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',