You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)=}")
The text was updated successfully, but these errors were encountered:
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)=}")
The text was updated successfully, but these errors were encountered: