File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -158,12 +158,13 @@ def __init__(
158158 self .logger = logging .getLogger (__name__ )
159159 self .logger .addHandler (logging .StreamHandler ())
160160
161- if config is not None :
161+ if api_key == "" and config is not None :
162+ self .logger .info ("Attempting to set API key from config object" )
162163 api_key = config .api_key
163- if not api_key :
164- # Default to `None` for on-prem instances where an API key is not required
165- api_key = os .getenv ("DEEPGRAM_API_KEY" , None )
166- if not api_key :
164+ if api_key == "" :
165+ self . logger . info ( "Attempting to set API key from environment variable" )
166+ api_key = os .getenv ("DEEPGRAM_API_KEY" , "" )
167+ if api_key == "" :
167168 self .logger .warning ("WARNING: API key is missing" )
168169
169170 self .api_key = api_key
You can’t perform that action at this time.
0 commit comments