Spaces:
Runtime error
Runtime error
Download app/tools/context_agent_tools.py from Vinit006/EmailAgentwithMemory: direct link, hf CLI and curl.
- Browser
- Download file 559 Bytes
-
https://huggingface.co/spaces/Vinit006/EmailAgentwithMemory/resolve/f4e5ae0c5c18fa1379edfe78efc8c05d0791c899/app/tools/context_agent_tools.py
- Command line
-
hf download hf://spaces/Vinit006/EmailAgentwithMemory@f4e5ae0c5c18fa1379edfe78efc8c05d0791c899/app/tools/context_agent_tools.py
-
curl -L -o context_agent_tools.py https://huggingface.co/spaces/Vinit006/EmailAgentwithMemory/resolve/f4e5ae0c5c18fa1379edfe78efc8c05d0791c899/app/tools/context_agent_tools.py
559 Bytes
| from langmem import create_search_memory_tool | |
| from langchain.tools import tool | |
| search_memory_tool = create_search_memory_tool( | |
| namespace=( | |
| "email", | |
| "{user_id}", | |
| "collection" | |
| ) | |
| ) | |
| def give_previous_context(memory_summary: str) -> str: | |
| """ | |
| Args: | |
| memory_summary: Structured summary containing sender identity, | |
| past context, new facts stored, and suggested tone. | |
| """ | |
| return memory_summary | |
| context_agent_tools=[search_memory_tool,give_previous_context] |