Spaces:
Runtime error
Runtime error
Download src/routes/apiRouter.js from devilent2/puteroapix: direct link, hf CLI and curl.
- Browser
- Download file 332 Bytes
-
https://huggingface.co/spaces/devilent2/puteroapix/resolve/main/src/routes/apiRouter.js
- Command line
-
hf download hf://spaces/devilent2/puteroapix/src/routes/apiRouter.js
-
curl -L -o apiRouter.js https://huggingface.co/spaces/devilent2/puteroapix/resolve/main/src/routes/apiRouter.js
332 Bytes
| import { Router } from "express"; | |
| export function createApiRouter({ chatController, mediaController }) { | |
| const router = Router(); | |
| router.get("/health", (_req, res) => { | |
| res.json({ ok: true }); | |
| }); | |
| router.post("/chat/completions", chatController); | |
| router.get("/media/:mediaId", mediaController); | |
| return router; | |
| } | |