cjber commited on
Commit
299e613
·
1 Parent(s): 51819ac

fix: stricter filtering of themes

Browse files
Files changed (1) hide show
  1. planning_ai/nodes/map_node.py +1 -5
planning_ai/nodes/map_node.py CHANGED
@@ -36,11 +36,7 @@ def retrieve_themes(state: DocumentState) -> DocumentState:
36
  except Exception as e:
37
  logger.error(f"Theme selection error: {e}")
38
  themes = []
39
- state["themes"] = [d for d in themes if d["score"] > 2]
40
- score = np.mean([theme["score"] for theme in state["themes"]])
41
- if score < 3:
42
- state["processed"] = True
43
- state["failed"] = True
44
  return state
45
 
46
 
 
36
  except Exception as e:
37
  logger.error(f"Theme selection error: {e}")
38
  themes = []
39
+ state["themes"] = [d for d in themes if d["score"] >= 4]
 
 
 
 
40
  return state
41
 
42