Spaces:
Sleeping
Sleeping
Download src/routes/api/generate/utils.ts from shootstuff/inference-playground: direct link, hf CLI and curl.
- Browser
- Download file 392 Bytes
-
https://huggingface.co/spaces/shootstuff/inference-playground/resolve/main/src/routes/api/generate/utils.ts
- Command line
-
hf download hf://spaces/shootstuff/inference-playground/src/routes/api/generate/utils.ts
-
curl -L -o utils.ts https://huggingface.co/spaces/shootstuff/inference-playground/resolve/main/src/routes/api/generate/utils.ts
392 Bytes
| const DEBUG_LOG = true; | |
| export const debugLog = (...args: unknown[]) => { | |
| if (!DEBUG_LOG) return; | |
| const now = new Date(); | |
| console.log(`[Time: ${now.toLocaleTimeString()}] [LOG] ${args.join(" ")}`); | |
| }; | |
| export const debugError = (...args: unknown[]) => { | |
| if (!DEBUG_LOG) return; | |
| const now = new Date(); | |
| console.error(`[Time: ${now.toLocaleTimeString()}] [ERROR] ${args.join(" ")}`); | |
| }; | |