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
487 stars 23 forks source link

Default openai url: "Error: OpenAPI health check failed" #12

Closed CBenoit closed 9 months ago

CBenoit commented 9 months ago

I’m configuring oatmeat via env variables in order to not leak my token through the CLI arguments (not sure if this is relevant for the issue at hand though).

For convenience, I have a script looking like this:

#!/bin/bash

export OATMEAL_BACKEND=openai
export OATMEAL_OPENAI_TOKEN=<redacted>
export OATMEAL_MODEL=gpt-4

oatmeal

The variables appear to be properly accounted for since I can see the following: image

However, I have no idea of why the health check is failing.

Accessing https://status.openai.com/api/v2/status.json is showing "All Systems Operational", and the error itself does not include much details.

Any way to extract additional information from oatmeal? I don’t see anything like log or tracing in the dependencies of the project, so I assume there is no way to make it write into some log file.

PS: cool project by the way.

dustinblackman commented 9 months ago

OpenAI broke the API index path which now 404s... that's nice. https://api.openai.com

I'll have to consider rewriting that to be better.

As for logging, I have it on my TODOs to output to a temp file if enabled. :)

I'll get this patched up. Thanks for the report!

CBenoit commented 9 months ago

Oh I see, haha. Thank you! :pray:

dustinblackman commented 9 months ago

Fixed in v0.7.0. Thanks!