File size: 412 Bytes
be5f49d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# agent_plan_solve/graph/state.py

from typing import Annotated, TypedDict
import operator
from pydantic import BaseModel, Field

class Plan(BaseModel):
    """Plan to follow in future"""
    steps: list[str] = Field(..., description="Different steps to follow, in sorted order")

class PlanState(TypedDict):
    task: str
    plan: Plan
    past_steps: Annotated[list[str], operator.add]
    final_response: str