Skip to content

Commit

Permalink
return response for chatConversation()
Browse files Browse the repository at this point in the history
  • Loading branch information
LangHuiHE committed Nov 13, 2021
1 parent 64a4887 commit 244b528
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Server/erikaTraining.sqlite3
erikaTraining.sqlite3

# OS generated files #
######################
Expand Down
6 changes: 1 addition & 5 deletions Server/login_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def getChatHistory(self, userID):

def storeChat(self, userID, input, response):
# robot = Robot()
# response = robot.chat(input)
# response = robot.chat(input)

data = [input, response, userID]

Expand All @@ -157,7 +157,3 @@ def storeChat(self, userID, input, response):
elif new_rowcount == old_rowcount:
print("No new chat history stored this time")
return None

return response


2 changes: 1 addition & 1 deletion Server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ def chatConversation(self):
print(response)

db = Database()
response = db.storeChat(userID, userInput, response)
db.storeChat(userID, userInput, response)

self.send_response(200)
self.send_header("Content-type", "application/json")
Expand Down
Binary file modified Server/top_secret.db
Binary file not shown.

0 comments on commit 244b528

Please sign in to comment.