updated sops apis and questions generator
This commit is contained in:
@@ -5,6 +5,7 @@ from src.services.chatbot import Chatbot
|
||||
from src.utils.utils import delete_all_files_in_directory
|
||||
from src.utils.document_loader import load_document
|
||||
from src.services.chatbot import Chatbot
|
||||
from src.utils.auth import auth_check
|
||||
|
||||
|
||||
# Initialize the Blueprint
|
||||
@@ -18,6 +19,7 @@ def allowed_file(filename):
|
||||
return '.' in filename and filename.rsplit('.', 1)[1].lower() in ALLOWED_EXTENSIONS
|
||||
|
||||
@bot.route('/validate_worker_document', methods=['POST'])
|
||||
@auth_check
|
||||
def validate_worker_document():
|
||||
try:
|
||||
# Retrieve form data
|
||||
@@ -63,6 +65,7 @@ def validate_worker_document():
|
||||
|
||||
|
||||
@bot.route('/predict_next_n_assessments', methods=['POST'])
|
||||
@auth_check
|
||||
def predict_next_n_assessments():
|
||||
try:
|
||||
# Retrieve JSON data from the request
|
||||
@@ -94,6 +97,7 @@ def predict_next_n_assessments():
|
||||
|
||||
|
||||
@bot.route('/use_bot_predict_assessments', methods=['POST'])
|
||||
@auth_check
|
||||
def use_bot_predict_assessments():
|
||||
try:
|
||||
# Retrieve JSON data from the request
|
||||
@@ -124,6 +128,7 @@ def use_bot_predict_assessments():
|
||||
|
||||
|
||||
@bot.route('/suggest_assessment_frequencies', methods=['POST'])
|
||||
@auth_check
|
||||
def use_bot_suggest_frequencies():
|
||||
try:
|
||||
# Retrieve JSON data from the request
|
||||
@@ -155,6 +160,7 @@ def use_bot_suggest_frequencies():
|
||||
|
||||
|
||||
@bot.route('/predict_goal_achievment_proba', methods=['POST'])
|
||||
@auth_check
|
||||
def predict_goal_achievement():
|
||||
try:
|
||||
# Retrieve JSON data from the request
|
||||
|
||||
Reference in New Issue
Block a user