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:
parent
aebe513599
commit
86d5040a7d
@ -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",
|
||||
|
0
skills/social_communication/mbti/README.md
Normal file
0
skills/social_communication/mbti/README.md
Normal file
0
skills/social_communication/mbti/memory/.gitkeep
Normal file
0
skills/social_communication/mbti/memory/.gitkeep
Normal file
63
skills/social_communication/mbti/nlu/en.json
Normal file
63
skills/social_communication/mbti/nlu/en.json
Normal 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": {
|
||||
}
|
||||
}
|
11
skills/social_communication/mbti/skill.json
Normal file
11
skills/social_communication/mbti/skill.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "MBTI (Myers–Briggs 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"
|
||||
}
|
||||
}
|
15
skills/social_communication/mbti/src/actions/quiz.py
Normal file
15
skills/social_communication/mbti/src/actions/quiz.py
Normal 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)
|
6
skills/social_communication/mbti/src/config.sample.json
Normal file
6
skills/social_communication/mbti/src/config.sample.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"configurations": {
|
||||
"options": {},
|
||||
"credentials": {}
|
||||
}
|
||||
}
|
0
skills/social_communication/mbti/src/lib/.gitkeep
Normal file
0
skills/social_communication/mbti/src/lib/.gitkeep
Normal file
0
skills/social_communication/mbti/test/.gitkeep
Normal file
0
skills/social_communication/mbti/test/.gitkeep
Normal file
Loading…
Reference in New Issue
Block a user