Hi, I'm getting this error while connecting an Azure Function (that triggers with Azure Storage Queues) as tool to an Azure AI Agent, something like this:
project_client = AIProjectClient(
endpoint=os.getenv("PROJECT_ENDPOINT"),
credential=DefaultAzureCredential(),
)
async with project_client:
agents_client = project_client.agents
storage_service_endpoint = os.getenv("STORAGE_SERVICE_ENDPOINT")
azure_function_tool = AzureFunctionTool(
name="SumTrigger",
description="Makes a sum.",
parameters={
"type": "object",
"properties": {
"a": {"type": "number", "description": "The first number to add."},
"b": {"type": "number", "description": "The second number to add."},
},
},
input_queue=AzureFunctionStorageQueue(
queue_name="azure-function-sum-input",
storage_service_endpoint=storage_service_endpoint,
),
output_queue=AzureFunctionStorageQueue(
queue_name="azure-function-sum-output",
storage_service_endpoint=storage_service_endpoint,
),
)
agent = await agents_client.create_agent(
model=os.getenv("MODEL_DEPLOYMENT_NAME"),
name="azure-function-agent-sum",
instructions=f"You are a helpful support agent. Use the provided function any time the user wants to make a sum.",
tools=azure_function_tool.definitions,
)
I'm getting the error when creating the agent:
"HttpResponseError: (None) Invalid tool value(s): azure_function. Use the Enterprise Standard offering to access these tool(s). Code: None Message: Invalid tool value(s): azure_function. Use the Enterprise Standard offering to access these tool(s)."
Seems to be that the agent is not able to connect to the tool.
Does anyone have any ideas for this?