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

Error: NotFoundError - Resource not found while implementing llama index with Azure OpenAI for fine-tuning #223

Open loyal812 opened 2 months ago

loyal812 commented 2 months ago

Description: During the implementation of the llama index with Azure OpenAI for fine-tuning, the following error occurred:

Retrying llama_index.llms.openai.base.OpenAI._chat in 0.6394267984578837 seconds as it raised NotFoundError: Error code: 404 - {'error': {'code': '404', 'message': 'Resource not found'}}.

Code snippet:

# Perform query to retrieve the contexts and answers for the generated questions

self.llm = OpenAI(
    api_base=self.azure_openai_endpoint,
    api_key=self.azure_openai_api_key,
    api_version=self.azure_openai_api_version,
    model=self.model,
    temperature=self.temperature
)

query_engine = index.as_query_engine(similarity_top_k=2, llm=self.llm)

Additional Information: The error seems to be related to a NotFound error with code 404 indicating that the requested resource was not found.

Problem Statement: The issue occurs while trying to execute the query using Azure OpenAI. The error message suggests that the resource being requested is not found.

Solution Required: Please provide guidance on how to resolve this issue as I am unsure how to proceed.

mattgotteiner commented 2 months ago

Is the name of the deployment the same as the model? Azure OpenAI has an ability to change the name of the deployment compared to the model. Please see the llama index sample for more information

https://github.com/Azure/azure-search-vector-samples/blob/main/demo-python/code/community-integration/llamaindex/azure-search-vector-python-llamaindex-sample.ipynb