callstack / ai-cli

AI assistant in your terminal.
https://callstack.github.io/ai-cli/
MIT License
21 stars 0 forks source link

fix: handle inference error gracefully #44

Closed mdjastrzebski closed 5 months ago

mdjastrzebski commented 5 months ago

Summary

OpenAI & Perplexity APIs require user and assistant messages to be alternating for chat completion call. When error happened in calling that APIs, we left unanswered user message. This fix removes such message.

Test plan

Manual testing.