Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dify
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai-tech
dify
Commits
f3b9647b
Unverified
Commit
f3b9647b
authored
Nov 13, 2023
by
zxhlyh
Committed by
GitHub
Nov 13, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add spark 3.0 tip (#1516)
parent
9de67c58
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
14 deletions
+4
-14
index.tsx
...pp/components/header/account-setting/model-page/index.tsx
+2
-12
FreeQuota.tsx
...eader/account-setting/model-page/model-item/FreeQuota.tsx
+2
-2
No files found.
web/app/components/header/account-setting/model-page/index.tsx
View file @
f3b9647b
...
...
@@ -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
}
...
...
web/app/components/header/account-setting/model-page/model-item/FreeQuota.tsx
View file @
f3b9647b
...
...
@@ -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'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment