Spaces:
Sleeping
Sleeping
Download src/kb.js from AustinWealth/cc-space: direct link, hf CLI and curl.
- Browser
- Download file 327 Bytes
-
https://huggingface.co/spaces/AustinWealth/cc-space/resolve/main/src/kb.js
- Command line
-
hf download hf://spaces/AustinWealth/cc-space/src/kb.js
-
curl -L -o kb.js https://huggingface.co/spaces/AustinWealth/cc-space/resolve/main/src/kb.js
327 Bytes
| import { readFileSync } from "node:fs"; | |
| import { fileURLToPath } from "node:url"; | |
| import path from "node:path"; | |
| const here = path.dirname(fileURLToPath(import.meta.url)); | |
| export const KB_PATH = path.resolve(here, "../data/kb.json"); | |
| export function loadKb(file = KB_PATH) { | |
| return JSON.parse(readFileSync(file, "utf8")); | |
| } | |