simonw / llm

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

Error: Completions.create() got an unexpected keyword argument 'stream_options' #605

Closed xezpeleta closed 3 weeks ago

xezpeleta commented 3 weeks ago

Hi!

After upgrading llm to 0.17.1, I get the following errors using OpenAI models:

$ llm -m gpt-4o-mini hi
Error: Completions.create() got an unexpected keyword argument 'stream_options'

The error disappear when I use the option --no-stream:

$ llm -m gpt-4o-mini hi --no-stream
Hello! How can I assist you today?

Solution

Upgrade OpenAI to the latest version:

pip install -U openai