Bhaskar2611 commited on
Commit
fab914c
·
verified ·
1 Parent(s): dc69336

Update planner.py

Browse files
Files changed (1) hide show
  1. planner.py +17 -13
planner.py CHANGED
@@ -19,17 +19,21 @@ def generate_task_plan(goal: str) -> str:
19
  {
20
  "role": "user",
21
  "content": (
22
- "You are a smart project planner. Break down the following goal into a clear, actionable task list.\n\n"
23
- "Requirements:\n"
24
- "- Number each task (1., 2., 3., ...)\n"
25
- "- Include a realistic deadline as 'Due: Day X' (start from Day 1)\n"
26
- "- Specify dependencies as 'Depends on: Task N' or 'None'\n"
27
- "- Add a short description for each task\n"
28
- "- Keep it practical and time-bound\n\n"
29
- "Example format:\n"
30
- "1. Research market needs - Due: Day 1 - Depends on: None\n"
31
- " Description: Interview 5 potential users about pain points.\n\n"
32
- f"Goal: \"{goal}\""
 
 
 
 
33
  )
34
  }
35
  ]
@@ -38,8 +42,8 @@ def generate_task_plan(goal: str) -> str:
38
  response = client.chat.completions.create(
39
  model="Qwen/Qwen2.5-Coder-7B-Instruct",
40
  messages=messages,
41
- max_tokens=600,
42
- temperature=0.4,
43
  top_p=0.95,
44
  stream=False
45
  )
 
19
  {
20
  "role": "user",
21
  "content": (
22
+ "You are a strict project planner. Break down the following goal into actionable tasks.\n\n"
23
+ "RULES:\n"
24
+ "- The project must be COMPLETE within the timeframe stated in the goal.\n"
25
+ "- If the goal says 'in 2 weeks', you have EXACTLY 14 days — NO task can be due after Day 14.\n"
26
+ "- All deadlines must be between Day 1 and Day 14 (inclusive).\n"
27
+ "- Do NOT invent extra days. If the goal says 'in X days/weeks', convert it to total days and respect it.\n"
28
+ "- Number tasks clearly (1., 2., 3., ...).\n"
29
+ "- For each task, include: 'Due: Day N', 'Depends on: ...', and a short description.\n"
30
+ "- Keep tasks realistic and parallelizable where possible.\n"
31
+ "- NEVER output a task with 'Due: Day 15' or beyond if the limit is 14 days.\n\n"
32
+ "Example (for a 5-day goal):\n"
33
+ "1. Draft requirements - Due: Day 1 - Depends on: None\n"
34
+ " Description: ...\n\n"
35
+ f"GOAL TO PLAN: \"{goal}\"\n\n"
36
+ "Now generate the plan. STRICTLY FOLLOW THE TIME LIMIT."
37
  )
38
  }
39
  ]
 
42
  response = client.chat.completions.create(
43
  model="Qwen/Qwen2.5-Coder-7B-Instruct",
44
  messages=messages,
45
+ max_tokens=2048,
46
+ temperature=0.3,
47
  top_p=0.95,
48
  stream=False
49
  )