Spaces:
Build error
Build error
porla
Refactor agent logic and enhance data handling; add tools for file processing and update system prompt format
f7a42c7 Download src/state.py from pietroorlandi/Final_Assignment_Template: direct link, hf CLI and curl.
- Browser
- Download file 473 Bytes
-
https://huggingface.co/spaces/pietroorlandi/Final_Assignment_Template/resolve/main/src/state.py
- Command line
-
hf download hf://spaces/pietroorlandi/Final_Assignment_Template/src/state.py
-
curl -L -o state.py https://huggingface.co/spaces/pietroorlandi/Final_Assignment_Template/resolve/main/src/state.py
473 Bytes
| from langgraph.graph.message import add_messages | |
| from typing import Annotated | |
| from typing_extensions import TypedDict | |
| class State(TypedDict): | |
| # Messages have the type "list". The `add_messages` function | |
| # in the annotation defines how this state key should be updated | |
| # (in this case, it appends messages to the list, rather than overwriting them) | |
| is_question_reversed: bool | |
| question: str | |
| messages: Annotated[list, add_messages] | |
| task_id: str | |