You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am reading my API key from a file. My editor was adding a newline if the file was open. The result was that any call made via the client would error with the message "you must provide a model parameter", even though a model parameter was being sent.
I fixed my issue by simply trimming the result of my call to get the file's contents but the error message from the API was very confusing. Maybe just add the trim before sending to the API?
The text was updated successfully, but these errors were encountered:
The error is provided by OpenAI so it's not possible to change the error on the library side.
But feel free to submit a PR which trims the API key automatically.
I am reading my API key from a file. My editor was adding a newline if the file was open. The result was that any call made via the client would error with the message "you must provide a model parameter", even though a model parameter was being sent.
I fixed my issue by simply trimming the result of my call to get the file's contents but the error message from the API was very confusing. Maybe just add the trim before sending to the API?
The text was updated successfully, but these errors were encountered: