Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
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
Unverified
Commit
2c73e9dc
authored
Mar 21, 2025
by
Archer
Committed by
archer
Mar 27, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: ai proxy (#4265)
* sync collection * remove lock * perf: ai proxy
parent
99181334
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
10 deletions
+20
-10
docSite/content/zh-cn/docs/development/upgrading/492.md
+1
-0
projects/app/src/pageComponents/account/model/Channel/index.tsx
+19
-10
No files found.
docSite/content/zh-cn/docs/development/upgrading/492.md
View file @
2c73e9dc
...
...
@@ -19,6 +19,7 @@ weight: 799
1.
导出对话日志时,支持导出成员名。
2.
邀请链接交互。
3.
无 SSL 证书时复制失败,会提示弹窗用于手动复制。
4.
FastGPT 未内置 ai proxy 渠道时,也能正常展示其名称。
## 🐛 修复
...
...
projects/app/src/pageComponents/account/model/Channel/index.tsx
View file @
2c73e9dc
import
{
deleteChannel
,
getChannelList
,
putChannel
,
putChannelStatus
}
from
'@/web/core/ai/channel'
;
import
{
deleteChannel
,
getChannelList
,
getChannelProviders
,
putChannel
,
putChannelStatus
}
from
'@/web/core/ai/channel'
;
import
{
useRequest2
}
from
'@fastgpt/web/hooks/useRequest'
;
import
React
,
{
useState
}
from
'react'
;
import
{
...
...
@@ -50,6 +56,10 @@ const ChannelTable = ({ Tab }: { Tab: React.ReactNode }) => {
manual
:
false
});
const
{
data
:
channelProviders
=
{}
}
=
useRequest2
(
getChannelProviders
,
{
manual
:
false
});
const
[
editChannel
,
setEditChannel
]
=
useState
<
ChannelInfoType
>
();
const
{
runAsync
:
updateChannel
,
loading
:
loadingUpdateChannel
}
=
useRequest2
(
putChannel
,
{
...
...
@@ -111,7 +121,10 @@ const ChannelTable = ({ Tab }: { Tab: React.ReactNode }) => {
</
Thead
>
<
Tbody
>
{
channelList
.
map
((
item
)
=>
{
const
providerData
=
aiproxyIdMap
[
item
.
type
];
const
providerData
=
aiproxyIdMap
[
item
.
type
]
||
{
label
:
channelProviders
[
item
.
type
]?.
name
||
'Invalid provider'
,
provider
:
'Other'
};
const
provider
=
getModelProvider
(
providerData
?.
provider
);
return
(
...
...
@@ -119,14 +132,10 @@ const ChannelTable = ({ Tab }: { Tab: React.ReactNode }) => {
<
Td
>
{
item
.
id
}
</
Td
>
<
Td
>
{
item
.
name
}
</
Td
>
<
Td
>
{
providerData
?
(
<
HStack
>
<
MyIcon
name=
{
provider
?.
avatar
as
any
}
w=
{
'1rem'
}
/>
<
Box
>
{
t
(
providerData
?.
label
as
any
)
}
</
Box
>
</
HStack
>
)
:
(
'Invalid provider'
)
}
<
HStack
>
<
MyIcon
name=
{
provider
?.
avatar
as
any
}
w=
{
'1rem'
}
/>
<
Box
>
{
t
(
providerData
?.
label
as
any
)
}
</
Box
>
</
HStack
>
</
Td
>
<
Td
>
<
MyTag
...
...
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