enricoros / big-AGI

Generative AI suite powered by state-of-the-art models and providing advanced AI/AGI functions. It features AI personas, AGI functions, multi-model chats, text-to-image, voice, response streaming, code highlighting and execution, PDF import, presets for developers, much more. Deploy on-prem or in the cloud.
https://big-agi.com
MIT License
5.34k stars 1.2k forks source link

Allow only specific models #594

Open Pacman1988 opened 2 months ago

Pacman1988 commented 2 months ago

Is there a way to allow only specific models with an .env variable or setting?

For example: I only want gpt-4o or gpt3-5-turbo on my instance and no gpt4-turbo, because of the model costs.

enricoros commented 2 months ago

Do you do it for yourself, or to expose this to other users? You can achieve this with source code modifications today, but probably a comma-separated list in env vars could work too (we're just having too many env vars).

Something like OPENAI_API_FILTER=model1,model2 ?

Pacman1988 commented 2 months ago

I host an docker instance for some other users and an unexperienced user used Turbo-4 instead of gpt-3.5 and our credit was gone.

Something like OPENAI_API_FILTER=model1,model2 ?

Yes, that would be nice or maybe OPENAI_ALLOWED_MODELS= or so.