From ae0b469d25e3b9136a243876004b34ebc546c642 Mon Sep 17 00:00:00 2001 From: schneefux Date: Thu, 12 Jun 2014 21:36:51 +0200 Subject: Make Jasper mention the user's name when asking "How can I be of service?" --- client/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'client/main.py') diff --git a/client/main.py b/client/main.py index c5805c4..75ee9f6 100644 --- a/client/main.py +++ b/client/main.py @@ -23,7 +23,7 @@ if __name__ == "__main__": mic = Mic("languagemodel.lm", "dictionary.dic", "languagemodel_persona.lm", "dictionary_persona.dic") - mic.say("How can I be of service?") + mic.say("How can I be of service, %s?" % (profile["first_name"])) conversation = Conversation("JASPER", mic, profile) -- cgit v1.3.1 From 9a4ae0f32f1aa422264eab55c88304b04aae50d5 Mon Sep 17 00:00:00 2001 From: schneefux Date: Thu, 12 Jun 2014 22:36:33 +0200 Subject: Check if first_name is set for profile beforehand --- client/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'client/main.py') diff --git a/client/main.py b/client/main.py index 75ee9f6..0b29c75 100644 --- a/client/main.py +++ b/client/main.py @@ -23,7 +23,10 @@ if __name__ == "__main__": mic = Mic("languagemodel.lm", "dictionary.dic", "languagemodel_persona.lm", "dictionary_persona.dic") - mic.say("How can I be of service, %s?" % (profile["first_name"])) + addendum = "" + if 'first_name' in profile: + addendum = ", %s" % profile["first_name"] + mic.say("How can I be of service%s?" % addendum) conversation = Conversation("JASPER", mic, profile) -- cgit v1.3.1