Public Member Functions | |
def | __init__ (self, timeout) |
def | clear_context (self) |
def | get_context (self, max_frames=None, missing_entities=None) |
def | inject_context (self, entity, metadata=None) |
def | remove_context (self, context_id) |
Public Attributes | |
frame_stack | |
timeout | |
ContextManager Use to track context throughout the course of a conversational session. How to manage a session's lifecycle is not captured here.
Definition at line 49 of file intent_service.py.
def mycroft.skills.intent_service.ContextManager.__init__ | ( | self, | |
timeout | |||
) |
Definition at line 56 of file intent_service.py.
def mycroft.skills.intent_service.ContextManager.clear_context | ( | self | ) |
Definition at line 60 of file intent_service.py.
def mycroft.skills.intent_service.ContextManager.get_context | ( | self, | |
max_frames = None , |
|||
missing_entities = None |
|||
) |
Constructs a list of entities from the context. Args: max_frames(int): maximum number of frames to look back missing_entities(list of str): a list or set of tag names, as strings Returns: list: a list of entities
Definition at line 92 of file intent_service.py.
def mycroft.skills.intent_service.ContextManager.inject_context | ( | self, | |
entity, | |||
metadata = None |
|||
) |
Args: entity(object): Format example... {'data': 'Entity tag as <str>', 'key': 'entity proper name as <str>', 'confidence': <float>' } metadata(object): dict, arbitrary metadata about entity injected
Definition at line 67 of file intent_service.py.
def mycroft.skills.intent_service.ContextManager.remove_context | ( | self, | |
context_id | |||
) |
Definition at line 63 of file intent_service.py.
mycroft.skills.intent_service.ContextManager.frame_stack |
Definition at line 57 of file intent_service.py.
mycroft.skills.intent_service.ContextManager.timeout |
Definition at line 58 of file intent_service.py.