Error code: 404 - {'error': {'code': '404', 'message': 'Resource not found'}}

Vinod S 5 Reputation points
2024-06-03T23:15:11.6233333+00:00

hi,

appreciated if anyone can help me fix this issue, everything was working like yesterday & looks like Azure OpenAI flows are not working

im using langchain API to connect with Azure OpenAI

AzureChatOpenAI( deployment_name=settings['azure_deployment_name'], model_name=settings['azure_model_name'], openai_api_key=settings['azure_openai_api_key'], openai_api_version=settings['azure_openai_api_version'], azure_endpoint=settings['azure_endpoint'], openai_api_type="azure" )

Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
4,081 questions
0 comments No comments
{count} vote

3 answers

Sort by: Most helpful
  1. Gowtham CP 6,020 Reputation points Volunteer Moderator
    2024-06-04T05:47:48.55+00:00

    Hey Vinod S ,

    Thank you for reaching out on the Microsoft Q&A .

    Try these steps to get your Azure OpenAI flows working again:

    1. Double-check environment variables: Ensure that AZURE_OPENAI_ENDPOINT (e.g., https://your-resource.azure.openai.com/) and OPENAI_API_VERSION (e.g., "2023-05-15") are set correctly.
    2. Match deployment names: Make sure the deployment_name in your code exactly matches the "Model deployment name" in the Azure portal. Remember, this is case-sensitive!
    3. Verify authentication: Confirm that your AZURE_OPENAI_API_KEY and, if applicable, AZURE_OPENAI_AD_TOKEN (for Azure AD) are set up properly for authentication.
    4. Install the openai package: Verify that you have the openai package installed by running pip install openai. This package is essential for communicating with the Azure OpenAI service.
    5. Check API version compatibility: Ensure that the openai_api_version you are using is supported by both the openai package and the Azure OpenAI service. Check the official documentation to confirm that your version (e.g., 2024-02-15-preview) is compatible.
    6. Consider package upgrades: There is a known issue with openai==1.2.3 and langchain==0.0.335. The langchain-openai package requires openai version 1.10.0 or higher. Upgrade your packages if necessary.

    Reference: GitHub issue.

    Note: Some people have resolved similar issues by using the API version 2024-02-15-preview instead of the model version displayed in the Azure table (0613). Try it out.

    I hope this helps! If you have any further questions, feel free to ask.

    If the information is useful, please accept the answer and upvote it to assist other community members.

    0 comments No comments

  2. Maria Natalia Benavides Sanabria 10 Reputation points
    2024-08-17T18:03:34.1233333+00:00

    Did you find a solution?

    0 comments No comments

  3. Maria Natalia Benavides Sanabria 10 Reputation points
    2024-08-17T18:03:58.5666667+00:00

    Did you find a solution?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.