From 8c6ad6d5a37fa5673bd8ecb324622112261e4653 Mon Sep 17 00:00:00 2001 From: array-in-a-matrix Date: Tue, 16 Aug 2022 03:45:11 -0400 Subject: [PATCH] specify text generation in py process --- index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 8473adb..0c9c6f4 100644 --- a/index.js +++ b/index.js @@ -21,21 +21,21 @@ client.on("room.message", (roomId, event) => { }); if (lineCount(config.file) < config.size) return; // ? don't start generating messages until a big enough dataset is present - - // TODO: train AI every Nth message? // ? send message every N messages using the training data if (!(messageCounter % config.frequency)) { console.log("Generating message..."); - const python = spawn('python', ["textgen.py"]); + const python = spawn('python', ["textgen.py", "generate"]); python.stdout.on('data', function (message) { message = message.toString(); - console.log("bot:\t" + message); client.sendText(roomId, message); }); python.on('close'); // ? close python process when finished }; + + // TODO: train AI every Nth message? + }); function lineCount(text) {