from langgraph.graph import StateGraph, MessagesState from typing import List, Annotated import operator class CustomState(MessagesState): todo: Annotated[list, operator.add] # Les tâches en cours, au format JSON lastSummarizedMessage: int # Index du message où l'on s'était arrêté de résumer stop: bool # Permet d'indiquer la fin de l'exécution de l'agent # TODO: Ajouter la source des documents sélectionnés pour la fin du rapport ? def getState()->StateGraph: """ Retourne un StateGraph prêt à utiliser pour préparer un workflow Returns: StateGraph: prêt à utiliser """ return StateGraph(CustomState)