chatgpt_commit_message_hook
chatgpt_commit_message_hook copied to clipboard
Does not like not setting proxy.
The config file was just 3 lines, not 4 like the example.
cheako@mx1:~/src/gitlab/hazel-rs$ git commit -a
Traceback (most recent call last):
File "/usr/bin/prepare-commit-msg", line 161, in <module>
api_key, proxy, max_changed_lines = initialize_openai_api()
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/bin/prepare-commit-msg", line 149, in initialize_openai_api
proxy = config["openai"]["proxy"].strip('"').strip("'")
~~~~~~~~~~~~~~~~^^^^^^^^^
File "/usr/local/lib/python3.11/configparser.py", line 1273, in __getitem__
raise KeyError(key)
KeyError: 'proxy'
Using "prixy=\n" worked.
"prixy=\n" or "proxy=\n"?
That's an uninteresting distinction for me, I feel that unknown config options should warn over panic. To answer your question "the latter," I made a typo in the issue comment.