Chysev commited on
Commit
55e0ff7
·
verified ·
1 Parent(s): 15b9e3b

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +1 -1
index.js CHANGED
@@ -20,7 +20,7 @@ app.get('/api/test', async (req, res) => {
20
 
21
  // Test Express API POST method with variables
22
  app.post('/api/chat', async (req, res) => {
23
- const reqData = req.body; // assuming reqData is sent in the request body
24
  const userInput = reqData.userInput;
25
 
26
  const model = new LlamaModel({
 
20
 
21
  // Test Express API POST method with variables
22
  app.post('/api/chat', async (req, res) => {
23
+ const reqData = req.json();
24
  const userInput = reqData.userInput;
25
 
26
  const model = new LlamaModel({