Spaces:
Sleeping
Sleeping
File size: 233 Bytes
64fd9b7 |
1 2 3 4 5 6 7 8 9 10 |
# app/utils.py
import uuid
from fastapi import HTTPException
def ensure_session(session_id: str | None) -> str:
return session_id or str(uuid.uuid4())
def http400(msg: str):
raise HTTPException(status_code=400, detail=msg)
|