How to fix No connection of type ConnectionType.AZURE_AI_SERVICES found error

Rebecca Molnar 20 Reputation points
2025-01-11T19:30:05.25+00:00

I'm attempting to follow the setup for creating a RAG app using this site:

https://learn.microsoft.com/en-us/azure/ai-studio/tutorials/copilot-sdk-create-resources?tabs=windows

After doing the first step, I get this error:

azure.core.exceptions.ResourceNotFoundError: No connection of type ConnectionType.AZURE_AI_SERVICES found

If I cut it down to find where the error is happening, it's on this line:

chat = project.inference.get_chat_completions_client()

My models are all deployed and I've triple-checked the .env file for the connection string.

Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Azar 31,610 Reputation points MVP Volunteer Moderator
    2025-01-12T15:30:31.7366667+00:00

    Hi there Rebecca Molnar

    Thnx for using QandA platform

    Guess required Azure AI Services connection is either missing or improperly configured in your setup. make sure that you have created and linked a connection of type ConnectionType.AZURE_AI_SERVICES in your Azure AI project. Verify that your .env file contains the correct connection strings and environment variables, as any inaccuracies can lead to connection issues.

    If this helps kindly accept the answer thanks much.


  2. AshokPeddakotla-MSFT 36,006 Reputation points Moderator
    2025-01-16T08:06:00.66+00:00

    Rebecca Molnar I'm glad that your issue is resolved and thank you for posting your solution so that others experiencing the same thing can easily reference this!

    Since the Microsoft Q&A community has a policy that the question author cannot accept their own answer, they can only accept answers by others, I'll repost your solution in case you'd like to Accept the answer.

    Error Message:

    I'm attempting to follow the setup for creating a RAG app using this site:

    https://learn.microsoft.com/en-us/azure/ai-studio/tutorials/copilot-sdk-create-resources?tabs=windows

    After doing the first step, I get this error:

    azure.core.exceptions.ResourceNotFoundError: No connection of type ConnectionType.AZURE_AI_SERVICES found

    If I cut it down to find where the error is happening, it's on this line:

    chat = project.inference.get_chat_completions_client()

    My models are all deployed and I've triple-checked the .env file for the connection string.

    Solution:

    I had to create a new instance of type: Azure AI Service within the correct region for it to recognize the models.

    If you have any other questions, please let me know. Thank you again for your time and patience throughout this issue.

    0 comments No comments

Your answer

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