updated sops apis and questions generator
This commit is contained in:
@@ -1,81 +1,3 @@
|
||||
# Example usage
|
||||
'''from scripts.run_assessment_prediction_trainer import CompanyModelPipeline
|
||||
company_ids = ['testid']
|
||||
input_base_path = '/root/ds_erp_ai/data/raw/erp_assessment_prediction' # The base path where the raw data for each company is stored
|
||||
|
||||
pipeline = CompanyModelPipeline(company_ids=company_ids, input_base_path=input_base_path)
|
||||
pipeline.run_pipeline()'''
|
||||
|
||||
'''from src.pipeline.inference import AssessmentInference
|
||||
|
||||
inference = AssessmentInference(
|
||||
company_id="testid",num_assessments=2
|
||||
)
|
||||
|
||||
result = inference.run()
|
||||
|
||||
|
||||
print(result)
|
||||
'''
|
||||
'''
|
||||
response2 = bot.predict_next_n_assessment(
|
||||
company_info=company_info,
|
||||
companyid="testid",
|
||||
N=3
|
||||
)
|
||||
|
||||
print(f"Predictions {response2}")
|
||||
|
||||
|
||||
from src.services.chatbot import Chatbot
|
||||
company_info = {
|
||||
'company_name': "ABC Corp",
|
||||
'company_size': "Medium", # Can be "Small", "Medium", or "Large"
|
||||
'departments': ["Sales", "Marketing", "IT", "Finance", "HR", "Logistics"]
|
||||
}
|
||||
bot = Chatbot()
|
||||
response = bot.predict_based_on_past_assessment(
|
||||
query="Should i make my next assessment weekly or biweekly to meet up to deadline?",
|
||||
company_info=company_info,
|
||||
companyid="testid"
|
||||
)
|
||||
|
||||
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)'''
|
||||
|
||||
from src.services.chatbot import Chatbot
|
||||
|
||||
bot = Chatbot(
|
||||
)
|
||||
|
||||
company_info = {
|
||||
"company_name": "Example Co",
|
||||
"company_size": "Medium",
|
||||
"departments": ["HR", "Finance", "IT"]
|
||||
}
|
||||
|
||||
response = bot.predict_goal_achievement_probability(
|
||||
company_info=company_info,
|
||||
companyid="testid"
|
||||
)
|
||||
|
||||
|
||||
print(response)
|
||||
import os
|
||||
API_KEY = "erp_" + os.urandom(16).hex()
|
||||
print(API_KEY)
|
||||
Reference in New Issue
Block a user