Download src/utils/state.py from Cripple-Lee/Personal-Assistant-Server: direct link, hf CLI and curl.
- Browser
- Download file 513 Bytes
-
https://huggingface.co/spaces/Cripple-Lee/Personal-Assistant-Server/resolve/main/src/utils/state.py
- Command line
-
hf download hf://spaces/Cripple-Lee/Personal-Assistant-Server/src/utils/state.py
-
curl -L -o state.py https://huggingface.co/spaces/Cripple-Lee/Personal-Assistant-Server/resolve/main/src/utils/state.py
513 Bytes
| from typing import Annotated | |
| from typing_extensions import TypedDict | |
| from langgraph.graph.message import add_messages | |
| class State(TypedDict): | |
| """Input state for the agent. | |
| Defines the initial structure of incoming data. | |
| See: https://langchain-ai.github.io/langgraph/concepts/low_level/#state | |
| """ | |
| # add_messages appends new messages to the checkpointed history instead of | |
| # overwriting it, so each run only needs to send the new human message. | |
| messages: Annotated[list, add_messages] |