From b6aca6423f821d04a76962b134c33396d13c9194 Mon Sep 17 00:00:00 2001 From: Ariya Hidayat Date: Fri, 21 Jun 2024 10:02:46 -0700 Subject: [PATCH] Avoid `interface` since technically it is a keyword --- ask-llm.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ask-llm.js b/ask-llm.js index 79e5d6b..dbb0897 100755 --- a/ask-llm.js +++ b/ask-llm.js @@ -131,11 +131,11 @@ const SYSTEM_PROMPT = 'Answer the question politely and concisely.'; messages.push({ role: 'system', content: SYSTEM_PROMPT }); let loop = true; - const interface = readline.createInterface({ input: process.stdin, output: process.stdout }); - interface.on('close', () => { loop = false; }); + const io = readline.createInterface({ input: process.stdin, output: process.stdout }); + io.on('close', () => { loop = false; }); const qa = () => { - interface.question('>> ', async (question) => { + io.question('>> ', async (question) => { messages.push({ role: 'user', content: question }); const start = Date.now(); const answer = await chat(messages, (str) => process.stdout.write(str));