improved on sops generations on questions and added bot suggestion

This commit is contained in:
2024-09-16 23:38:33 +00:00
parent cd8f499f97
commit 47a274741f
10 changed files with 228 additions and 21 deletions
+17 -2
View File
@@ -25,7 +25,7 @@ response2 = bot.predict_next_n_assessment(
)
print(f"Predictions {response2}")
'''
from src.services.chatbot import Chatbot
company_info = {
@@ -40,8 +40,23 @@ response = bot.predict_based_on_past_assessment(
companyid="testid"
)
print(f"Result: {response}")
print(f"Result: {response}")'''
from src.services.sop_document_parser import DocumentParser
from src.utils.document_loader import load_document
path = r"/root/ds_erp_ai/data/raw/test_sop.pdf"
parser = DocumentParser()
workers_department = [
{"name": "sales", "workers": ["sales manager"]},
{"name": "development", "workers": ["deployment officer"]}
]
res = parser.extract_sops_for_workers_by_department(
docs=load_document(path), # Load the document for processing
depts_workers=workers_department
)
print(res)