simonw / llm

Access large language models from the command-line
https://llm.datasette.io
Apache License 2.0
4.91k stars 277 forks source link

"Error: Connection error." following Github readme.md #508

Open nickschurch opened 5 months ago

nickschurch commented 5 months ago

I installed llm via conda (from conda-forge), set my openai key (which worked fine). llm models returns a list of models that are available, but attempting to ask the models a Q, gets this error.

Any ideas?

nicpaimnt commented 3 months ago

I get the same.

Error: Connection error

Steps:

brew install llm
...

llm keys set openai
Enter key: <snip>

llm "count to 5 in spanish"
Error: Connection error.

LLM_OPENAI_SHOW_RESPONSES=1 llm -m 4o 'three word slogan for an an otter-run bakery'
Error: Connection error.
yrebrac commented 2 months ago

I am suddnely getting this to from all the API models after working without issues for a while (OpenAI and Anthoropic are the only ones I am using). Local models still work, and it's not a general network issue on my machine and not an issue with keys, credit etc.

Would be great if this error gave a little more context.

Edit: appears to be a genuine network error. In my case a DNS resolution error for the API (due to a quirky situation with the environment I am running WSL in that was not visible to the system as a whole).

frixaco commented 1 month ago

I have the same issue as @yrebrac - running llm inside WSL. It's happening only with llm, I don't have any issues using OpenAI/Anthropic SDKs.