Skip to content

Commit cdc90ed

Browse files
committed
Clean up text agent and fix bug keep_alive call
1 parent 7923fee commit cdc90ed

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

src/main/nluas/language/text_agent.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
from nluas.core_agent import *
1818
import json
19-
#from nluas.language.spell_checker import *
2019

2120
# Makes this work with both py2 and py3
2221
from six.moves import input
@@ -34,9 +33,6 @@ def __init__(self, args):
3433
self.original = None
3534

3635
def prompt(self):
37-
#if not self.clarification:
38-
#print("Calling prompt....")
39-
#print("Clarification is: {}".format(self.clarification))
4036
msg = input("> ")
4137
if msg == "q":
4238
self.close(True)
@@ -52,7 +48,6 @@ def prompt(self):
5248

5349
def callback(self, ntuple):
5450
""" Callback for receiving information from UI-Agent. """
55-
#ntuple = json.loads(ntuple)
5651
if "type" in ntuple and ntuple['type'] == "clarification":
5752
self.clarification = True
5853
self.original = ntuple['original']
@@ -66,4 +61,4 @@ def output_stream(self, tag, message):
6661

6762
if __name__ == "__main__":
6863
text = TextAgent(sys.argv[1:])
69-
text.keep_alive(text.prompt())
64+
text.keep_alive(text.prompt)

0 commit comments

Comments
 (0)