File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 33import yaml
44
55def load_api_key ():
6- path = os .path .join (os .getcwd (), " .api_keys" , "openai.json" )
6+ path = os .path .join (os .path . expanduser ( "~/ .api_keys") , "openai.json" )
77 if not os .path .exists (path ):
8- raise FileNotFoundError ("❌ API key file not found: .api_keys/openai.json " )
8+ raise FileNotFoundError (f "❌ API key file not found: { path } " )
99 with open (path , "r" ) as f :
1010 data = json .load (f )
1111 return data ["api_key" ]
@@ -16,4 +16,4 @@ def load_prompt_template(path: str = './prompt_template.yml'):
1616 raise FileNotFoundError (f"❌ Prompt template not found: { path } " )
1717 with open (path , "r" , encoding = 'utf-8' ) as f :
1818 config = yaml .safe_load (f )
19- return config ['commit_format' ], config ['commit_type' ]
19+ return config ['commit_format' ], config ['commit_type' ]
You can’t perform that action at this time.
0 commit comments