Unable to use azure Grounding with bing search with azure ai agent in python, Getting Resource not found error.
Srija Lingamgunta
0
Reputation points
I am having issues when trying to run this code:
I am getting an error 404 resource not found.
Traceback (most recent call last):
File "C:\Users\Downloads\bingtest\binggrounding.py", line 30, in <module>
agent = agents_client.create_agent(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Downloads\bingtest\myenv\Lib\site-packages\azure\core\tracing\decorator.py", line 119, in wrapper_use_tracer
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Downloads\bingtest\myenv\Lib\site-packages\azure\ai\agents\_patch.py", line 294, in create_agent
new_agent = super().create_agent(
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Downloads\bingtest\myenv\Lib\site-packages\azure\core\tracing\decorator.py", line 119, in wrapper_use_tracer
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Downloads\bingtest\myenv\Lib\site-packages\azure\ai\agents\operations\_operations.py", line 5308, in create_agent
map_error(status_code=response.status_code, response=response, error_map=error_map)
File "C:\Users\Downloads\bingtest\myenv\Lib\site-packages\azure\core\exceptions.py", line 163, in map_error
raise error
azure.core.exceptions.ResourceNotFoundError: (404) Resource not found
Code: 404
Message: Resource not found
I have AI foundry resource in my Azure and I created Grounding with bing search resource. I connected the Grounding with Bing search resource in connected resources tab of Azure AI foundry resource.i have used the below string for Azure Bing Connection Id in my environmental variables.
/subscriptions/<your_subscription_id>/resourceGroups/<your_resource_group>/providers/Microsoft.CognitiveServices/accounts/<ai_service_name>/projects/<foundry-project-name>/connections/<connection_name_created_above>
I have used "ai_service_name" same as resource name(?) Is that right?
This is my AI foundry resource. I used Azure AI inference endpoint as Project Endpoint.
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
3,653 questions
Sign in to answer