Skip to content

Commit aaf614f

Browse files
author
Sean Trott
committed
Verifying that UI Agent doesn't do any JSON conversion
1 parent 0abeed9 commit aaf614f

2 files changed

Lines changed: 18 additions & 4 deletions

File tree

setup.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
#!/bin/bash
2-
# A user should set PYTHONPATH in their .bash_profile
3-
#export PYTHONPATH=/Users/seantrott/icsi/nlu-core/src/main
2+
# USERS should set PYTHONPATH in their .bash_profile
3+
#export PYTHONPATH={PATH_TO_ECG_FRAMEWORK_CODE}/src/main
4+
#export PYTHONPATH=$PYTHONPATH:$(pwd)/src/main
5+
6+
7+
# Sets ECG_FED variable to FED1 by default. This is used for the address for an agent, e.g. FED1_AgentUI
48
export ECG_FED=FED1
9+
# Initializes core solver, runs as a background process.
510
python3 src/main/nluas/app/core_solver.py ProblemSolver &
11+
# Initializes core UI-Agent, also runs as a background process.
612
python3 src/main/nluas/language/user_agent.py AgentUI &
7-
#sh ui_setup.sh
13+
# Initializes Text-Agent as a normal process, which prompts user for input.
814
python3 src/main/nluas/language/text_agent.py TextAgent
915

src/main/nluas/language/user_agent.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def text_callback(self, ntuple):
161161

162162

163163
def callback(self, ntuple):
164-
ntuple = self.decoder.convert_JSON_to_ntuple(ntuple)
164+
#ntuple = self.decoder.convert_JSON_to_ntuple(ntuple)
165165
call_type = ntuple['type']
166166
if call_type == "id_failure":
167167
self.output_stream(ntuple['tag'], ntuple['message'])
@@ -205,6 +205,14 @@ def clarify_ntuple(self, ntuple, descriptor):
205205
new[key] = value
206206
return new
207207

208+
"""
209+
def prompt(self):
210+
while True:
211+
s = input("> ")
212+
if s == "q":
213+
self.transport.quit_federation()
214+
quit()
215+
"""
208216

209217
def check_spelling(self, msg):
210218
table = self.spell_checker.spell_check(msg)

0 commit comments

Comments
 (0)