Importing embeddings_utils no longer working

Hello,

Until last week I had been using text-embedding-ada-002 without issue. Suddenly my line of code “from openai.embeddings_utils import get_embedding” is giving me a consistent error saying utils module does not exist. I changed the line of code to match what is used in the OpenAI cookbook blogpost on ada-002 however the error remains. Has ada-002 changed recently? I had been using this exact same code successfully for three months with 0 issues. Any advice or suggestions would be greatly appreciated.

1 Like

Welcome to the dev forum @mml458

If you recently upgraded the openai py package to v1.0 or higher then this won’t work.

See:

1 Like

Please refer this: https://platform.openai.com/docs/guides/embeddings/use-cases