From 7bd949e66e95e305ba86571f2ca2a60bd474bdba Mon Sep 17 00:00:00 2001 From: Ahmad Faizal B H Date: Sun, 22 Dec 2019 07:07:51 +0530 Subject: [PATCH] Update README Signed-off-by: Ahmad Faizal B H --- README.md | 4 ++-- README.rst | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 3e8dcca5..26927bef 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ Thank you for talking with me. ## Sample Code (with wikipedia search API integration) ```python -from chatbot import Chat,reflections,MultiFunctionCall +from chatbot import Chat,MultiFunctionCall import wikipedia def who_is(query,session_id="general"): @@ -56,7 +56,7 @@ def who_is(query,session_id="general"): call = MultiFunctionCall({"whoIs":who_is}) first_question="Hi, how are you?" -Chat("examples/Example.template", reflections,call=call).converse(first_question) +Chat("examples/Example.template",call=call).converse(first_question) ``` For Detail on how to build Facebook messenger bot checkout [Facebook Integration.ipynb](https://github.com/ahmadfaizalbh/Meetup-Resources/blob/master/Facebook%20Integration.ipynb) diff --git a/README.rst b/README.rst index 97981d5c..e180780b 100644 --- a/README.rst +++ b/README.rst @@ -30,23 +30,23 @@ Sample Code (with wikipedia search API integration) .. code:: python - from chatbot import Chat,reflections,multiFunctionCall + from chatbot import Chat,MultiFunctionCall import wikipedia - def whoIs(query,session_id="general"): + def who_is(query,session_id="general"): try: return wikipedia.summary(query) except: - for newquery in wikipedia.search(query): + for new_query in wikipedia.search(query): try: return wikipedia.summary(newquery) except: pass return "I don't know about "+query - call = multiFunctionCall({"whoIs":whoIs}) + call = MultiFunctionCall({"whoIs":who_is}) first_question="Hi, how are you?" - Chat("examples/Example.template", reflections,call=call).converse(first_question) + Chat("examples/Example.template",call=call).converse(first_question) For Detail on how to build Facebook messenger bot checkout `Facebook Integration.ipynb `__