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 `__