Back to prompt library
LangGraph State Definition
Linked challenge: LangGraph Heatwave Risk Indexing for Urban Resilience
Prompt source
implementation8 lines3 sectionsNo variables0 checklist items
from typing import TypedDict, Annotated
from langgraph.graph import StateGraph, END
from langchain_anthropic import ChatAnthropic
class HeatState(TypedDict):
temp_c: float
humidity: float
risk_score: float
llm = ChatAnthropic(model='claude-4.1-opus')