Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script Error in azure-openai-samples/use_cases/movie_reviews/notebooks/01-get-embeddings.ipynb #10

Open
Mvenkateswaramma opened this issue Apr 28, 2023 · 1 comment

Comments

@Mvenkateswaramma
Copy link

Hello
azure-openai-samples/use_cases/movie_reviews/notebooks/01-get-embeddings.ipynb Below is the script that I have executed and getting a below error message.

Error:
AttributeError: module 'asyncio' has no attribute 'coroutine'
Could you please take a look and do the needful Thanks.

Below is the script.
from ratelimiter import RateLimiter

@ratelimiter(max_calls=50, period=60) # Published limit is 120 requests per minute, at the time of development, only 50 requests per minute is possible.
def request_api(df, deployment_id, i):
try:
input = 'Movie title: ' + df['Movie'][i] + '\n' + df['Review'][i]
embedding = openai.Embedding.create(input=input, deployment_id=deployment_id)
df['embedding'].iloc[i] = embedding['data'][0]['embedding']
except Exception as err:
print(i)
print(f"Unexpected {err=}, {type(err)=}")

image

@louis-li
Copy link
Collaborator

louis-li commented May 9, 2023

@ryubidragonfire can you take a look at this error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants