Skip to content

Commit

Permalink
Merge pull request #14 from ahmadfaizalbh/development
Browse files Browse the repository at this point in the history
Update README
  • Loading branch information
ahmadfaizalbh authored Dec 22, 2019
2 parents 6a0f0d5 + 7bd949e commit 0a8ae60
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"):
Expand All @@ -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)
Expand Down
10 changes: 5 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://github.com/ahmadfaizalbh/Meetup-Resources/blob/master/Facebook%20Integration.ipynb>`__
Expand Down

0 comments on commit 0a8ae60

Please sign in to comment.