Spaces:
Running
Running
Download src/agents/base/func.py from ABAO77/Run_code_api: direct link, hf CLI and curl.
- Browser
- Download file 409 Bytes
-
https://huggingface.co/spaces/ABAO77/Run_code_api/resolve/0f1954e15d0673e56acffcf4e457b13f35cfca7f/src/agents/base/func.py
- Command line
-
hf download hf://spaces/ABAO77/Run_code_api@0f1954e15d0673e56acffcf4e457b13f35cfca7f/src/agents/base/func.py
-
curl -L -o func.py https://huggingface.co/spaces/ABAO77/Run_code_api/resolve/0f1954e15d0673e56acffcf4e457b13f35cfca7f/src/agents/base/func.py
409 Bytes
| from typing import TypedDict | |
| from langgraph.prebuilt import create_react_agent | |
| from typing import ( | |
| Annotated, | |
| Sequence, | |
| TypedDict, | |
| ) | |
| from langchain_core.messages import AnyMessage | |
| from langgraph.graph.message import add_messages | |
| import json | |
| from src.config.llm import model | |
| class State(TypedDict): | |
| """The state of the agent.""" | |
| messages: Annotated[Sequence[AnyMessage], add_messages] | |