wordhop 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +18 -6
- data/lib/wordhop.rb +5 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d414692544312686541f98275120baed822a3ae9
|
4
|
+
data.tar.gz: 0ea707a1fb5351c9b6b0b46ef4dc6ba8e74b8fb7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 184cdbe034124e0bf2aeca82f13d0d35c8a046f55cb23bd8fa582edd5734daa4c568f0197aec2453fe95c125f769288455eec4c58a763ae429faf4819e58a3b5
|
7
|
+
data.tar.gz: 7fd437223db01d4e6a3b8b73d71f2911e7c631cf9fa14994dc7bdfdde31906c3a66b1029139af73ea65ec6131504491a65b4408800e74bb9a506593dbf306864
|
data/README.md
CHANGED
@@ -1,11 +1,21 @@
|
|
1
|
-
# [Wordhop](https://www.wordhop.io) -
|
1
|
+
# [Wordhop](https://www.wordhop.io) - A Toolkit For Human + AI Conversational Experiences
|
2
2
|
## For Chatbots Built in Ruby
|
3
3
|
|
4
|
-
|
4
|
+
Bots can help your business respond faster and scale your service delivery at a lower cost, but bots can't empathize like humans, or solve overly complex customer problems. With Wordhop, you can monitor your bots for communication problems and take over live to engage your customers.
|
5
|
+
It includes a number of smart alerts out of the box, and you can create your own alerts. You can resume automated messaging manually, or if you stop engaging your user, the bot will automatically resume. This is how we see humans and AI collaborating on customer service in the messaging era:
|
6
|
+
|
7
|
+

|
8
|
+
|
9
|
+
|
10
|
+
|
11
|
+
You can integrate Wordhop in minutes and it begins working immediately, enabling you to deliver exceptional human + AI conversational experiences.
|
12
|
+
This module has been tested with Messenger, Slack, Skype, and Microsoft Webchat. Please see our [examples](./examples/).
|
13
|
+
It supports bot developers working in Node, Python and Ruby.
|
5
14
|
|
6
15
|
### What you can do with Wordhop:
|
7
|
-
|
8
|
-
|
16
|
+
You can view a full list of features at (https://www.wordhop.io). It's core purpose can be explained with this single GIF
|
17
|
+
|
18
|
+

|
9
19
|
|
10
20
|
### What you need to get started:
|
11
21
|
* [A Slack Account](http://www.slack.com)
|
@@ -121,7 +131,7 @@ def sendIt(channel, text)
|
|
121
131
|
# schema matches Messenger
|
122
132
|
outgoingMessage = {recipient: {id: channel},message: {text: text}}
|
123
133
|
Wordhop.hopOut(outgoingMessage)
|
124
|
-
|
134
|
+
client.say({'text': text, 'channel': channel}) # <= example of bot sending reply
|
125
135
|
...
|
126
136
|
```
|
127
137
|
|
@@ -156,7 +166,9 @@ To enable the ability to have a human take over your bot, add the following code
|
|
156
166
|
```ruby
|
157
167
|
# Handle forwarding the messages sent by a human through your bot
|
158
168
|
Wordhop.on :'chat response' do |data|
|
159
|
-
|
169
|
+
text = data['text']
|
170
|
+
channel = data['channel']
|
171
|
+
client.say({'text': text, 'channel': channel}) # <= example of bot sending message
|
160
172
|
end
|
161
173
|
```
|
162
174
|
|
data/lib/wordhop.rb
CHANGED
@@ -10,7 +10,7 @@ module Wordhop
|
|
10
10
|
base_uri 'https://wordhopapi.herokuapp.com/api/v1'
|
11
11
|
end
|
12
12
|
|
13
|
-
EVENTS = [:'chat response', :'socket_id_set'].freeze
|
13
|
+
EVENTS = [:'chat response', :'socket_id_set', :'channel update'].freeze
|
14
14
|
|
15
15
|
class << self
|
16
16
|
|
@@ -74,6 +74,10 @@ module Wordhop
|
|
74
74
|
Wordhop.trigger(:'chat response', messageData)
|
75
75
|
end
|
76
76
|
|
77
|
+
socket.on :'channel update' do |data|
|
78
|
+
Wordhop.trigger(:'channel update', data)
|
79
|
+
end
|
80
|
+
|
77
81
|
def on(event, &block)
|
78
82
|
unless EVENTS.include? event
|
79
83
|
raise ArgumentError,
|