mirror of
https://github.com/imartinez/privateGPT.git
synced 2025-07-05 11:36:44 +00:00
return None rather than raising an error
This commit is contained in:
parent
8459025260
commit
b12d7f8b63
@ -437,12 +437,11 @@ class PrivateGptUi:
|
||||
"ollama": config_settings.ollama.model,
|
||||
}
|
||||
|
||||
try:
|
||||
if llm_mode not in model_mapping:
|
||||
print(f"Invalid 'llm mode': {llm_mode}")
|
||||
return None
|
||||
|
||||
return model_mapping[llm_mode]
|
||||
except KeyError:
|
||||
raise ValueError(
|
||||
f"Invalid 'llm mode': {llm_mode}"
|
||||
) from None
|
||||
|
||||
with gr.Column(scale=7, elem_id="col"):
|
||||
# Determine the model label based on the value of PGPT_PROFILES
|
||||
|
Loading…
Reference in New Issue
Block a user