coyotte508's picture
coyotte508 HF staff
🔧 Standardize environment config (#13)
3ebd805 unverified
raw
history blame
368 Bytes
import { HF_TOKEN } from '$env/static/private';
import { PUBLIC_MODEL_ENDPOINT } from '$env/static/public';
export async function POST({ request }) {
return await fetch(PUBLIC_MODEL_ENDPOINT, {
headers: {
...request.headers,
'Content-Type': 'application/json',
Authorization: `Basic ${HF_TOKEN}`
},
method: 'POST',
body: await request.text()
});
}