Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
1c48391c
authored
Sep 15, 2025
by
DD
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add submodel icon
parent
71d41d6e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
71 additions
and
68 deletions
+71
-68
web/src/helpers/render.jsx
+71
-68
No files found.
web/src/helpers/render.jsx
View file @
1c48391c
...
...
@@ -54,6 +54,7 @@ import {
FastGPT
,
Kling
,
Jimeng
,
SubModel
,
}
from
'@lobehub/icons'
;
import
{
...
...
@@ -342,6 +343,8 @@ export function getChannelIcon(channelType) {
return
<
FastGPT
.
Color
size=
{
iconSize
}
/>;
case
21
:
// 知识库:AI Proxy
case
44
:
// 嵌入模型:MokaAI M3E
case
53
:
// 嵌入模型:SubModel
return
<
SubModel
size=
{
iconSize
}
/>;
default
:
return
null
;
// 未知类型或自定义渠道不显示图标
}
...
...
@@ -1191,25 +1194,25 @@ export function renderModelPrice(
const
extraServices
=
[
webSearch
&&
webSearchCallCount
>
0
?
i18next
.
t
(
'
+
Web
搜索
{{
count
}}
次
/
1
K
次
*
$
{{
price
}}
*
{{
ratioType
}}
{{
ratio
}}
'
,
{
count
:
webSearchCallCount
,
price
:
webSearchPrice
,
ratio
:
groupRatio
,
ratioType
:
ratioLabel
,
},
)
'
+
Web
搜索
{{
count
}}
次
/
1
K
次
*
$
{{
price
}}
*
{{
ratioType
}}
{{
ratio
}}
'
,
{
count
:
webSearchCallCount
,
price
:
webSearchPrice
,
ratio
:
groupRatio
,
ratioType
:
ratioLabel
,
},
)
:
''
,
fileSearch
&&
fileSearchCallCount
>
0
?
i18next
.
t
(
'
+
文件搜索
{{
count
}}
次
/
1
K
次
*
$
{{
price
}}
*
{{
ratioType
}}
{{
ratio
}}
'
,
{
count
:
fileSearchCallCount
,
price
:
fileSearchPrice
,
ratio
:
groupRatio
,
ratioType
:
ratioLabel
,
},
)
'
+
文件搜索
{{
count
}}
次
/
1
K
次
*
$
{{
price
}}
*
{{
ratioType
}}
{{
ratio
}}
'
,
{
count
:
fileSearchCallCount
,
price
:
fileSearchPrice
,
ratio
:
groupRatio
,
ratioType
:
ratioLabel
,
},
)
:
''
,
].
join
(
''
);
...
...
@@ -1379,10 +1382,10 @@ export function renderAudioModelPrice(
let
audioPrice
=
(
audioInputTokens
/
1000000
)
*
inputRatioPrice
*
audioRatio
*
groupRatio
+
(
audioCompletionTokens
/
1000000
)
*
inputRatioPrice
*
audioRatio
*
audioCompletionRatio
*
groupRatio
;
inputRatioPrice
*
audioRatio
*
audioCompletionRatio
*
groupRatio
;
let
price
=
textPrice
+
audioPrice
;
return
(
<>
...
...
@@ -1438,27 +1441,27 @@ export function renderAudioModelPrice(
<
p
>
{
cacheTokens
>
0
?
i18next
.
t
(
'文字提示
{{
nonCacheInput
}}
tokens
/
1
M
tokens
*
$
{{
price
}}
+
缓存
{{
cacheInput
}}
tokens
/
1
M
tokens
*
$
{{
cachePrice
}}
+
文字补全
{{
completion
}}
tokens
/
1
M
tokens
*
$
{{
compPrice
}}
=
$
{{
total
}}
'
,
{
nonCacheInput
:
inputTokens
-
cacheTokens
,
cacheInput
:
cacheTokens
,
cachePrice
:
inputRatioPrice
*
cacheRatio
,
price
:
inputRatioPrice
,
completion
:
completionTokens
,
compPrice
:
completionRatioPrice
,
total
:
textPrice
.
toFixed
(
6
),
},
)
'文字提示
{{
nonCacheInput
}}
tokens
/
1
M
tokens
*
$
{{
price
}}
+
缓存
{{
cacheInput
}}
tokens
/
1
M
tokens
*
$
{{
cachePrice
}}
+
文字补全
{{
completion
}}
tokens
/
1
M
tokens
*
$
{{
compPrice
}}
=
$
{{
total
}}
'
,
{
nonCacheInput
:
inputTokens
-
cacheTokens
,
cacheInput
:
cacheTokens
,
cachePrice
:
inputRatioPrice
*
cacheRatio
,
price
:
inputRatioPrice
,
completion
:
completionTokens
,
compPrice
:
completionRatioPrice
,
total
:
textPrice
.
toFixed
(
6
),
},
)
:
i18next
.
t
(
'文字提示
{{
input
}}
tokens
/
1
M
tokens
*
$
{{
price
}}
+
文字补全
{{
completion
}}
tokens
/
1
M
tokens
*
$
{{
compPrice
}}
=
$
{{
total
}}
'
,
{
input
:
inputTokens
,
price
:
inputRatioPrice
,
completion
:
completionTokens
,
compPrice
:
completionRatioPrice
,
total
:
textPrice
.
toFixed
(
6
),
},
)
}
'文字提示
{{
input
}}
tokens
/
1
M
tokens
*
$
{{
price
}}
+
文字补全
{{
completion
}}
tokens
/
1
M
tokens
*
$
{{
compPrice
}}
=
$
{{
total
}}
'
,
{
input
:
inputTokens
,
price
:
inputRatioPrice
,
completion
:
completionTokens
,
compPrice
:
completionRatioPrice
,
total
:
textPrice
.
toFixed
(
6
),
},
)
}
</
p
>
<
p
>
{
i18next
.
t
(
...
...
@@ -1598,35 +1601,35 @@ export function renderClaudeModelPrice(
<
p
>
{
cacheTokens
>
0
||
cacheCreationTokens
>
0
?
i18next
.
t
(
'提示
{{
nonCacheInput
}}
tokens
/
1
M
tokens
*
$
{{
price
}}
+
缓存
{{
cacheInput
}}
tokens
/
1
M
tokens
*
$
{{
cachePrice
}}
+
缓存创建
{{
cacheCreationInput
}}
tokens
/
1
M
tokens
*
$
{{
cacheCreationPrice
}}
+
补全
{{
completion
}}
tokens
/
1
M
tokens
*
$
{{
compPrice
}}
*
{{
ratioType
}}
{{
ratio
}}
=
$
{{
total
}}
'
,
{
nonCacheInput
:
nonCachedTokens
,
cacheInput
:
cacheTokens
,
cacheRatio
:
cacheRatio
,
cacheCreationInput
:
cacheCreationTokens
,
cacheCreationRatio
:
cacheCreationRatio
,
cachePrice
:
cacheRatioPrice
,
cacheCreationPrice
:
cacheCreationRatioPrice
,
price
:
inputRatioPrice
,
completion
:
completionTokens
,
compPrice
:
completionRatioPrice
,
ratio
:
groupRatio
,
ratioType
:
ratioLabel
,
total
:
price
.
toFixed
(
6
),
},
)
'提示
{{
nonCacheInput
}}
tokens
/
1
M
tokens
*
$
{{
price
}}
+
缓存
{{
cacheInput
}}
tokens
/
1
M
tokens
*
$
{{
cachePrice
}}
+
缓存创建
{{
cacheCreationInput
}}
tokens
/
1
M
tokens
*
$
{{
cacheCreationPrice
}}
+
补全
{{
completion
}}
tokens
/
1
M
tokens
*
$
{{
compPrice
}}
*
{{
ratioType
}}
{{
ratio
}}
=
$
{{
total
}}
'
,
{
nonCacheInput
:
nonCachedTokens
,
cacheInput
:
cacheTokens
,
cacheRatio
:
cacheRatio
,
cacheCreationInput
:
cacheCreationTokens
,
cacheCreationRatio
:
cacheCreationRatio
,
cachePrice
:
cacheRatioPrice
,
cacheCreationPrice
:
cacheCreationRatioPrice
,
price
:
inputRatioPrice
,
completion
:
completionTokens
,
compPrice
:
completionRatioPrice
,
ratio
:
groupRatio
,
ratioType
:
ratioLabel
,
total
:
price
.
toFixed
(
6
),
},
)
:
i18next
.
t
(
'提示
{{
input
}}
tokens
/
1
M
tokens
*
$
{{
price
}}
+
补全
{{
completion
}}
tokens
/
1
M
tokens
*
$
{{
compPrice
}}
*
{{
ratioType
}}
{{
ratio
}}
=
$
{{
total
}}
'
,
{
input
:
inputTokens
,
price
:
inputRatioPrice
,
completion
:
completionTokens
,
compPrice
:
completionRatioPrice
,
ratio
:
groupRatio
,
ratioType
:
ratioLabel
,
total
:
price
.
toFixed
(
6
),
},
)
}
'提示
{{
input
}}
tokens
/
1
M
tokens
*
$
{{
price
}}
+
补全
{{
completion
}}
tokens
/
1
M
tokens
*
$
{{
compPrice
}}
*
{{
ratioType
}}
{{
ratio
}}
=
$
{{
total
}}
'
,
{
input
:
inputTokens
,
price
:
inputRatioPrice
,
completion
:
completionTokens
,
compPrice
:
completionRatioPrice
,
ratio
:
groupRatio
,
ratioType
:
ratioLabel
,
total
:
price
.
toFixed
(
6
),
},
)
}
</
p
>
<
p
>
{
i18next
.
t
(
'仅供参考,以实际扣费为准'
)
}
</
p
>
</
article
>
...
...
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