Spaces:
Sleeping
Sleeping
Download memory.py from poushali22/shl-assignment: direct link, hf CLI and curl.
- Browser
- Download file 169 Bytes
-
https://huggingface.co/spaces/poushali22/shl-assignment/resolve/main/memory.py
- Command line
-
hf download hf://spaces/poushali22/shl-assignment/memory.py
-
curl -L -o memory.py https://huggingface.co/spaces/poushali22/shl-assignment/resolve/main/memory.py
169 Bytes
| def get_context(messages): | |
| history=[] | |
| for m in messages: | |
| history.append( | |
| f"{m.role}: {m.content}" | |
| ) | |
| return "\n".join(history) |