carolinacon commited on
Commit
72733f0
·
1 Parent(s): 5813885

Added edges.py

Browse files
Files changed (1) hide show
  1. core/edges.py +10 -0
core/edges.py CHANGED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ from core.state import State
2
+ from typing import Literal
3
+ from langgraph.graph import END
4
+
5
+
6
+ def file_condition(state: State) -> Literal["assistant", END]:
7
+ has_attachment = state.get("attachment", "")
8
+ if has_attachment == "true":
9
+ return END
10
+ return "assistant"