1
1
mirror of https://github.com/leon-ai/leon.git synced 2024-11-23 20:12:08 +03:00

feat(skill/mbti): main NLU structure [skip ci]

This commit is contained in:
louistiti 2022-06-30 00:30:47 +08:00
parent aebe513599
commit 86d5040a7d
No known key found for this signature in database
GPG Key ID: 7ECA3DD523793FE6
9 changed files with 105 additions and 0 deletions

View File

@ -174,6 +174,16 @@
],
"entitiesType": "trim"
},
{
"method": "GET",
"route": "/api/action/social_communication/mbti/setup",
"params": []
},
{
"method": "GET",
"route": "/api/action/social_communication/mbti/quiz",
"params": []
},
{
"method": "GET",
"route": "/api/action/utilities/have_i_been_pwned/run",

View File

@ -0,0 +1,63 @@
{
"actions": {
"setup": {
"type": "dialog",
"utterance_samples": [
"I want to know my MBTI personality type"
],
"answers": [
"Alright, let's go!"
],
"next_action": "quiz"
},
"quiz": {
"type": "logic",
"loop": {
"expected_item": {
"type": "resolver",
"name": "mbti_quiz"
}
}
}
},
"resolvers": {
"mbti_quiz": {
"intents": {
"resolver.1_a": {
"utterance_samples": [
"Interact with many",
"Including strangers",
"[Like|Love] to [interact|communicate|talk]"
],
"value": "1_a"
},
"resolver.1_b": {
"utterance_samples": [
"Interact with a few",
"Know to [me|you]"
],
"value": "1_b"
},
"resolver.2_a": {
"utterance_samples": [
"Realistic than speculative",
"I'm not a dreamer",
"I believe in science"
],
"value": "2_a"
},
"resolver.2_b": {
"utterance_samples": [
"Speculative than realistic",
"Speculative",
"I [like|love] to dream",
"I am a dreamer"
],
"value": "2_b"
}
}
}
},
"answers": {
}
}

View File

@ -0,0 +1,11 @@
{
"name": "MBTI (MyersBriggs Type Indicator)",
"bridge": "python",
"version": "1.0.0",
"description": "Questionnaire to define your MBTI personality type.",
"author": {
"name": "Louis Grenard",
"email": "louis.grenard@gmail.com",
"url": "https://github.com/louistiti"
}
}

View File

@ -0,0 +1,15 @@
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import utils
def quiz(params):
"""TODO"""
resolvers = params['resolvers']
for resolver in resolvers:
if resolver['name'] == 'mbti_quiz':
answer = resolver['value']
print('answer', answer)

View File

@ -0,0 +1,6 @@
{
"configurations": {
"options": {},
"credentials": {}
}
}