chatgpt-cli
chatgpt-cli copied to clipboard
Fallback to Default Config When OPENAI_CONFIG_HOME is Set and YAML Configuration is missing.
When the environment variable OPENAI_CONFIG_HOME
is set, and the corresponding YAML configuration file does not exist, the chatgpt-cli
application falls back to its default configuration silently without throwing an error. This behavior can lead to confusion as users may expect an error to be raised when the specified configuration is not found.
I know this sounds silly, but out of habit, I name all my yaml files with the extension .yml
. It took me more than an hour to realize that that was the problem. I decided to build, log and everything in order to find that it was my fault. In any case, since I'm biased, I think that if somebody sets the variable OPENAI_CONFIG_HOME, it's because he/she wishes to use that directory, and it should not fallback to the default configuration file.
Nice library btw.