Update brain.mjs
This commit is contained in:
parent
b56b145906
commit
aba73dee8b
1 changed files with 9 additions and 4 deletions
13
brain.mjs
13
brain.mjs
|
@ -39,12 +39,17 @@ class ConsciousnessApp {
|
|||
await this.simulator.simulateConsciousness();
|
||||
}
|
||||
}
|
||||
|
||||
asking = false
|
||||
async asker() {
|
||||
while (true) {
|
||||
await this.rl.question('<Query>: ', (query) => {
|
||||
userTalks(query)
|
||||
});
|
||||
if (asking == false) {
|
||||
asking = true
|
||||
await this.rl.question('<Query>: ', (query) => {
|
||||
userTalks(query)
|
||||
asking = false
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue