Download source/src/api.ts from CladeTeam/ouroboros: direct link, hf CLI and curl.
- Browser
- Download file 459 Bytes
-
https://huggingface.co/spaces/CladeTeam/ouroboros/resolve/main/source/src/api.ts
- Command line
-
hf download hf://spaces/CladeTeam/ouroboros/source/src/api.ts
-
curl -L -o api.ts https://huggingface.co/spaces/CladeTeam/ouroboros/resolve/main/source/src/api.ts
459 Bytes
| /** Static hosting can point API requests at the existing inference service. */ | |
| export function apiUrl(path: string): string { | |
| if (!path.startsWith('/api/')) return path; | |
| const base = document.querySelector<HTMLMetaElement>('meta[name="ouroboros-api-base"]')?.content || ''; | |
| return base.replace(/\/+$/, '') + path; | |
| } | |
| export function atlasPath(): string { | |
| return document.querySelector('meta[name="ouroboros-api-base"]') ? '/atlas.html' : '/atlas'; | |
| } | |