-
I am trying to use the OpenAI API to access a local model, but cannot get the API key working. If I start my server with:
Using curl works as expected:
But If I try to use the OpenAI API, i.e.
and run it with
I have set a bunch of environment variables that do seem to be read correctly by Python.
I was on an older version of text-generation-webui, but updated to the latest and get the same issue. And using openai==1.23.6 |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
FYI old version of openai also works fine, albeit the code is a little different.
|
Beta Was this translation helpful? Give feedback.
-
Also, ollama works out of the box.
|
Beta Was this translation helpful? Give feedback.
-
Okay.... it must not have been finding the correct base.
Then call from Python with:
|
Beta Was this translation helpful? Give feedback.
Okay.... it must not have been finding the correct base.
This works. Start with the api and set a key:
Then call from Python with: