From 32468ac629397e20146bcd8487f57b6bae53fe3f Mon Sep 17 00:00:00 2001 From: Siddharth VP Date: Mon, 2 Sep 2024 01:00:57 +0530 Subject: [PATCH] autosql: fix logging bug --- db-tabulator/autosql/web-endpoint.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db-tabulator/autosql/web-endpoint.ts b/db-tabulator/autosql/web-endpoint.ts index d0f67d2..12c7c70 100644 --- a/db-tabulator/autosql/web-endpoint.ts +++ b/db-tabulator/autosql/web-endpoint.ts @@ -30,7 +30,7 @@ router.post('/generate', async function (req, res, next) { }) const sql = response.choices[0].message.content const logEntry = { - prompt: req.query.prompt, + prompt: req.body.prompt, response: sql.replace(/\s+/g, ' ') } log(`[S] AutoSQL result ${JSON.stringify(logEntry, null, 2)}`);