2904457f by Bryan Batac

- Added only allowed models

1 parent 8d85ae8a
Showing 1 changed file with 6 additions and 2 deletions
......@@ -52,7 +52,11 @@ const tiktokenModels = [
let client;
let filteredModels = {};
const allowedEndpoints = ["openAI", "Opensource", "Llama"];
const excludedModels = ["o1-preview", "o1-mini"];
const allowedModels = [
"gpt-3.5-turbo",
"google/gemma-2-9b-it",
"meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo"
];
// Open AI Configuration
// console.log(process.env.OPENAI_API_ORG)
......@@ -565,7 +569,7 @@ const fetchAndFilterModels = async (client) => {
const models = await client.get('model');
return Object.entries(JSON.parse(models))
.filter(([_, value]) => allowedEndpoints.includes(value.endpoint))
.filter(([_, value]) => !excludedModels.includes(value.model))
.filter(([_, value]) => allowedModels.includes(value.model))
.reduce((acc, [key, value]) => {
acc[key] = value;
return acc;
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!