| |
| """ |
| Quick Demo of the Conversational AI System |
| Shows key features and capabilities |
| Author: MiniMax Agent |
| """ |
|
|
| from conversational_ai import IntelligentConversationalAI, demonstrate_ai_capabilities |
|
|
| def quick_demo(): |
| """Quick demonstration of AI features""" |
| print("🚀 QUICK DEMO: Conversational AI System") |
| print("=" * 50) |
| |
| |
| ai = IntelligentConversationalAI() |
| session = ai.create_conversation() |
| |
| print("✅ AI System initialized successfully!") |
| print(f"📝 Session ID: {session}") |
| print() |
| |
| |
| print("🎯 KEY FEATURES DEMONSTRATION:") |
| print("-" * 30) |
| |
| |
| print("\n1. 🔍 Pattern Recognition:") |
| test_messages = [ |
| "Hello there!", |
| "What's the weather like?", |
| "Can you help me?", |
| "What time is it?" |
| ] |
| |
| for msg in test_messages: |
| response = ai.process_message(session, msg) |
| print(f" Input: '{msg}'") |
| print(f" AI: {response}") |
| print() |
| |
| |
| print("\n2. 🧠 Contextual Memory:") |
| contextual_messages = [ |
| "I love Python programming.", |
| "It's such a versatile language.", |
| "Machine learning is fascinating!" |
| ] |
| |
| for msg in contextual_messages: |
| response = ai.process_message(session, msg) |
| print(f" User: {msg}") |
| print(f" AI: {response}") |
| |
| |
| print("\n3. 🎭 Personality System:") |
| personalities = ["friendly", "professional", "casual", "intellectual"] |
| |
| for personality in personalities: |
| ai.set_personality(personality) |
| test_msg = "This is an interesting conversation." |
| response = ai.process_message(session, test_msg) |
| print(f" {personality.title()}: {response}") |
| |
| |
| print("\n4. 📊 Conversation Analysis:") |
| summary = ai.get_conversation_summary(session) |
| print(f" Total messages: {summary['message_count']}") |
| print(f" Topics discussed: {', '.join(summary['topics_discussed']) if summary['topics_discussed'] else 'None identified'}") |
| print(f" Session duration: {summary['duration']}") |
| |
| print("\n" + "=" * 50) |
| print("🎉 Demo completed! The AI system is ready for use.") |
| print("Run 'python conversational_ai.py' for full interactive mode.") |
| print("=" * 50) |
|
|
|
|
| def feature_showcase(): |
| """Showcase specific AI capabilities""" |
| print("\n🎪 AI CAPABILITIES SHOWCASE") |
| print("=" * 40) |
| |
| ai = IntelligentConversationalAI() |
| session = ai.create_conversation() |
| |
| |
| print("\n💝 Emotional Intelligence:") |
| emotional_inputs = [ |
| "I'm feeling really excited about learning AI!", |
| "I'm a bit worried about my project.", |
| "This makes me happy!" |
| ] |
| |
| for emotion in emotional_inputs: |
| response = ai.process_message(session, emotion) |
| print(f" User: {emotion}") |
| print(f" AI: {response}") |
| print() |
| |
| |
| print("\n📚 Knowledge Integration:") |
| knowledge_queries = [ |
| "Tell me about artificial intelligence.", |
| "How does machine learning work?", |
| "What's the difference between AI and machine learning?" |
| ] |
| |
| for query in knowledge_queries: |
| response = ai.process_message(session, query) |
| print(f" Question: {query}") |
| print(f" AI: {response}") |
| print() |
| |
| |
| print("\n🔄 Adaptive Responses:") |
| adaptive_inputs = [ |
| "That's a complex topic.", |
| "I disagree with that point.", |
| "That's exactly what I was thinking!" |
| ] |
| |
| for adaptive in adaptive_inputs: |
| response = ai.process_message(session, adaptive) |
| print(f" User: {adaptive}") |
| print(f" AI: {response}") |
| print() |
|
|
|
|
| if __name__ == "__main__": |
| print("Choose demo type:") |
| print("1. Quick Demo (Core Features)") |
| print("2. Full Showcase (All Capabilities)") |
| print("3. Exit") |
| |
| while True: |
| try: |
| choice = input("\nSelect option (1-3): ").strip() |
| |
| if choice == "1": |
| quick_demo() |
| break |
| elif choice == "2": |
| quick_demo() |
| print("\n") |
| feature_showcase() |
| break |
| elif choice == "3": |
| print("Goodbye! 👋") |
| break |
| else: |
| print("Invalid choice. Please select 1, 2, or 3.") |
| |
| except KeyboardInterrupt: |
| print("\n\nGoodbye! 👋") |
| break |