TheR1D / shell_gpt

A command-line productivity tool powered by AI large language models like GPT-4, will help you accomplish your tasks faster and more efficiently.
MIT License
9.8k stars 770 forks source link

Empty chunk choices #470

Closed joouha closed 9 months ago

joouha commented 9 months ago

Some OpenAI "compatible" APIs (e.g. https://lepton.ai) return a chunk with an empty list of choices at the end of their responses.

Currently this causes an error with shell-gpt as this case is not handled, which this PR fixes.

TheR1D commented 9 months ago

Hi @joouha, This issue should be solved in the latest release by LiteLLM. Given that, I'll pass on this, but thanks for the effort! 🍰