Find answers from the community

Updated 2 years ago

Async azure

I'm trying to test async using this notebook https://github.com/jerryjliu/llama_index/blob/main/examples/async/AsyncQueryDemo.ipynb
When I run
Plain Text
index = GPTSimpleVectorIndex.from_documents(documents, service_context=service_context)
start_time = time.perf_counter()
index.query(query, use_async=True)
elapsed_time = time.perf_counter() - start_time
It runs fine. But if i do
Plain Text
start_time = time.perf_counter()
index.query(query, use_async=True)
elapsed_time = time.perf_counter() - start_time
with the same index variable i get this error
Plain Text
APIError: Invalid response object from API: '{"error":{"message":"The response was filtered due to the prompt triggering Azure OpenAI’s content management policy. Please modify your prompt and retry. To learn more about our content filtering policies please read our documentation: https://go.microsoft.com/fwlink/?linkid=2198766","type":null,"param":"prompt","code":"content_filter","status":400}}' (HTTP response code was 400)
Need some help @Logan M @jerryjliu0
L
1 comment
I have no clue on this one 🤔 I wonder if it has something to do with the first query still running when you make the second query? But that seems silly haha
Add a reply
Sign up and join the conversation on Discord