Added docstring for update_context

Including note about not working on one_of keywords.
pull/1026/head
Åke Forslund 2017-08-31 21:34:30 +02:00
parent 7022239456
commit d746a87e34
1 changed files with 10 additions and 0 deletions

View File

@ -180,6 +180,16 @@ class IntentService(object):
self.active_skills.insert(0, [skill_id, time.time()])
def update_context(self, intent):
"""
updates context with keyword from the intent.
NOTE: This method currently won't handle one_of intent keywords
since it's not using quite the same format as other intent
keywords. This is under investigation in adapt, PR pending.
Args:
intent: Intent to scan for keywords
"""
for tag in intent['__tags__']:
if 'entities' not in tag:
continue