Python: Clean up imports (#2318)

* chore: tidy imports

* Update python/packages/azurefunctions/agent_framework_azurefunctions/_errors.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update python/packages/azurefunctions/agent_framework_azurefunctions/_callbacks.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* chore: revert stub file change

* chore: trigger pre-commit hook, re-add `annotations` import

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Brandon McConnell
2025-11-19 18:41:01 -05:00
committed by GitHub
Unverified
parent b3e96b80ae
commit 79bb87061b
45 changed files with 191 additions and 228 deletions
@@ -15,9 +15,9 @@ from agent_framework import (
FunctionInvocationContext,
Role,
TextContent,
ai_function,
chat_middleware,
function_middleware,
ai_function
)
from agent_framework.azure import AzureOpenAIChatClient
from agent_framework_devui import register_cleanup
@@ -122,6 +122,7 @@ def get_forecast(
return f"Weather forecast for {location}:\n" + "\n".join(forecast)
@ai_function(approval_mode="always_require")
def send_email(
recipient: Annotated[str, "The email address of the recipient."],
@@ -131,6 +132,7 @@ def send_email(
"""Simulate sending an email."""
return f"Email sent to {recipient} with subject '{subject}'."
# Agent instance following Agent Framework conventions
agent = ChatAgent(
name="AzureWeatherAgent",