mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 12:25:20 +00:00
refac: filter non chat completions models
This commit is contained in:
parent
bc0baa35e6
commit
adf958559b
1 changed files with 13 additions and 0 deletions
|
|
@ -218,6 +218,19 @@ def merge_models_lists(model_lists):
|
||||||
"urlIdx": idx,
|
"urlIdx": idx,
|
||||||
}
|
}
|
||||||
for model in models
|
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",
|
||||||
|
]
|
||||||
|
)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue