Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Download api/assistant_routers.py from fsanyoto/runloopable: direct link, hf CLI and curl.
- Browser
- Download file 816 Bytes
-
https://huggingface.co/spaces/fsanyoto/runloopable/resolve/main/api/assistant_routers.py
- Command line
-
hf download hf://spaces/fsanyoto/runloopable/api/assistant_routers.py
-
curl -L -o assistant_routers.py https://huggingface.co/spaces/fsanyoto/runloopable/resolve/main/api/assistant_routers.py
816 Bytes
| """Assistant extension routers mounted through routes_query.""" | |
| import assistant_feed # Registers the core notice sink for API producers. | |
| import assistant_open_items # Registers the caller-assigned work tool. | |
| from assistant_dock import router as dock_router | |
| from routes_assistant_memory import router as memory_router | |
| from assistant_stream import router as stream_router | |
| from fastapi import APIRouter, Depends | |
| from deps import Session, module_gate, require_session | |
| import turn_control | |
| control_router = APIRouter(prefix="/api/v1", dependencies=[Depends(module_gate("analyst"))]) | |
| def stop_turn(session: Session = Depends(require_session)): | |
| return turn_control.cancel(session.tenant, session.uname) | |
| ROUTERS = (dock_router, memory_router, control_router, stream_router) | |