mirror of
https://github.com/leon-ai/leon.git
synced 2024-11-27 08:06:03 +03:00
refactor(skill/joke): from module to skill
This commit is contained in:
parent
3403e8cc12
commit
195278f975
@ -10,6 +10,11 @@
|
||||
"route": "/api/action/leon/greeting/run",
|
||||
"params": []
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"route": "/api/action/leon/joke/run",
|
||||
"params": []
|
||||
},
|
||||
{
|
||||
"method": "POST",
|
||||
"route": "/api/action/productivity/todo_list/create_list",
|
||||
|
0
skills/leon/joke/README.md
Normal file
0
skills/leon/joke/README.md
Normal file
0
skills/leon/joke/memory/.gitkeep
Normal file
0
skills/leon/joke/memory/.gitkeep
Normal file
27
skills/leon/joke/nlu/en.json
Normal file
27
skills/leon/joke/nlu/en.json
Normal file
@ -0,0 +1,27 @@
|
||||
{
|
||||
"actions": {
|
||||
"run": {
|
||||
"utterance_samples": [
|
||||
"Tell me a joke",
|
||||
"Give me a joke",
|
||||
"Make me laugh",
|
||||
"Do you have jokes to tell me?",
|
||||
"I wanna laugh"
|
||||
]
|
||||
}
|
||||
},
|
||||
"answers": {
|
||||
"jokes": [
|
||||
"My email password has been hacked. That's the third time I've had to rename the cat.",
|
||||
"What does a baby computer call it's father? Data.",
|
||||
"My New Year's resolution is 4K.",
|
||||
"Any room is a panic room if you've lost your phone in it.",
|
||||
"Why was the JavaScript developer sad? Because he didn't Node how to Express himself.",
|
||||
"Why did the developer go broke? Because he used up all his cache.",
|
||||
"There are 10 types of people in the world: those who understand binary, and those who don't.",
|
||||
"Instagram is just Twitter for people who go outside.",
|
||||
"Human: What do we want?! Computer: Natural language processing! Human: When do we want it?! Computer: When do we want what?",
|
||||
"Is your name Wi-Fi? Because I'm feeling a connection."
|
||||
]
|
||||
}
|
||||
}
|
33
skills/leon/joke/nlu/fr.json
Normal file
33
skills/leon/joke/nlu/fr.json
Normal file
@ -0,0 +1,33 @@
|
||||
{
|
||||
"actions": {
|
||||
"run": {
|
||||
"utterance_samples": [
|
||||
"Raconte-moi une blague",
|
||||
"Dis-moi une blague",
|
||||
"Donne-moi une blague",
|
||||
"Je veux rire",
|
||||
"As-tu des blagues à raconter ?"
|
||||
]
|
||||
}
|
||||
},
|
||||
"answers": {
|
||||
"jokes": [
|
||||
"Le mot de passe de ma boîte de réception a été piraté. C'est la troisième fois que je dois renommer le chat.",
|
||||
"Combien de développeurs faut-t-il pour remplacer une ampoule grillée ? Aucun, c'est un problème hardware.",
|
||||
"T'as pris quoi comme résolution pour cette nouvelle année ? 4K.",
|
||||
"Toute pièce est une salle de panique si vous avez perdu votre téléphone à l'intérieur.",
|
||||
"C'est l'histoire d'un administrateur qui configure ses variables d'environnement, et là... PATH le chemin !",
|
||||
"Tu sais pourquoi l'iPhone 6 se plie ? Parce que l'Apple Store.",
|
||||
"Dans le monde, il y a 10 catégories de personnes : celles qui connaissent le binaire et celles qui ne le connaissent pas.",
|
||||
"Instagram c'est en fait Twitter pour les gens qui sortent un peu.",
|
||||
"Un humain demande : qu'est-ce que tu veux ?! Un ordinateur répond : du traitement automatique du langage naturel ! L'humain : quand le voulons-nous ?! L'ordinateur : quand le voulons quoi ?",
|
||||
"Est-ce que votre nom est Wi-Fi ? Parce que je sens une connexion.",
|
||||
"Quand quelqu'un de triste joue aux jeux vidéo pour oublier, on peut dire qu'il se console.",
|
||||
"Quel Pokemon a une mitraillette ? Ratatatatatatatatata.",
|
||||
"Les filles c'est comme les noms de domaine. Celles que j'aime sont déjà prises.",
|
||||
"Que dit une mère à son fils geek quand le diner est servi ? Alt Tab !",
|
||||
"Quelle est la meilleure heure pour écouter de la musique ? Deezer.",
|
||||
"De nos jours, le zip ça devient rar..."
|
||||
]
|
||||
}
|
||||
}
|
11
skills/leon/joke/skill.json
Normal file
11
skills/leon/joke/skill.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "Joke",
|
||||
"bridge": "python",
|
||||
"version": "1.0.0",
|
||||
"description": "Leon says some jokes.",
|
||||
"author": {
|
||||
"name": "Louis Grenard",
|
||||
"email": "louis.grenard@gmail.com",
|
||||
"url": "https://github.com/louistiti"
|
||||
}
|
||||
}
|
9
skills/leon/joke/src/actions/run.py
Normal file
9
skills/leon/joke/src/actions/run.py
Normal file
@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding:utf-8 -*-
|
||||
|
||||
import utils
|
||||
|
||||
def run(string, entities):
|
||||
"""Leon says some jokes"""
|
||||
|
||||
return utils.output('end', 'jokes', utils.translate('jokes'))
|
6
skills/leon/joke/src/config.sample.json
Normal file
6
skills/leon/joke/src/config.sample.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"configurations": {
|
||||
"options": {},
|
||||
"credentials": {}
|
||||
}
|
||||
}
|
0
skills/leon/joke/src/lib/.gitkeep
Normal file
0
skills/leon/joke/src/lib/.gitkeep
Normal file
0
skills/leon/joke/test/.gitkeep
Normal file
0
skills/leon/joke/test/.gitkeep
Normal file
Loading…
Reference in New Issue
Block a user