File size: 473 Bytes
f7a42c7
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from langgraph.graph.message import add_messages
from typing import Annotated
from typing_extensions import TypedDict



class State(TypedDict):
    # Messages have the type "list". The `add_messages` function
    # in the annotation defines how this state key should be updated
    # (in this case, it appends messages to the list, rather than overwriting them)
    is_question_reversed: bool
    question: str
    messages: Annotated[list, add_messages]
    task_id: str