stealth-luis 0.9.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/Gemfile.lock +36 -34
- data/README.md +1 -6
- data/lib/stealth/nlp/luis/client.rb +3 -4
- data/stealth-luis.gemspec +2 -2
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c94f820865869cc8b51140b58cd0795086098a105a2a809dbaadf962b5545252
|
4
|
+
data.tar.gz: cca0d3584223c186d30c9795082c9a4e8eedf07d913c7cb318c9aaab040eaac2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c0507f391523b949dc419891cfa2a91840329284e000dcbcf0039abf4415ba519d9af05b75fdffccc325bbf843a6882bb81a2ad003aec4d4e9f89530fc87b730
|
7
|
+
data.tar.gz: 8ef9b0dfbb967d143e8e6ba14c35d4305591aa610455eacc7103b53319a000df9819fb86b112da1764dff46ddb80173531d1d66f9aec140b85e2f10fe8cb7b0f
|
data/CHANGELOG.md
ADDED
data/Gemfile.lock
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
GIT
|
2
2
|
remote: https://github.com/hellostealth/stealth
|
3
|
-
revision:
|
3
|
+
revision: d6d3c626d2faa951203da652f733c4a18162e1f5
|
4
4
|
branch: master
|
5
5
|
specs:
|
6
6
|
stealth (2.0.0)
|
@@ -9,7 +9,7 @@ GIT
|
|
9
9
|
puma (>= 4.2, < 5.0)
|
10
10
|
sidekiq (~> 6.0)
|
11
11
|
sinatra (~> 2.0)
|
12
|
-
thor (~> 0
|
12
|
+
thor (~> 1.0)
|
13
13
|
|
14
14
|
PATH
|
15
15
|
remote: .
|
@@ -21,7 +21,7 @@ PATH
|
|
21
21
|
GEM
|
22
22
|
remote: https://rubygems.org/
|
23
23
|
specs:
|
24
|
-
activesupport (6.0.1)
|
24
|
+
activesupport (6.0.2.1)
|
25
25
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
26
26
|
i18n (>= 0.7, < 2)
|
27
27
|
minitest (~> 5.1)
|
@@ -29,77 +29,79 @@ GEM
|
|
29
29
|
zeitwerk (~> 2.2)
|
30
30
|
addressable (2.7.0)
|
31
31
|
public_suffix (>= 2.0.2, < 5.0)
|
32
|
-
concurrent-ruby (1.1.
|
32
|
+
concurrent-ruby (1.1.6)
|
33
33
|
connection_pool (2.2.2)
|
34
34
|
diff-lcs (1.3)
|
35
35
|
domain_name (0.5.20190701)
|
36
36
|
unf (>= 0.0.5, < 1.0.0)
|
37
|
-
ffi (1.
|
37
|
+
ffi (1.12.2)
|
38
38
|
ffi-compiler (1.0.1)
|
39
39
|
ffi (>= 1.0.0)
|
40
40
|
rake
|
41
|
-
http (4.
|
41
|
+
http (4.3.0)
|
42
42
|
addressable (~> 2.3)
|
43
43
|
http-cookie (~> 1.0)
|
44
|
-
http-form_data (~> 2.
|
44
|
+
http-form_data (~> 2.2)
|
45
45
|
http-parser (~> 1.2.0)
|
46
46
|
http-cookie (1.0.3)
|
47
47
|
domain_name (~> 0.5)
|
48
|
-
http-form_data (2.
|
48
|
+
http-form_data (2.3.0)
|
49
49
|
http-parser (1.2.1)
|
50
50
|
ffi-compiler (>= 1.0, < 2.0)
|
51
|
-
i18n (1.
|
51
|
+
i18n (1.8.2)
|
52
52
|
concurrent-ruby (~> 1.0)
|
53
|
-
minitest (5.
|
53
|
+
minitest (5.14.0)
|
54
54
|
multi_json (1.14.1)
|
55
|
-
mustermann (1.
|
55
|
+
mustermann (1.1.1)
|
56
|
+
ruby2_keywords (~> 0.0.1)
|
56
57
|
nio4r (2.5.2)
|
57
|
-
public_suffix (4.0.
|
58
|
-
puma (4.3.
|
58
|
+
public_suffix (4.0.3)
|
59
|
+
puma (4.3.3)
|
59
60
|
nio4r (~> 2.0)
|
60
|
-
rack (2.
|
61
|
-
rack-protection (2.0.
|
61
|
+
rack (2.2.2)
|
62
|
+
rack-protection (2.0.8.1)
|
62
63
|
rack
|
63
64
|
rake (13.0.1)
|
64
65
|
redis (4.1.3)
|
65
|
-
rspec (3.
|
66
|
-
rspec-core (~> 3.
|
67
|
-
rspec-expectations (~> 3.
|
68
|
-
rspec-mocks (~> 3.
|
69
|
-
rspec-core (3.
|
70
|
-
rspec-support (~> 3.
|
71
|
-
rspec-expectations (3.
|
66
|
+
rspec (3.9.0)
|
67
|
+
rspec-core (~> 3.9.0)
|
68
|
+
rspec-expectations (~> 3.9.0)
|
69
|
+
rspec-mocks (~> 3.9.0)
|
70
|
+
rspec-core (3.9.1)
|
71
|
+
rspec-support (~> 3.9.1)
|
72
|
+
rspec-expectations (3.9.0)
|
72
73
|
diff-lcs (>= 1.2.0, < 2.0)
|
73
|
-
rspec-support (~> 3.
|
74
|
-
rspec-mocks (3.
|
74
|
+
rspec-support (~> 3.9.0)
|
75
|
+
rspec-mocks (3.9.1)
|
75
76
|
diff-lcs (>= 1.2.0, < 2.0)
|
76
|
-
rspec-support (~> 3.
|
77
|
-
rspec-support (3.
|
78
|
-
|
77
|
+
rspec-support (~> 3.9.0)
|
78
|
+
rspec-support (3.9.2)
|
79
|
+
ruby2_keywords (0.0.2)
|
80
|
+
sidekiq (6.0.5)
|
79
81
|
connection_pool (>= 2.2.2)
|
80
|
-
rack (
|
82
|
+
rack (~> 2.0)
|
81
83
|
rack-protection (>= 2.0.0)
|
82
84
|
redis (>= 4.1.0)
|
83
|
-
sinatra (2.0.
|
85
|
+
sinatra (2.0.8.1)
|
84
86
|
mustermann (~> 1.0)
|
85
87
|
rack (~> 2.0)
|
86
|
-
rack-protection (= 2.0.
|
88
|
+
rack-protection (= 2.0.8.1)
|
87
89
|
tilt (~> 2.0)
|
88
|
-
thor (0.
|
90
|
+
thor (1.0.1)
|
89
91
|
thread_safe (0.3.6)
|
90
92
|
tilt (2.0.10)
|
91
|
-
tzinfo (1.2.
|
93
|
+
tzinfo (1.2.6)
|
92
94
|
thread_safe (~> 0.1)
|
93
95
|
unf (0.1.4)
|
94
96
|
unf_ext
|
95
97
|
unf_ext (0.0.7.6)
|
96
|
-
zeitwerk (2.
|
98
|
+
zeitwerk (2.3.0)
|
97
99
|
|
98
100
|
PLATFORMS
|
99
101
|
ruby
|
100
102
|
|
101
103
|
DEPENDENCIES
|
102
|
-
rspec (= 3.
|
104
|
+
rspec (= 3.9.0)
|
103
105
|
stealth!
|
104
106
|
stealth-luis!
|
105
107
|
|
data/README.md
CHANGED
@@ -10,6 +10,7 @@ Once your account is setup, these are the configuration settings you will need t
|
|
10
10
|
|
11
11
|
```yaml
|
12
12
|
default: &default
|
13
|
+
nlp_integration: luis
|
13
14
|
luis:
|
14
15
|
endpoint: westus.api.cognitive.microsoft.com
|
15
16
|
app_id: 9434fbd8-420b-6d75-8a6f-b6c9a0ac5ec0
|
@@ -24,12 +25,6 @@ test:
|
|
24
25
|
<<: *default
|
25
26
|
```
|
26
27
|
|
27
|
-
Next, inside of an initializer in your bot (`config/initializers/settings.rb`), you need to tell Stealth that `LUIS` will be your default NLP integration:
|
28
|
-
|
29
|
-
```ruby
|
30
|
-
Stealth.config.nlp_integration = :luis
|
31
|
-
```
|
32
|
-
|
33
28
|
Stealth will automatically use your `staging` LUIS slot in development and staging environments and will use the `production` slot for your production Stealth environment.
|
34
29
|
|
35
30
|
That's it! Stealth will now automatically use LUIS for intent detection and entity extraction automatically via `handle_response` and `get_match`.
|
@@ -5,12 +5,11 @@ module Stealth
|
|
5
5
|
module Luis
|
6
6
|
class Client < Stealth::Nlp::Client
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
def initialize(subscription_key: nil, app_id: nil, tz_offset: 0)
|
8
|
+
def initialize(subscription_key: nil, app_id: nil, endpoint: nil, tz_offset: 0)
|
11
9
|
begin
|
12
10
|
@subscription_key = subscription_key || Stealth.config.luis.subscription_key
|
13
11
|
@app_id = app_id || Stealth.config.luis.app_id
|
12
|
+
@endpoint = endpoint || Stealth.config.luis.endpoint
|
14
13
|
@tz_offset = tz_offset || Stealth.config.luis.tz_offset
|
15
14
|
@slot = Stealth.env.development? ? 'staging' : 'production'
|
16
15
|
rescue NoMethodError
|
@@ -22,7 +21,7 @@ module Stealth
|
|
22
21
|
end
|
23
22
|
|
24
23
|
def endpoint
|
25
|
-
"https://#{
|
24
|
+
"https://#{@endpoint}/luis/prediction/v3.0/apps/#{@app_id}/slots/#{@slot}/predict"
|
26
25
|
end
|
27
26
|
|
28
27
|
def client
|
data/stealth-luis.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'stealth-luis'
|
3
|
-
s.version = '0.
|
3
|
+
s.version = '1.0.0'
|
4
4
|
s.summary = "Stealth LUIS"
|
5
5
|
s.description = "Built-in NLP for Stealth bots via Microsoft's Language Understanding (LUIS)."
|
6
6
|
s.authors = ["Mauricio Gomes"]
|
@@ -12,6 +12,6 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.add_dependency 'stealth', '~> 2.0'
|
13
13
|
s.add_dependency 'http', '~> 4'
|
14
14
|
|
15
|
-
s.add_development_dependency "rspec", "= 3.
|
15
|
+
s.add_development_dependency "rspec", "= 3.9.0"
|
16
16
|
|
17
17
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stealth-luis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mauricio Gomes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-03-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: stealth
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 3.
|
47
|
+
version: 3.9.0
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 3.
|
54
|
+
version: 3.9.0
|
55
55
|
description: Built-in NLP for Stealth bots via Microsoft's Language Understanding
|
56
56
|
(LUIS).
|
57
57
|
email: mauricio@edge14.com
|
@@ -61,6 +61,7 @@ extra_rdoc_files: []
|
|
61
61
|
files:
|
62
62
|
- ".gitignore"
|
63
63
|
- ".rspec"
|
64
|
+
- CHANGELOG.md
|
64
65
|
- Gemfile
|
65
66
|
- Gemfile.lock
|
66
67
|
- README.md
|
@@ -89,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
89
90
|
- !ruby/object:Gem::Version
|
90
91
|
version: '0'
|
91
92
|
requirements: []
|
92
|
-
rubygems_version: 3.
|
93
|
+
rubygems_version: 3.1.2
|
93
94
|
signing_key:
|
94
95
|
specification_version: 4
|
95
96
|
summary: Stealth LUIS
|