Hi James,
Thank you for your patience.
We have reached out to the content author and got a confirmation saying that they had fixed the issue.
Please Accept the Answer & Upvote so that it will be useful for others in the community.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Issue: I'm getting "Function 'submit_support_ticket' not found" errors when attempting the custom functions lab at https://microsoftlearning.github.io/mslearn-ai-agents/Instructions/03-agent-custom-functions.html
Error:
ERROR:root:Error executing function 'submit_support_ticket': Function 'submit_support_ticket' not found.
Code Snippet: user_functions.py
# In user_functions.py
def submit_support_ticket(email_address: str, description: str) -> str:
# Function implementation...
return message_json
# Simple set with no type annotation
user_functions = {submit_support_ticket}
# In agent.py
from user_functions import submit_support_ticket
# Create tools
functions = FunctionTool({submit_support_ticket})
toolset = ToolSet()
toolset.add(functions)
# Create agent with tools
agent = project_client.agents.create_agent(
model=MODEL_DEPLOYMENT,
name="support-agent",
instructions="You are a technical support agent...",
toolset=toolset
)
I'm following the instructions in Lab 03 for AI Agent custom functions and consistently receive "Function 'submit_support_ticket' not found" errors when the agent attempts to use the function.
I've verified my code matches the lab and tried multiple approaches to register the function. I'm using azure-ai-projects 1.0.0b10. Is there a known issue with function registration in this version or a specific syntax required beyond what's in the lab instructions?
Any help is appreciated, thank you!
Hi James,
Thank you for your patience.
We have reached out to the content author and got a confirmation saying that they had fixed the issue.
Please Accept the Answer & Upvote so that it will be useful for others in the community.