File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ def language_detector(text: str) -> None:
7878max_lines = 100_000
7979min_lang_prob = 0.50
8080
81- printed_unexpected_api_keys = False # to print it only once
81+ printed_unexpected_api_keys = [ False ] # to print it only once
8282
8383# loader specific arguments
8484loader_specific_keys = {
@@ -214,12 +214,12 @@ def wrapped_model_name_matcher(model: str) -> str:
214214 for k , v in dict (os .environ ).items ():
215215 if k .endswith ("_API_KEY" ):
216216 backend = k .split ("_API_KEY" )[0 ].lower ()
217- if backend not in all_backends and is_verbose and not printed_unexpected_api_keys :
217+ if backend not in all_backends and is_verbose and not printed_unexpected_api_keys [ 0 ] :
218218 yel (f"Found API_KEY for backend { backend } that is not a known backend for litellm." )
219219 else :
220220 backends .append (backend )
221221 if is_verbose :
222- printed_unexpected_api_keys = True
222+ printed_unexpected_api_keys [ 0 ] = True
223223 assert backends , "No API keys found in environnment"
224224
225225 # filter by providers
You can’t perform that action at this time.
0 commit comments