coder / aicommit

become the world's laziest committer
Creative Commons Zero v1.0 Universal
135 stars 3 forks source link

Override OPENAI_API_KEY when saved key exists #6

Closed maximevalette closed 1 month ago

maximevalette commented 1 month ago

The saved key is only used when there is no environment variable set. I think it should be used nonetheless. My use case is that I have specific OpenAI API keys for my projects but want a specific one for aicommit (different budget / orgs).

https://github.com/coder/aicommit/blob/855cf007fa95b7c8ba7d1b30cf54e4d2b53f5856/cmd/aicommit/main.go#L249

Thanks for your work!

maximevalette commented 1 month ago

Thank you so much!