This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$name = '' | |
@Event('start') | |
start() { | |
> Hi, I'm PizzaBot. I can order you pizzas :) | |
> What is your name? | |
Prompt() | |
$name = :text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import formats from 'newbot-formats' | |
import code from './main.converse' | |
import orderSkill from './skills/order/order' | |
export default { | |
code, | |
skills: { | |
formats, | |
orderSkill | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Intent('order', [ | |
'order a pizza', | |
'get pizza', | |
'buy pizza' | |
]) | |
order() { | |
date = :intent.date.value | |
callApi(date) | |
> I have noted an order for { date } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import formats from 'newbot-formats' | |
import code from './order.converse' | |
export default { | |
code, | |
skills: { | |
formats | |
}, | |
functions: { | |
callApi(date) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"interactionModel": { | |
"languageModel": { | |
"invocationName": "my chatbot", | |
"intents": [ | |
{ | |
"name": "NewBotIntent", | |
"slots": [ | |
{ | |
"name": "any", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$name = '' | |
@Event('start') | |
start() { | |
> Hey ! My name is ChatBot, and you ? | |
Prompt() | |
$name = :text | |
> Hello { $name } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import code from './main.converse' | |
export default { | |
code | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
platforms: { | |
alexa: {} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ConverseTesting, user, bot } from 'newbot/testing' | |
import mainSkill from './main' | |
describe('Sample Test', () => { | |
let converse, userConverse | |
beforeEach(() => { | |
converse = new ConverseTesting(mainSkill, { | |
model: __dirname + '/model/model.nlp' | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Intent('apod', [ | |
'View picture of the day', | |
'Show image' | |
]) | |
apod() { | |
apod = getApod() | |
if (apod.media_type == 'video') { | |
@Format('buttons', [ | |
{ |
OlderNewer