dustinblackman / oatmeal

Terminal UI to chat with large language models (LLM) using different model backends, and integrations with your favourite editors!
https://dustinblackman.com/posts/oatmeal/
MIT License
522 stars 24 forks source link

OpenAI requests fail qithout explanation of the cause or error message #75

Open yurivict opened 5 months ago

yurivict commented 5 months ago

It was called with:

oatmeal -b openai --open-ai-token {...open ai token ...}

image

Errors like this should be accompanied by the error message. It could be "Connection refused", "Server error", or the error message returned by the OpenAI API. I am sure it doesn't fail without providing an error message.

eddiebergman commented 3 months ago

I had the same issue and the relevant code doesn't try to report it back:

https://github.com/dustinblackman/oatmeal/blob/a6148b2474778698f7b261aa549dcbda439e2060/src/infrastructure/backends/openai.rs#L151-L185

I found out I had to include a model in my ~/.config/oatmeal/config.toml such as "gpt-4o-mini" (model list).

You can also pass the model in using the -m/--model options from cmdline.