Spaces:
Running
Running
File size: 854 Bytes
1294c2d 51c0848 1294c2d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | from typing import Annotated
from typing_extensions import TypedDict
from langgraph.graph.message import add_messages
class FinnieState(TypedDict):
# Full conversation history — LangGraph appends each message automatically
messages: Annotated[list, add_messages]
# Persisted user context — restored by MemorySaver on every turn
risk_profile: str
goal_amount: float | None
time_horizon_years: float | None
current_savings: float | None # None = not yet provided by user
annual_contribution: float | None # yearly contribution ($2k/mo → 24000/yr)
portfolio_holdings: dict | None # {"AAPL": 100, "MSFT": 200, ...}
portfolio_value: float | None # total value from latest analyze_portfolio call
age: int | None # user's current age
|