watson-assistant-chatbot 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/watson-assistant-chatbot.rb +9 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8afcfdafc856d47abfde428b1bb4f68d7cd0dfe6673aa495534eb864fe6fb3f9
|
4
|
+
data.tar.gz: 48aeaf00f97360d57da14ab0ae85bda5ec276400b5fb73625fe43d52b73ca748
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f56aed58a9146c677aa9bb175df9a42e7c8dad08c0e48b79d396cb06ede075ee482a9eb5b6608b594ed0dca909e7ff971a955a4df94ecd533a81e7c76162312e
|
7
|
+
data.tar.gz: ead9f11d628208cbad9efd4b18e50e1cbbb9eef69f0a3a3fcdf2945071480c55dd95d7104509254ea9a8642773ec985f17cd79c3627c8cba063f05c43bf831b6
|
@@ -11,19 +11,25 @@ module WatsonAssistant
|
|
11
11
|
INTENT_UNDETECTED = '-- undetected --'
|
12
12
|
|
13
13
|
class Chatbot
|
14
|
-
attr_accessor :user_id, :password, :workspace_id
|
14
|
+
attr_accessor :user_id, :password, :api_key, :workspace_id
|
15
15
|
|
16
16
|
@api_domain = 'gateway.watsonplatform.net'
|
17
|
-
@api_version = '
|
17
|
+
@api_version = '2019-02-28'
|
18
18
|
|
19
19
|
class << self
|
20
20
|
attr_accessor :api_domain, :api_version
|
21
21
|
end
|
22
22
|
|
23
|
-
def initialize(user_id, password, workspace_id)
|
23
|
+
def initialize(user_id, password, workspace_id, api_key = nil)
|
24
24
|
@user_id = user_id
|
25
25
|
@password = password
|
26
26
|
@workspace_id = workspace_id
|
27
|
+
@api_key = api_key
|
28
|
+
|
29
|
+
if api_key then
|
30
|
+
@user_id = 'apikey'
|
31
|
+
@password = api_key
|
32
|
+
end
|
27
33
|
end
|
28
34
|
|
29
35
|
def message(request)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: watson-assistant-chatbot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Julian I. Kamil
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A Ruby chatbot that uses Watson Assistant
|
14
14
|
email: julian.kamil@gmail.com
|