Problems endpoint and API

Anonymous
2024-10-16T11:32:30.3033333+00:00

We have created a prompt flow in Azure AI Studio and successfully indexed data from Azure Blob Storage into Azure AI Search. The prompt flow works well within the Azure environment, and we can chat with the data using the test function in the deployment.

However, when attempting to integrate the model using the endpoint and API key in a Streamlit application, we are encountering the following issues:

424 Client Error: Failed Dependency

  • This error occurs when trying to consume the model via the endpoint from our Streamlit app.
    • Could this be related to an issue with dependencies, possibly Azure Blob Storage or Azure AI Search?
    401 Unauthorized Error with "key_auth_access_denied"
    - When testing the endpoint using Insomnia, we're getting a 401 error, which suggests there might be an issue with our API key.
    
       - We have verified the API key and used it correctly, but the issue persists.
    

Additional Details:

  • The model was successfully deployed and consumed around 30 days ago when it was smaller. Since then, we have made significant changes to the prompt flow.
  • We attempted to revert to an older version of the model to bypass the problem and also disabled tracing (token count and time registration), but the errors remain.

However, when attempting to integrate the model using the endpoint and API key in a Streamlit application, we are encountering the following issues:

424 Client Error: Failed Dependency

  • This error occurs when trying to consume the model via the endpoint from our Streamlit app.
    • Could this be related to an issue with dependencies, possibly Azure Blob Storage or Azure AI Search?
    401 Unauthorized Error with "key_auth_access_denied"
    - When testing the endpoint using Insomnia, we're getting a 401 error, which suggests there might be an issue with our API key.
    
       - We have verified the API key and used it correctly, but the issue persists.
    

around:

  • Ensuring proper API key authentication.
  • Addressing the "Failed Dependency" error when consuming the model via the endpoint.

Thank you!

Azure Machine Learning
Azure Machine Learning
An Azure machine learning service for building and deploying models.
3,336 questions
Azure AI Search
Azure AI Search
An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.
1,343 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,940 questions
0 comments No comments
{count} votes

Accepted answer
  1. YutongTie-MSFT 53,966 Reputation points Moderator
    2024-10-16T18:54:11.13+00:00

    Hello @Diderik.TWC

    Thanks for reaching out to us, it may be related to the dependencies, but as your said this issue occurs when trying to consume the model via Steamlit, it may be related to the Streamlit as well. Could you please check on your CORS setting to see if your service/endpoint allows Streamlit to connect?

    I would highly commend your connecting with Streamlit support to see if there is any set up need to be done.

    At the meantime, I am happy to enable you a free ticket to connect with Azure Support as well if you want to double check on both sides.

    Basically for 424 and 401 errors, I think you have checked on below items but still want to double click on it - 424 Client Error: Failed Dependency

    This error typically indicates that a request could not be completed because it depended on another action that failed. Here are a few steps to troubleshoot this:

    Check Dependencies: Since you mentioned Azure Blob Storage and Azure AI Search, ensure that both services are accessible and properly configured. Verify that the data in Azure Blob Storage is available and correctly indexed in Azure AI Search.

    Logs and Diagnostics: Look into the logs of both Azure AI Studio and Azure Blob Storage. They might provide more context on what failed.

    Model Changes: Given that significant changes were made to the prompt flow, it's possible that the new changes introduced some dependencies or requirements that are not being met. Review the changes to ensure everything is correctly configured.

    401 Unauthorized Error: key_auth_access_denied

    A 401 error usually points to authentication issues. Here’s how to address this:

    • Verify API Key: Double-check the API key you’re using. Make sure it's the correct one associated with your deployed model. If possible, regenerate the key and update your Streamlit application.
    • Access Permissions: Ensure that the API key has the necessary permissions to access the deployed model. You can check this in the Azure portal under the corresponding resource.
    • Endpoint Configuration: Make sure you're using the correct endpoint URL for your model. Sometimes, different environments (like development vs. production) might have different endpoints.
    • CORS Settings: If you’re running the Streamlit app locally, ensure that CORS (Cross-Origin Resource Sharing) settings on your Azure resources allow requests from your local environment.

    I hope this helps!

    Regards,

    Yutong

    -Please kindly accept the answer if you feel helpful to support the community, thanks a lot.

    0 comments No comments

0 additional answers

Sort by: Most helpful

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.