Azure / azure-search-vector-samples

A repository of code samples for Vector search capabilities in Azure AI Search.
https://azure.microsoft.com/products/search
MIT License
690 stars 285 forks source link

llama-index integration small bug #217

Closed hristochr closed 2 months ago

hristochr commented 3 months ago

The last code block in azure-search-vector-python-llamaindex-sample.ipynb is

query_engine = index.as_query_engine()
response = query_engine.query("What is included in my Northwind Health Plus plan that is not in standard?")
print(response)

produces the following output: Retrying llama_index.llms.openai.base.OpenAI._chat in 0.6477483098891258 seconds as it raised NotFoundError: Error code: 404 - {'error': {'code': 'DeploymentNotFound', 'message': 'The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again.'}}.

The llm instance must be passed to the as_query_engine method so the sample works fully:

query_engine = index.as_query_engine(llm)
mattgotteiner commented 2 months ago

Thanks, i'll try to fix this. appreciate the bug report