import asyncio import json import os import sys # Set PYTHONPATH to include the current directory sys.path.append(os.getcwd()) from src.ircfa_interaction.tools.intention_recognition_tool import IntentionRecognitionTool async def test_intention(): tool = IntentionRecognitionTool() test_questions = [ "Bagaimana kondisi equipment 3AH-H501A saat ini?", "Apa penyebab utama kegagalannya di boiler?", "Cek status sensor di 3CO-P001B" ] for q in test_questions: print(f"\nTesting Question: {q}") result_json = tool.call({"question": q}) result = json.loads(result_json) print(json.dumps(result, indent=2)) if __name__ == "__main__": asyncio.run(test_intention())