updated missiona ndvsion generation from doc
This commit is contained in:
+2
-11
@@ -351,17 +351,8 @@ def generate_executive_goals_from_doc():
|
|||||||
if not vision_mission:
|
if not vision_mission:
|
||||||
return jsonify({"error": "Vision and Mission generation error ", "message": "Error in generating mssion and viso."}), 400
|
return jsonify({"error": "Vision and Mission generation error ", "message": "Error in generating mssion and viso."}), 400
|
||||||
|
|
||||||
# Check if both vision and mission are empty
|
response = vision_mission.get("response")
|
||||||
if not vision_mission.get('vision') and not vision_mission.get('mission'):
|
return jsonify({"data": response, "message": "vision and mission generated successfully"}), 200
|
||||||
# Cleanup: Delete all files in the upload directory if parsing fails
|
|
||||||
delete_all_files_in_directory(upload_folder)
|
|
||||||
return jsonify({"vision": [], "mission": [], "message": "The document does not contain mission and vision."}), 200
|
|
||||||
|
|
||||||
print(f"Vision and mission: {vision_mission}")
|
|
||||||
vission = vision_mission.get('vision')
|
|
||||||
mission = vision_mission.get('mission')
|
|
||||||
|
|
||||||
return jsonify({"mission": mission, "vission": vission, "message": "vision and mission generated successfully"}), 200
|
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
# Cleanup: Delete all files in the upload directory if an error occurs
|
# Cleanup: Delete all files in the upload directory if an error occurs
|
||||||
|
|||||||
@@ -36,8 +36,8 @@ class DeptMisiion(BaseModel):
|
|||||||
goals: List[str]
|
goals: List[str]
|
||||||
|
|
||||||
class VisionMissionResponse2(BaseModel):
|
class VisionMissionResponse2(BaseModel):
|
||||||
vision: List[str]
|
response: List[str]
|
||||||
mission: List[str]
|
|
||||||
|
|
||||||
class VisionMissionResponse(BaseModel):
|
class VisionMissionResponse(BaseModel):
|
||||||
vision: List[str]
|
vision: List[str]
|
||||||
|
|||||||
@@ -153,6 +153,10 @@ def get_vision_mission_extraction_from_doc2():
|
|||||||
8. If vision and mission is found in the document , extract them as it is ,no changes
|
8. If vision and mission is found in the document , extract them as it is ,no changes
|
||||||
NOTED: if the goal(mission) and vision cant not be found at all, make it empty please
|
NOTED: if the goal(mission) and vision cant not be found at all, make it empty please
|
||||||
NOTE: MAKE SURE YOU EXTRACT EVERY INFORMATION FOUND FOR VISION AND GOALS FROM THE DOCUMENT.DO NOT OMIT ANY
|
NOTE: MAKE SURE YOU EXTRACT EVERY INFORMATION FOUND FOR VISION AND GOALS FROM THE DOCUMENT.DO NOT OMIT ANY
|
||||||
|
**You must return the response in the exact HTML `<p>` format shown below, including the numbering, lettered sub-points, `<br>` tags for line breaks, and the double `<br><br>` between departments. Adhere to this format precisely.**
|
||||||
|
|
||||||
|
**Example Output Format:**
|
||||||
|
<p>Vision: To be the best in the world</p><p>Company Goals:</p><p>1. Sales<br> a. Brand Awareness: To be the best in the world<br> b. Revenue Growth: Increase annual sales by 20% through strategic partnerships and lead generation.<br><br>2. Marketing<br> a. Digital Presence: Enhance online visibility through SEO and social media campaigns.<br> b. Customer Engagement: Boost engagement via personalized content and email marketing.<br><br>3. Product Development<br> a. Innovation: Launch 3 new features based on user feedback by Q4.<br> b. Quality Assurance: Maintain product bug rate under 2% through improved testing pipelines.<br><br>4. Human Resources<br> a. Talent Acquisition: Recruit top talent and reduce time-to-hire to under 30 days.<br> b. Employee Retention: Increase employee retention by 15% through career development program.<br></p>
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user