Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up converse() code #159

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions docs/skill-development/introduction/lifecycle-methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,11 @@ If the utterance is handled by the converse method, we return `True` to indicate
In the following example, we check that utterances is not empty, and if the utterance matches vocabulary from `understood.voc`. If the user has understood we speak a line from `great.dialog` and return `True` to indicate the utterance has been handled. If the vocabulary does not match then we return `False` as the utterance should be passed to the normal intent matching service.

```text
def converse(self, utterances, lang):
def converse(self, utterances, lang=None):
if utterances and self.voc_match(utterances[0], 'understood'):
self.speak_dialog('great')
return True
else:
return False
return False
```

## Stop
Expand Down