Assistant checkpoint: Clean up response display format

Assistant generated file changes:
- examples/mcp_example/mock_multi_agent.py: Clean up response display

---

User prompt:

why im getthin the th all the thisnds what the ussedshoudl get only that thisnthe usereshoudl get whr its reuntet esoleutjoin whic is not necessaly "
Multi-Agent Math System
Enter 'exit' to quit

Enter a math problem: add 3 and235
╭────────────────────────── Agent Name Calculator [Max Loops: 1 ] ──────────────────────────╮
│ Calculator: To add 3 and 235, you can perform the calculation:                            │
│                                                                                           │
│ 3 + 235 = 238.                                                                            │
╰───────────────────────────────────────────────────────────────────────────────────────────╯

==================================================
Results:
==================================================

[Calculator]
--------------------------------------------------
System: : Your Name: Calculator

 Your Description: Calculator agent specializing in mathematical calculations. For Calculator: use add, multiply, divide operations. For Stock Analyst: use moving averages and percentage change calculations.

 You are Calculator, a math processing agent. You have access to these mathematical operations ONLY: addition, multiplication, and division. Only suggest calculations using these available tools. Do not attempt to solve problems requiring other operations like percentages, square roots, or advanced math. When users ask about capabilities, list only the basic operations you can perform.

Human:: add 3 and235

Calculator: To add 3 and 235, you can perform the calculation:

3 + 235 = 238.

==================================================

Enter a math problem: "

Replit-Commit-Author: Assistant
Replit-Commit-Session-Id: fb95cfda-0201-499a-811b-4d56364a96ec
Pavan Kumar 3 months ago
parent 2db7e12a9b
commit 5dfee63f16

@ -137,20 +137,23 @@ class MultiAgentMathSystem:
results = asyncio.run(self.process_task(user_input))
print("\n" + "="*50)
print("Results:")
print("\nResults:")
print("="*50)
for result in results:
if result["response"] is not None: # Only show responses from relevant agents
if "error" in result:
print(f"\n[{result['agent']}]")
print("-"*50)
print(f"Error: {result['error']}")
else:
print(f"\n[{result['agent']}]")
print("-"*50)
print(f"{result['response']}")
print("\n" + "="*50)
# Only show the actual calculation result, not the system information
response = result["response"]
if isinstance(response, str):
# Remove system information and keep only the calculation part
if "=" in response:
calculation = response.split("=")[-1].strip()
print(f"Result: {calculation}")
else:
print(response)
print("="*50)
except Exception as e:
print(f"System error: {str(e)}")

Loading…
Cancel
Save