Spaces:
Sleeping
Sleeping
Better logs
Browse files5 unmodified lines678910114 unmodified lines1617181920215 unmodified lines"https://api-inference.huggingface.co/models/bigscience/bloom";const PROMPT = `Pretend that you are a bot that replies to discussions about machine learning, and reply to the following comment:\n`;const app = express();// parse HTTP request bodies as jsonapp.use(express.json());4 unmodified linesapp.post("/", async (req, res) => {if (req.header("X-Webhook-Secret") !== process.env.WEBHOOK_SECRET) {return res.status(400).json({ error: "incorrect secret" });}console.log(req.body);5 unmodified lines6789101112131415161718194 unmodified lines242526272829305 unmodified lines"https://api-inference.huggingface.co/models/bigscience/bloom";const PROMPT = `Pretend that you are a bot that replies to discussions about machine learning, and reply to the following comment:\n`;if (!process.env.WEBHOOK_SECRET || !process.env.HF_TOKEN) {console.error("This app needs those env variables to be defined","WEBHOOK_SECRET, HF_TOKEN");process.exit();}const app = express();// parse HTTP request bodies as jsonapp.use(express.json());4 unmodified linesapp.post("/", async (req, res) => {if (req.header("X-Webhook-Secret") !== process.env.WEBHOOK_SECRET) {console.error("incorrect secret");return res.status(400).json({ error: "incorrect secret" });}console.log(req.body);
server.ts+9