Website: Fix lint errors in script (#23049)

Changes:
- Fixed the lint errors in the `test-llm-generated-sql` script
This commit is contained in:
Eric
2024-10-21 10:26:41 -05:00
committed by GitHub
parent 06bb4f708d
commit fb0f69c010
+8 -8
View File
@@ -13,7 +13,7 @@ module.exports = {
fn: async function ({naturalLanguageQuestion}) {
let assert = require('assert');
// let assert = require('assert');
let completeTables = await sails.helpers.getExtendedOsquerySchema();
let prunedTables = completeTables.map((table)=>{
@@ -33,13 +33,13 @@ module.exports = {
Provided context:
\`\`\`
${JSON.stringify(prunedTables.map((table)=>{
let lighterTable = _.pick(table, ['name','description','platforms']);
lighterTable.columns = table.columns.map((column)=>{
let lighterColumn = _.pick(column, ['name', 'description', 'platforms']);
return lighterColumn;
});
return lighterTable;
}))}
let lighterTable = _.pick(table, ['name','description','platforms']);
lighterTable.columns = table.columns.map((column)=>{
let lighterColumn = _.pick(column, ['name', 'description', 'platforms']);
return lighterColumn;
});
return lighterTable;
}))}
\`\`\`
Please respond in JSON, with the same data shape as the provided context, but with the array filtered to include only relevant tables.`;