jackMort / ChatGPT.nvim

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

Better check when API response is empty #411

Open ilan-schemoul opened 3 months ago

ilan-schemoul commented 3 months ago

Hello, When the api returns no response (for example when no API key provided) the json.decode crashes saying "can't decode blank string". This PR fixes that.