NOB-congres

Algemene informatie

I don't like chatbots

- Good morning, this is Royal Bank of Canada. How may I help you?

- Ugh, ehmm... I WANT TO CHANGE MY ADDRESS

I don't like chatbots

- Sure I can help you with that, please type your bank account number.

- Peep poop poop peep peep peep poop poop 💩

I don't like chatbots

- Now, please tell me your new address

- Well... it's actually in The Netherlands?

I don't like chatbots

- Oh my! I love The Netherlands, I've been to Amsterdam once.

- 😱

The Question

"Please Joost, can you create a chatbot for us?"

"Sure I can, but I don't really believe in chatb..."

"Ok, great. Please have it ready in two weeks."

The situation so far

Message 1

"Hello there!"

Message 2

"Thanks for downloading me!"

f7e53219-7332-4295-bf06-3cb47495e2b4​
5d77523c-50e4-4e98-99f2-568fab3b78e9

The situation so far

public async resume() {
  const template = this.getTemplate(this.state.templateUUID)

  const message = this.buildMessageFromTemplate(template)
  await message.save()

  await this.updateScriptState({
    lastMessage:  message.id,
    templateUUID: template.uuid
  })

  await message.send()
}

The DSL

send "Hello player!"
send "What is your name?"
name = receive.text

$participant[:name] = name


send "Welcome, #{name}. Are you ready to go?"
answer = NLP.yes_no(receive.text)

The DSL

The new situation

public async resume() {
  const effect = await runtime.resume()
  
  if (effect != null) {
    await effect.run()
  }
}

class SendMessageEffect {
  
  public async run() {
  
    const message = this.buildMessage()
    await message.save()

    await this.runner.updateScriptState({
      lastMessage:  message.id,
      runtimeState: this.runtime.serialize()
    })

    await message.send()
  }

}
Made with Slides.com