File size: 569 Bytes
32a7233
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from agent.agent_graph.StateTasks import *

def is_question_clear(state:ProblemState): # not check type , only check to do list
  is_clear = True # as used with and later

  is_clear = is_clear and ("question" in state.keys())

  is_clear = is_clear and ("question_type" in state.keys()) and (state.get("question_type") in task_steps.keys())

  if "question_type" in state.keys():
      for step in task_steps[state.get("question_type")]:

          is_clear = is_clear and (step in state.keys())

  is_clear = is_clear and (state["all_ok"]==True)

  return is_clear