tanuki.py icon indicating copy to clipboard operation
tanuki.py copied to clipboard

Support for enums

Open MartBakler opened this issue 2 years ago • 0 comments

Currently validator.check_type does not support enum outputs types. If LLM outputs a valid integer, check_type outputs False where it should put True

class RequestIntent(Enum):
    REFUNDS = 1
    PRODUCT_QUESTIONS = 2
    ACCOUNT_OPENING = 3
    ORDER_STATUS = 4
    ORDER_MODIFICATIONS = 5


@Monkey.patch
def classify_request(input: str) -> RequestIntent: # Multiclass classification
    """
    Classify the incoming user request intent 
    """

MartBakler avatar Nov 03 '23 11:11 MartBakler