barunsaha commited on
Commit
aa45cf2
1 Parent(s): 34cb50e

Add missing empty key check for Cohere

Browse files
Files changed (1) hide show
  1. 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