mirror of
https://github.com/cloudflare/cloudflare-docs.git
synced 2026-01-16 23:11:06 +00:00
14 lines
345 B
JavaScript
14 lines
345 B
JavaScript
import fs from "fs";
|
|
|
|
fetch("https://ai-cloudflare-com.pages.dev/api/models")
|
|
.then((res) => res.json())
|
|
.then((data) => {
|
|
data.models.map((model) => {
|
|
const fileName = model.name.split("/")[2];
|
|
fs.writeFileSync(
|
|
`./src/content/workers-ai-models/${fileName}.json`,
|
|
JSON.stringify(model, null, 4),
|
|
"utf-8",
|
|
);
|
|
});
|
|
});
|