GuglielmoTor commited on
Commit
41fa83f
·
verified ·
1 Parent(s): b27237e

Update features/insight_and_tasks/agents/task_extraction_model.py

Browse files
features/insight_and_tasks/agents/task_extraction_model.py CHANGED
@@ -127,13 +127,14 @@ def extract_tasks_from_text(user_text_input: str, api_key: str) -> TaskExtractio
127
 
128
  quarter, year, days_remaining, current_date_obj = get_quarter_info()
129
  current_date_iso = current_date_obj.isoformat()
 
130
 
131
  # Construct the detailed prompt for the LLM
132
  prompt = f"""You are a Time-Aware Task Extraction Specialist, an AI expert in meticulously analyzing strategic insights (e.g., from LinkedIn analytics) and transforming them into a structured set of actionable tasks, organized within an Objectives and KeyResults (OKRs) framework.
133
 
134
  Your output MUST be a valid JSON object that strictly conforms to the 'TaskExtractionOutput' schema provided.
135
  EXAMPLE STRUCTURE (follow this pattern exactly):
136
- {json.dumps(create_example_structure, indent=2)}
137
 
138
  CURRENT CONTEXTUAL INFORMATION (CRITICAL - Use these exact values in your output where specified):
139
  - Current Quarter: Q{quarter}
 
127
 
128
  quarter, year, days_remaining, current_date_obj = get_quarter_info()
129
  current_date_iso = current_date_obj.isoformat()
130
+ example_structure = create_example_structure()
131
 
132
  # Construct the detailed prompt for the LLM
133
  prompt = f"""You are a Time-Aware Task Extraction Specialist, an AI expert in meticulously analyzing strategic insights (e.g., from LinkedIn analytics) and transforming them into a structured set of actionable tasks, organized within an Objectives and KeyResults (OKRs) framework.
134
 
135
  Your output MUST be a valid JSON object that strictly conforms to the 'TaskExtractionOutput' schema provided.
136
  EXAMPLE STRUCTURE (follow this pattern exactly):
137
+ {json.dumps(example_structure, indent=2)}
138
 
139
  CURRENT CONTEXTUAL INFORMATION (CRITICAL - Use these exact values in your output where specified):
140
  - Current Quarter: Q{quarter}