This repository has been archived on 2023-06-09. You can view files and clone it, but cannot push or open issues or pull requests.
jarvis-server/jarvis/skills/decorators.py

27 lines
489 B
Python
Raw Permalink Normal View History

def intent_handler(*args):
"""
Creates an attribute on the method, so it can
be discovered by the metaclass
"""
def decorator(f):
f._type = "adapt"
f._data = args
return f
return decorator
def intent_file_handler(*args):
"""
Creates an attribute on the method, so it can
be discovered by the metaclass
"""
def decorator(f):
f._type = "padatious"
f._data = args
return f
return decorator