Download tools/base_tools.py from VivekMannava/Final_Assignment_Template: direct link, hf CLI and curl.
- Browser
- Download file 465 Bytes
-
https://huggingface.co/spaces/VivekMannava/Final_Assignment_Template/resolve/main/tools/base_tools.py
- Command line
-
hf download hf://spaces/VivekMannava/Final_Assignment_Template/tools/base_tools.py
-
curl -L -o base_tools.py https://huggingface.co/spaces/VivekMannava/Final_Assignment_Template/resolve/main/tools/base_tools.py
465 Bytes
| from llama_index.core.tools import FunctionTool | |
| def get_thought(thought: str) -> str: | |
| """ | |
| Get the thought of the agent. | |
| """ | |
| return f"Thought: {thought}" | |
| def get_answer(answer: str) -> str: | |
| """ | |
| Get the answer of the agent. | |
| """ | |
| return f"Answer: {answer}" | |
| def get_base_tools(): | |
| """ | |
| Get the base tools. | |
| """ | |
| return [ | |
| FunctionTool.from_defaults(get_thought), | |
| FunctionTool.from_defaults(get_answer), | |
| ] |