Artemis
Artemis is a wrapper for the Watson Conversation Service
Installation
Add this line to your application's Gemfile:
gem 'artemis-bot'
And run bundle install
from your shell
To install the gem manually from your shell, run:
$ gem install artemis-bot
Configuration
First you need to configure Artemis with your Conversation credentials
Artemis::Bot.configure do |config|
config.username = "your-username-here"
config.password = "your-password-here"
config.base_uri = "https://gateway.watsonplatform.net/conversation/api"
end
Usage
To send a message:
workspace_id = "your-workspace_id-here"
= Artemis::Bot::MessageRequest.new
.input.text = "Hello there"
.alternate_intents = true
response = Artemis::Bot::Conversator.(workspace_id, )
To follow up a conversation:
# assign the context from the previous response
.context = response.context
.input.text = "How you doing?"
# send the message through the Conversator
response = Artemis::Bot::Conversator.(workspace_id, )
Artemis::Bot::MessageRequest
is a wrapper of the MessageRequest hash that the endpoint is expecting
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/icalialabs/artemis. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
License
The gem is available as open source under the terms of the MIT License.