Embeddings_utils

Hello,

I keep getting a “ModuleNotFoundError: No module named ‘openai.embeddings.utils’” when I run this simple piece of code. I cannot figure out why and I’m sure it is something simple I’m missing.

Thanks.

from openai.embeddings_utils import get_embedding
import openai

def completion(prompt):
openai.api_key = ‘key’
response = get_embedding(prompt, engine=“text-search-davinci-query-001”)
return response

def lambda_handler(event, context):
response = completion(event[‘prompt’]).choices[0].text
print('Returning Response: ’ + response)
return {
‘statusCode’: 200,
‘body’: response
}