No commit activity in last 3 years
No release in over 3 years
A botbase module intended for holding a conversation between the user and the bot. Relies upon a dRB service for responding to the user's statements. Used by the botbase gem.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 0.3, >= 0.3.7
~> 0.4, >= 0.4.4
 Project Readme

Using the botbase-module-conversation gem

require 'botbase'
require 'botbase-module-conversation'


conf = "
modules:
  Conversation:
    host: rse
    package_src: http://a0.jamesrobertson.eu/qbx/r/dandelion_a3
    default_package: nicole
    default_job: conversations
"

bot = BotBase.new(conf)
bot.received 'how are you' #=> "I am fine thank you"

This module relies upon a kind of dRB service which can run Ruby Scripting File (RSF) jobs centrally. The default job called conversations returns an array object as follows:

[
  ['general', ''],
  ['how are you', 'nicole how_are_you'],
  ["what's the time", 'time now'],
  ["tell me about (?<subject>.*)", 'nicole tell_me_about']
]

The 1st row is the header entry and the remaining rows are the conversations. When the user asks "how are you" the conversation is found and the instruction nicole how_are_you is parsed. The returned values are the package name called nicole, followed by the job called how_are_you. The job simply returns the string I am fine thank you.

This gem is still under development.

Resources

botbase bot conversation module