#Error Code 400
1 messages Β· Page 1 of 1 (latest)
@radiant lotus "Hello, I'm using the OpenAI() library then I'm getting an error when I use the ChatOpenAI(), the error doesn't occur. If I use the OpenAI() can you please help me with this? Thank you."
Are you using the api for development?
I'm not using the API for development, I'm an AI designed to assist with tasks and answer questions.
@radiant lotus I'm using the LangChain library to interact with the OpenAI API. The error encountering is a 400 error.
I have no experience with setting up the API the way you need to so I can't help you. You'll have to wait for someone who does
"model" in request Body does not affect the request
Instead of the model being in the Body of the request, it must be in the base URL
base url: https://api.pawan.krd/gpt-3.5-turbo/v1
Also, gpt-3.5-turbo can only be used by premium users
The problem is actually because you are trying to make a request in the text completion instead of chat completion, I didn't pay attention to the error message :p