mirror of
https://github.com/leon-ai/leon.git
synced 2024-12-24 17:23:23 +03:00
refactor(skill/random_number): from module to skill
This commit is contained in:
parent
dc4b6ff296
commit
41c4436924
@ -25,6 +25,11 @@
|
||||
"route": "/api/action/leon/partner_assistant/run",
|
||||
"params": []
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"route": "/api/action/leon/random_number/run",
|
||||
"params": []
|
||||
},
|
||||
{
|
||||
"method": "POST",
|
||||
"route": "/api/action/productivity/todo_list/create_list",
|
||||
|
0
skills/leon/random_number/README.md
Normal file
0
skills/leon/random_number/README.md
Normal file
0
skills/leon/random_number/memory/.gitkeep
Normal file
0
skills/leon/random_number/memory/.gitkeep
Normal file
14
skills/leon/random_number/nlu/en.json
Normal file
14
skills/leon/random_number/nlu/en.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"actions": {
|
||||
"run": {
|
||||
"utterance_samples": [
|
||||
"Give me a random number",
|
||||
"Give me a number",
|
||||
"Tell me a random number",
|
||||
"Choose a number",
|
||||
"Pick a number"
|
||||
]
|
||||
}
|
||||
},
|
||||
"answers": { }
|
||||
}
|
14
skills/leon/random_number/nlu/fr.json
Normal file
14
skills/leon/random_number/nlu/fr.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"actions": {
|
||||
"run": {
|
||||
"utterance_samples": [
|
||||
"Donne-moi un nombre aléatoire",
|
||||
"Donne-moi un nombre",
|
||||
"Dis-moi un nombre aléatoire",
|
||||
"Choisis un nombre",
|
||||
"Pioche un nombre"
|
||||
]
|
||||
}
|
||||
},
|
||||
"answers": { }
|
||||
}
|
11
skills/leon/random_number/skill.json
Normal file
11
skills/leon/random_number/skill.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "Random Number",
|
||||
"bridge": "python",
|
||||
"version": "1.0.0",
|
||||
"description": "Leon gives a random number.",
|
||||
"author": {
|
||||
"name": "Louis Grenard",
|
||||
"email": "louis.grenard@gmail.com",
|
||||
"url": "https://github.com/louistiti"
|
||||
}
|
||||
}
|
10
skills/leon/random_number/src/actions/run.py
Normal file
10
skills/leon/random_number/src/actions/run.py
Normal file
@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding:utf-8 -*-
|
||||
|
||||
import utils
|
||||
from random import randint
|
||||
|
||||
def run(string, entities):
|
||||
"""Leon gives a random number"""
|
||||
|
||||
return utils.output('end', 'success', randint(0, 100))
|
6
skills/leon/random_number/src/config.sample.json
Normal file
6
skills/leon/random_number/src/config.sample.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"configurations": {
|
||||
"options": {},
|
||||
"credentials": {}
|
||||
}
|
||||
}
|
0
skills/leon/random_number/src/lib/.gitkeep
Normal file
0
skills/leon/random_number/src/lib/.gitkeep
Normal file
0
skills/leon/random_number/test/.gitkeep
Normal file
0
skills/leon/random_number/test/.gitkeep
Normal file
Loading…
Reference in New Issue
Block a user