22 lines
648 B
Python
22 lines
648 B
Python
from src.services.sop_generator import SopGenerator
|
|
from src.utils.document_loader import load_document
|
|
|
|
|
|
file_path = "/root/ds_erp_ai/data/raw/test_sop.pdf"
|
|
docs = load_document(file_path)
|
|
sop = SopGenerator()
|
|
|
|
|
|
if __name__ == "__main__":
|
|
# Assuming 'sop' is an instance of SopGenerator and 'docs' is the loaded document content.
|
|
|
|
# Step 1: Get the roles from the document
|
|
roles = sop.get_roles(docs)["roles"]
|
|
print(f"Roles {roles}")
|
|
|
|
sop_status = sop.check_role_sop(roles=roles, docs=docs)
|
|
print(sop_status)
|
|
roles = ["cloud engineer"]
|
|
sops = sop.generate_sops(roles=roles,docs=docs)
|
|
print(f"sops:{sops}")
|