You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
748 B
Python

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())