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

Rebecca Molnar 0 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.
3,512 questions
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
3,043 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Azar 25,375 Reputation points MVP
    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.


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.