Download Visual-Agentic-Memory/vam/models.py from SitongGong/gst-code-collection: direct link, hf CLI and curl.
- Browser
- Download file 666 Bytes
-
https://huggingface.co/datasets/SitongGong/gst-code-collection/resolve/main/Visual-Agentic-Memory/vam/models.py
- Command line
-
hf download hf://datasets/SitongGong/gst-code-collection/Visual-Agentic-Memory/vam/models.py
-
curl -L -o models.py https://huggingface.co/datasets/SitongGong/gst-code-collection/resolve/main/Visual-Agentic-Memory/vam/models.py
666 Bytes
| from typing import Optional, List, Literal, Dict | |
| from datetime import datetime | |
| from pydantic import BaseModel | |
| class ChatMessage(BaseModel): | |
| role: Literal["user", "assistant", "system"] | |
| content: str | |
| timestamp: datetime | |
| metadata: Optional[Dict[str, str]] = None | |
| class HabitRecord(BaseModel): | |
| user_id: str | |
| text: str | |
| timestamp: datetime | |
| class MemoryItem(BaseModel): | |
| user_id: str | |
| key: str | |
| value: str | |
| created_at: datetime | |
| expires_at: Optional[datetime] = None | |
| class UserMetadata(BaseModel): | |
| user_id: str | |
| chat_history: List[ChatMessage] = [] | |
| habits: List[HabitRecord] = [] | |
| memories: List[MemoryItem] = [] | |