mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
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:
committed by
GitHub
Unverified
parent
b3e96b80ae
commit
79bb87061b
+1
-1
@@ -50,7 +50,7 @@ async def main() -> None:
|
||||
# Create the AIFunction tool using dependency injection
|
||||
# The 'definition' dictionary contains the serialized tool configuration,
|
||||
# while the actual function implementation is provided via dependencies.
|
||||
#
|
||||
#
|
||||
# Dependency structure: {"ai_function": {"name:add_numbers": {"func": func}}}
|
||||
# - "ai_function": matches the tool type identifier
|
||||
# - "name:add_numbers": instance-specific injection targeting tools with name="add_numbers"
|
||||
|
||||
@@ -45,7 +45,7 @@ async def approval_example() -> None:
|
||||
# Check for approval requests
|
||||
if result.user_input_requests:
|
||||
for request in result.user_input_requests:
|
||||
print(f"\nApproval needed:")
|
||||
print("\nApproval needed:")
|
||||
print(f" Function: {request.function_call.name}")
|
||||
print(f" Arguments: {request.function_call.arguments}")
|
||||
|
||||
@@ -79,12 +79,12 @@ async def rejection_example() -> None:
|
||||
|
||||
if result.user_input_requests:
|
||||
for request in result.user_input_requests:
|
||||
print(f"\nApproval needed:")
|
||||
print("\nApproval needed:")
|
||||
print(f" Function: {request.function_call.name}")
|
||||
print(f" Arguments: {request.function_call.arguments}")
|
||||
|
||||
# User rejects
|
||||
print(f" Decision: Rejected")
|
||||
print(" Decision: Rejected")
|
||||
|
||||
# Send rejection response
|
||||
rejection_response = request.create_response(approved=False)
|
||||
|
||||
Reference in New Issue
Block a user