Spaces:
Sleeping
Sleeping
Update index.js
Browse files
index.js
CHANGED
|
@@ -20,9 +20,9 @@ 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;
|
| 24 |
const userInput = reqData.userInput;
|
| 25 |
-
|
| 26 |
const model = new LlamaModel({
|
| 27 |
modelPath: path.join(
|
| 28 |
process.cwd(),
|
|
|
|
| 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({
|
| 27 |
modelPath: path.join(
|
| 28 |
process.cwd(),
|