mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-03-31 06:12:26 +00:00
Co-authored-by: opencode <opencode@sst.dev> Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
12 lines
288 B
TypeScript
12 lines
288 B
TypeScript
export async function data() {
|
|
const path = Bun.env.MODELS_DEV_API_JSON
|
|
if (path) {
|
|
const file = Bun.file(path)
|
|
if (await file.exists()) {
|
|
return await file.text()
|
|
}
|
|
}
|
|
const json = await fetch("https://models.dev/api.json").then((x) => x.text())
|
|
return json
|
|
}
|