diff --git a/src/api/routes/sops.py b/src/api/routes/sops.py index 811bd35..5d6ada4 100644 --- a/src/api/routes/sops.py +++ b/src/api/routes/sops.py @@ -29,6 +29,7 @@ def get_roles(): return jsonify({"error": "No file part", "message": "Please upload a file with the key 'document'."}), 400 file = request.files['document'] + role_slug = request.form.get('role_slug') # If the user does not select a file, the browser may also submit an empty part without filename if file.filename == '': @@ -48,7 +49,7 @@ def get_roles(): # Generate roles from the docs parser = DocumentParser() - roles = parser.get_roles(docs)["roles"] + roles = parser.get_roles_using_slug(docs,role_slug)["roles"] # Cleanup: Delete all files in the upload directory after processing delete_all_files_in_directory(upload_folder) diff --git a/src/prompts/sops.py b/src/prompts/sops.py index 599a089..4e7aa79 100644 --- a/src/prompts/sops.py +++ b/src/prompts/sops.py @@ -156,8 +156,11 @@ def get_vision_mission_extraction_from_doc2(): **You must return the response in the exact HTML `
` format shown below, including the numbering, lettered sub-points, `
` tags for line breaks, and the double `
` between departments. Adhere to this format precisely.**
NOTE: IF NO departments are provided, consider all departments found in the documents, do not omit any
-**Example Output Format:**
-
Vision: To be the best in the world
Company Goals:
1. Sales
a. Brand Awareness: To be the best in the world
b. Revenue Growth: Increase annual sales by 20% through strategic partnerships and lead generation.
2. Marketing
a. Digital Presence: Enhance online visibility through SEO and social media campaigns.
b. Customer Engagement: Boost engagement via personalized content and email marketing.
3. Product Development
a. Innovation: Launch 3 new features based on user feedback by Q4.
b. Quality Assurance: Maintain product bug rate under 2% through improved testing pipelines.
4. Human Resources
a. Talent Acquisition: Recruit top talent and reduce time-to-hire to under 30 days.
b. Employee Retention: Increase employee retention by 15% through career development program.
Vision: To create a future where our organization is recognized for its contributions and effectiveness in achieving its goals.
" +“Company Goals:
1. Account Management: Manage accounts effectively to enhance customer satisfaction and retention.
a. Financial Stability: Finance the company to ensure long-term sustainability and growth.
3. Account
a. Account Management: Manage accounts effectively to enhance customer satisfaction and retention.
Vision: To be the best in the world
Company Goals:
1. Sales
a. Brand Awareness: To be the best in the world
b. Revenue Growth: Increase annual sales by 20% through strategic partnerships and lead generation.
2. Marketing
a. Digital Presence: Enhance online visibility through SEO and social media campaigns.
b. Customer Engagement: Boost engagement via personalized content and email marketing.
3. Product Development
a. Innovation: Launch 3 new features based on user feedback by Q4.
b. Quality Assurance: Maintain product bug rate under 2% through improved testing pipelines.
4. Human Resources
a. Talent Acquisition: Recruit top talent and reduce time-to-hire to under 30 days.
b. Employee Retention: Increase employee retention by 15% through career development program.
Vision: To create a future where our organization is recognized for its contributions and effectiveness in achieving its goals.
" +“Company Goals:
1. Account Management: Manage accounts effectively to enhance customer satisfaction and retention.
a. Financial Stability: Finance the company to ensure long-term sustainability and growth.
3. Account
a. Account Management: Manage accounts effectively to enhance customer satisfaction and retention.