Skip to content

Commit

Permalink
autosql: log prompts and results
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharthvp committed Sep 1, 2024
1 parent 529c4f8 commit c35a5bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions db-tabulator/autosql/web-endpoint.ts
Original file line number Diff line number Diff line change
@@ -31,9 +31,9 @@ router.post('/generate', async function (req, res, next) {
const sql = response.choices[0].message.content
const logEntry = {
prompt: req.query.prompt,
response: sql

response: sql.replace(/\s+/g, ' ')
}
log(`[S] AutoSQL result ${JSON.stringify(logEntry, null, 2)}`);
return res.render('db-tabulator/autosql/result', {
sql: sql,
warnOnField:

0 comments on commit c35a5bb

Please sign in to comment.