Spaces:
Sleeping
Sleeping
Add missing empty key check for Cohere
Browse files- helpers/llm_helper.py +1 -1
helpers/llm_helper.py
CHANGED
|
@@ -70,7 +70,7 @@ def is_valid_llm_provider_model(provider: str, model: str, api_key: str) -> bool
|
|
| 70 |
if not provider or not model or provider not in GlobalConfig.VALID_PROVIDERS:
|
| 71 |
return False
|
| 72 |
|
| 73 |
-
if provider in [GlobalConfig.PROVIDER_GOOGLE_GEMINI, ]:
|
| 74 |
if not api_key or len(api_key) < 5:
|
| 75 |
return False
|
| 76 |
|
|
|
|
| 70 |
if not provider or not model or provider not in GlobalConfig.VALID_PROVIDERS:
|
| 71 |
return False
|
| 72 |
|
| 73 |
+
if provider in [GlobalConfig.PROVIDER_GOOGLE_GEMINI, GlobalConfig.PROVIDER_COHERE,]:
|
| 74 |
if not api_key or len(api_key) < 5:
|
| 75 |
return False
|
| 76 |
|