Permission denied error while using gpt-3.5-turbo-instruct for OpenAI embeddings

Hi All,

I am getting “PermissionError: You are not allowed to generate embeddings from this model” when using - model=“gpt-3.5-turbo-instruct” in creating OpenAIembeddings for doc answer retrieval use-case.
Earlier it was working fine with text-davinci-003 model before not it is deprecated.
Can someone please help?

2 Likes

embeddings = OpenAIEmbeddings(model=“gpt-3.5-turbo”)
document_search = Chroma.from_texts(texts, embeddings)
Error code: 403 - {‘error’: {‘message’: ‘You are not allowed to generate embeddings from this model’, ‘type’: ‘invalid_request_error’, ‘param’: None, ‘code’: None}}
Earlier it was working fine with text-davinci-003 model before not it is deprecated.

I have the same problem. Whether changes are needed in the code when using the new model. It’s not clear to me.

Hi there - it is not possible to use gpt-3.5-turbo to create embeddings.
You have the following three models available to create embeddings:

image

Source: https://platform.openai.com/docs/models/embeddings

1 Like

I am not sure if this is the right solution for your issue, but I was facing the same issue with text-embedding-ada-002 and what worked for me, is I went to my project settings and in the Limit section I did not have the required model in Model Usage ->“Allowed Model” setting. Once I added the required model, it started working.