Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Administrator
/
chatgpt.ai-pro.org
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
3
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
78963d5d
authored
2024-08-20 13:38:41 +0800
by
Jerald Lim
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
31608_remove_deprecated_models
1 parent
3219d011
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
index.js
index.js
View file @
78963d5
...
...
@@ -470,8 +470,10 @@ app.get('/models', async (req, res) => {
const
models
=
response
.
data
;
const
opensource_models
=
process
.
env
.
OPENSOURCE_MODELS
?
JSON
.
parse
(
process
.
env
.
OPENSOURCE_MODELS
)
:
[];
const
excluded_models
=
process
.
env
.
EXCLUDED_MODELS
?
String
(
process
.
env
.
EXCLUDED_MODELS
).
split
(
','
)
:
[];
models
.
data
=
models
.
data
.
filter
((
model
)
=>
{
return
model
.
id
.
indexOf
(
'gpt-3'
)
===
0
&&
model
.
id
!=
'gpt-3.5-turbo-0301'
&&
model
.
id
!=
'gpt-3.5-turbo-0613'
return
model
.
id
.
indexOf
(
'gpt-3'
)
===
0
&&
!
excluded_models
.
includes
(
model
.
id
)
})
opensource_models
.
forEach
((
model
)
=>
{
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment