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
ccabfe56
authored
Jun 21, 2025
by
Calcium-Ion
Committed by
GitHub
Jun 21, 2025
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1264 from feitianbubu/pr/uniq-channel-models
fix: unique channel models
parents
3523aafe
9034b2c9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
controller/model.go
+4
-0
No files found.
controller/model.go
View file @
ccabfe56
...
@@ -2,6 +2,7 @@ package controller
...
@@ -2,6 +2,7 @@ package controller
import
(
import
(
"fmt"
"fmt"
"github.com/samber/lo"
"net/http"
"net/http"
"one-api/common"
"one-api/common"
"one-api/constant"
"one-api/constant"
...
@@ -136,6 +137,9 @@ func init() {
...
@@ -136,6 +137,9 @@ func init() {
adaptor
.
Init
(
meta
)
adaptor
.
Init
(
meta
)
channelId2Models
[
i
]
=
adaptor
.
GetModelList
()
channelId2Models
[
i
]
=
adaptor
.
GetModelList
()
}
}
openAIModels
=
lo
.
UniqBy
(
openAIModels
,
func
(
m
dto
.
OpenAIModels
)
string
{
return
m
.
Id
})
}
}
func
ListModels
(
c
*
gin
.
Context
)
{
func
ListModels
(
c
*
gin
.
Context
)
{
...
...
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