mirror of
https://github.com/imartinez/privateGPT.git
synced 2025-07-05 03:27:35 +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,
|
"ollama": config_settings.ollama.model,
|
||||||
}
|
}
|
||||||
|
|
||||||
try:
|
if llm_mode not in model_mapping:
|
||||||
return model_mapping[llm_mode]
|
print(f"Invalid 'llm mode': {llm_mode}")
|
||||||
except KeyError:
|
return None
|
||||||
raise ValueError(
|
|
||||||
f"Invalid 'llm mode': {llm_mode}"
|
return model_mapping[llm_mode]
|
||||||
) from None
|
|
||||||
|
|
||||||
with gr.Column(scale=7, elem_id="col"):
|
with gr.Column(scale=7, elem_id="col"):
|
||||||
# Determine the model label based on the value of PGPT_PROFILES
|
# Determine the model label based on the value of PGPT_PROFILES
|
||||||
|
Loading…
Reference in New Issue
Block a user