Files
erp_ai/test.py
T

16 lines
587 B
Python
Raw Normal View History

2024-09-11 14:46:03 +01:00
# Example usage of the Chatbot class:
from src.services.chatbot import Chatbot
from src.utils.document_loader import load_document
if __name__ == "__main__":
chatbot = Chatbot()
2024-09-11 14:46:03 +01:00
# Example inputs
path = r"C:\Users\User\Desktop\Blessing_AI\MKD\test_erp_ai\erp_ai\test\erp_ai\data\raw\coding_task_completion_document.pdf"
2024-09-10 02:51:31 +01:00
2024-09-11 14:46:03 +01:00
question = "Have you completed Task X?"
user_input = "Yes"
docs = load_document(path)
2024-09-10 02:51:31 +01:00
2024-09-11 14:46:03 +01:00
# Validate the worker's answer using the provided document
validation_result = chatbot.validate_worker(question, docs)
print(validation_result)