Spaces:
No application file
No application file
File size: 1,315 Bytes
bce4c09 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
#!/usr/bin/env python3
"""
Quick test to verify the refactored AgentBrown works
"""
from agents.brown import AgentBrown, StoryboardRequest
def test_refactored_brown():
"""Test the refactored AgentBrown"""
print("π§ͺ Testing refactored AgentBrown...")
# Create agent
brown = AgentBrown(max_iterations=3)
print("β
AgentBrown created successfully")
# Create test request
request = StoryboardRequest(
prompt="A cat finds a magical book in an old library",
style_preference="anime",
panels=3,
language="english",
extras=["narration"],
)
print("β
StoryboardRequest created")
# Process request
try:
message = brown.process_request(request)
print("β
Request processed successfully")
print(f"π¨ Generated message ID: {message.message_id}")
print(f"π― Message type: {message.message_type}")
print(f"π Session info: {brown.get_session_info()}")
return True
except Exception as e:
print(f"β Error processing request: {e}")
return False
if __name__ == "__main__":
success = test_refactored_brown()
if success:
print("\nπ Refactoring successful! All functionality working.")
else:
print("\nπ₯ Refactoring needs fixes.")
|