78963d5d by Jerald Lim

31608_remove_deprecated_models

1 parent 3219d011
Showing 1 changed file with 3 additions and 1 deletions
......@@ -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) => {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!