Merge pull request #5405 from open-webui/main

refac: filter non chat completions models
This commit is contained in:
Timothy Jaeryang Baek 2024-09-13 19:23:02 +01:00 committed by GitHub
commit 8a928e5356
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -218,6 +218,19 @@ def merge_models_lists(model_lists):
"urlIdx": idx,
}
for model in models
if "api.openai.com"
not in app.state.config.OPENAI_API_BASE_URLS[idx]
or not any(
name in model["id"]
for name in [
"babbage",
"dall-e",
"davinci",
"embedding",
"tts",
"whisper",
]
)
]
)