Skip to content

Commit

Permalink
Avoid interface since technically it is a keyword
Browse files Browse the repository at this point in the history
  • Loading branch information
ariya committed Jun 21, 2024
1 parent f341bd6 commit b6aca64
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ask-llm.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit b6aca64

Please sign in to comment.