jackMort / ChatGPT.nvim

ChatGPT Neovim Plugin: Effortless Natural Language Generation with OpenAI's ChatGPT API
Apache License 2.0
3.57k stars 307 forks source link

Pass callback function for all Config load from env #306

Closed rzalawad closed 9 months ago

rzalawad commented 9 months ago

PR: https://github.com/jackMort/ChatGPT.nvim/pull/305 fixed the curl error by calling the callback function for all config loads. However, there was one call which doesn't pass a callback (and one where a callback isn't defined) and since the callback would be nil, the module init fails.

The fix is to appropriate call the callback when specified

I tested these changes by connected to a Azure hosted gpt model and the chat functionality is working