Spaces:
Sleeping
Sleeping
helloguddn (PC helloguddn)
feat: 의존성, chat 엔드포인트, gemini function calling, 이미지 추출, Maps 연동, 노동법 RAG(google.text-embedding-004)
f4bf832 Download services/storage_service.py from helloguddn/Suwon_multiculturalism: direct link, hf CLI and curl.
- Browser
- Download file 405 Bytes
-
https://huggingface.co/spaces/helloguddn/Suwon_multiculturalism/resolve/main/services/storage_service.py
- Command line
-
hf download hf://spaces/helloguddn/Suwon_multiculturalism/services/storage_service.py
-
curl -L -o storage_service.py https://huggingface.co/spaces/helloguddn/Suwon_multiculturalism/resolve/main/services/storage_service.py
405 Bytes
| """Session storage for agent conversation history (in-memory for MVP).""" | |
| from __future__ import annotations | |
| _store: dict[str, list] = {} | |
| def get_history(session_id: str) -> list: | |
| return list(_store.get(session_id, [])) | |
| def save_history(session_id: str, history: list) -> None: | |
| _store[session_id] = list(history) | |
| def clear_session(session_id: str) -> None: | |
| _store.pop(session_id, None) | |