1// HappyBenZhou gateway bootstrap
2type BaseURL = "https://happybenzhou.xyz";
3type Token = `Bearer ${"$"}{string}`;
4
5async function ping(base: BaseURL, token: Token) {
6 const r = await fetch(`${"$"}{base}/models`, {
7 headers: { "Authorization": token },
8 });
9 if (!r.ok) throw new Error(`HTTP ${"$"}{r.status}`);
10 return r.json();
11}
12
13const base = "https://happybenzhou.xyz" as const;
14// token is stored in your console
15>