repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
Mirrored from https://github.com/yingqi-z20/Agent-libOS
stars
latest
clone command
git clone gitlawb://did:key:z6MkqRzA...RfoM/yingqi-z20-Agen...git clone gitlawb://did:key:z6MkqRzA.../yingqi-z20-Agen...d98dd2c9IPC1d ago| #3 | from datetime import datetime, timezone |
| #4 | from uuid import uuid4 |
| #5 |
| #6 |
| #7 | def new_id(prefix: str) -> str: |
| #8 | return f"{prefix}_{uuid4().hex[:16]}" |
| #9 |
| #10 |
| #11 | def utc_now() -> str: |
| #12 | return datetime.now(timezone.utc).isoformat() |
| #13 |
| #14 |
| #15 | def estimate_tokens(value: object) -> int: |
| #16 | text = value if isinstance(value, str) else repr(value) |
| #17 | return max(1, len(text) // 4) |
| #18 |
| #19 |