import sys import os # Add parent directory to path to allow imports from app sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) try: from app.services.industry_ai import IndustryAI print("Initializing IndustryAI...") industry_ai = IndustryAI() query = "I have fever" industry = "Healthcare" # Testing Title Case compatibility print(f"\nTesting Query: '{query}'") print(f"Industry: '{industry}'") response, confidence, needs_contact = industry_ai.get_industry_dataset_response(query, industry) print("\n--- RESULT ---") print(f"Response: {response}") print(f"Confidence: {confidence}") print(f"Needs Contact: {needs_contact}") if response and "symptoms" in response.lower(): print("\n✅ SUCCESS: Logic works correctly.") else: print("\n❌ FAILURE: Logic did not return expected response.") except Exception as e: import traceback traceback.print_exc() print(f"\n❌ EXCEPTION: {e}")