-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Closed
Labels
agentsbugSomething isn't workingSomething isn't workingpythonPull requests for the Python Semantic KernelPull requests for the Python Semantic Kernel
Description
Describe the bug
I was following the multi agent orchestrating - handoff tutorial and it has this piece of code which says its for logging the different steps involved in the entire process.
def agent_response_callback(message: ChatMessageContent) -> None:
"""Observer function to print the messages from the agents.
Please note that this function is called whenever the agent generates a response,
including the internal processing messages (such as tool calls) that are not visible
to other agents in the orchestration.
"""
print(f"{message.name}: {message.content}")
for item in message.items:
if isinstance(item, FunctionCallContent):
print(f"Calling '{item.name}' with arguments '{item.arguments}'")
if isinstance(item, FunctionResultContent):
print(f"Result from '{item.name}' is '{item.result}'")
To Reproduce
Steps to reproduce the behavior:
- Run this file
- Follow the example input/outputs
Expected behavior
Expected to see a clear trace of all the events that occured during the process.
Screenshots
If applicable, add screenshots to help explain your problem.
Platform
- Language: Python
- Source: pip, version 1.33.0
- AI model: Azure OpenAI:GPT-4o
- IDE: VS Code
- OS: Windows
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
agentsbugSomething isn't workingSomething isn't workingpythonPull requests for the Python Semantic KernelPull requests for the Python Semantic Kernel
Type
Projects
Status
No status