heymenn commited on
Commit
34d4445
·
verified ·
1 Parent(s): 47555df

Update kig_core/planner.py

Browse files
Files changed (1) hide show
  1. kig_core/planner.py +3 -3
kig_core/planner.py CHANGED
@@ -133,16 +133,16 @@ def generate_structured_issues(state: PlannerState) -> Dict[str, Any]:
133
  output_parser = JsonOutputParser(pydantic_object=List[KeyIssue])
134
 
135
  prompt = KEY_ISSUE_STRUCTURING_PROMPT.partial(
136
- # schema=output_parser.get_format_instructions(), # Inject schema instructions if needed by prompt
137
  )
138
 
139
  chain = prompt | issue_llm | output_parser
140
 
141
  try:
142
- structured_issues = chain.invoke({{
143
  "user_query": user_query,
144
  "context": full_context
145
- }})
146
 
147
  # Ensure IDs are sequential if the LLM didn't assign them correctly
148
  for i, issue in enumerate(structured_issues):
 
133
  output_parser = JsonOutputParser(pydantic_object=List[KeyIssue])
134
 
135
  prompt = KEY_ISSUE_STRUCTURING_PROMPT.partial(
136
+ schema=output_parser.get_format_instructions(), # Inject schema instructions if needed by prompt
137
  )
138
 
139
  chain = prompt | issue_llm | output_parser
140
 
141
  try:
142
+ structured_issues = chain.invoke({
143
  "user_query": user_query,
144
  "context": full_context
145
+ })
146
 
147
  # Ensure IDs are sequential if the LLM didn't assign them correctly
148
  for i, issue in enumerate(structured_issues):