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 acf228b commit 4c9041e
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
Expand Up @@ -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:
Expand Down

0 comments on commit 4c9041e

Please sign in to comment.