mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-08 03:08:02 +00:00
fix: Fix the error that occurs when the task model does not exist (#23169)
This commit is contained in:
parent
60676bfdcf
commit
3f7fc1a75a
1 changed files with 1 additions and 1 deletions
|
|
@ -19,7 +19,7 @@ def get_task_model_id(default_model_id: str, task_model: str, task_model_externa
|
|||
# Set the task model
|
||||
task_model_id = default_model_id
|
||||
# Check if the user has a custom task model and use that model
|
||||
if models[task_model_id].get('connection_type') == 'local':
|
||||
if models.get(task_model_id, {}).get('connection_type') == 'local':
|
||||
if task_model and task_model in models:
|
||||
task_model_id = task_model
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue