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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f836e0dc962e9ecc58fb346cdd532c374afd2e88a5bbd360dfce71dd32b9678c
4
- data.tar.gz: ffb78ed4055c36b83710127b9262146b19fe6361261eb23f9811d8902f158cff
3
+ metadata.gz: c94f820865869cc8b51140b58cd0795086098a105a2a809dbaadf962b5545252
4
+ data.tar.gz: cca0d3584223c186d30c9795082c9a4e8eedf07d913c7cb318c9aaab040eaac2
5
5
  SHA512:
6
- metadata.gz: 30064fe7c524dc67e9eac2251fa5b6c8e97af6fb14944d154a3de24c034e17f32d56682636614b08f72620d0130375b03f34630241eeeeb9301c26aa9907e0bd
7
- data.tar.gz: a67c8549d67593f47ef605908369436e480f2f1287be63025d0c37df42948744dc20e5202622236b1ef444094613061642f38d5dcabf00b7951c0c1bb719326d
6
+ metadata.gz: c0507f391523b949dc419891cfa2a91840329284e000dcbcf0039abf4415ba519d9af05b75fdffccc325bbf843a6882bb81a2ad003aec4d4e9f89530fc87b730
7
+ data.tar.gz: 8ef9b0dfbb967d143e8e6ba14c35d4305591aa610455eacc7103b53319a000df9819fb86b112da1764dff46ddb80173531d1d66f9aec140b85e2f10fe8cb7b0f
data/CHANGELOG.md ADDED
@@ -0,0 +1,11 @@
1
+ # Changelog 1.0.0
2
+
3
+ ## Bugfixes
4
+
5
+ * The endpoint is now properly configurable
6
+ * Updated gem dependencies
7
+ * Fixed README to point out correct config
8
+
9
+ # Changelog 0.9.0
10
+
11
+ * Initial release
data/Gemfile.lock CHANGED
@@ -1,6 +1,6 @@
1
1
  GIT
2
2
  remote: https://github.com/hellostealth/stealth
3
- revision: 36a7adea03b933e2c33c3d3f05e1770bb5fa1b96
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.20)
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.5)
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.11.2)
37
+ ffi (1.12.2)
38
38
  ffi-compiler (1.0.1)
39
39
  ffi (>= 1.0.0)
40
40
  rake
41
- http (4.2.0)
41
+ http (4.3.0)
42
42
  addressable (~> 2.3)
43
43
  http-cookie (~> 1.0)
44
- http-form_data (~> 2.0)
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.1.1)
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.7.0)
51
+ i18n (1.8.2)
52
52
  concurrent-ruby (~> 1.0)
53
- minitest (5.13.0)
53
+ minitest (5.14.0)
54
54
  multi_json (1.14.1)
55
- mustermann (1.0.3)
55
+ mustermann (1.1.1)
56
+ ruby2_keywords (~> 0.0.1)
56
57
  nio4r (2.5.2)
57
- public_suffix (4.0.1)
58
- puma (4.3.0)
58
+ public_suffix (4.0.3)
59
+ puma (4.3.3)
59
60
  nio4r (~> 2.0)
60
- rack (2.0.7)
61
- rack-protection (2.0.7)
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.8.0)
66
- rspec-core (~> 3.8.0)
67
- rspec-expectations (~> 3.8.0)
68
- rspec-mocks (~> 3.8.0)
69
- rspec-core (3.8.0)
70
- rspec-support (~> 3.8.0)
71
- rspec-expectations (3.8.2)
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.8.0)
74
- rspec-mocks (3.8.0)
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.8.0)
77
- rspec-support (3.8.0)
78
- sidekiq (6.0.3)
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 (>= 2.0.0)
82
+ rack (~> 2.0)
81
83
  rack-protection (>= 2.0.0)
82
84
  redis (>= 4.1.0)
83
- sinatra (2.0.7)
85
+ sinatra (2.0.8.1)
84
86
  mustermann (~> 1.0)
85
87
  rack (~> 2.0)
86
- rack-protection (= 2.0.7)
88
+ rack-protection (= 2.0.8.1)
87
89
  tilt (~> 2.0)
88
- thor (0.20.3)
90
+ thor (1.0.1)
89
91
  thread_safe (0.3.6)
90
92
  tilt (2.0.10)
91
- tzinfo (1.2.5)
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.2.1)
98
+ zeitwerk (2.3.0)
97
99
 
98
100
  PLATFORMS
99
101
  ruby
100
102
 
101
103
  DEPENDENCIES
102
- rspec (= 3.8.0)
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
- ENDPOINT = ENV['LUIS_ENDPOINT'] || 'westus.api.cognitive.microsoft.com'
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://#{ENDPOINT}/luis/prediction/v3.0/apps/#{@app_id}/slots/#{@slot}/predict"
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.9.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.8.0"
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.9.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-01-29 00:00:00.000000000 Z
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.8.0
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.8.0
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.0.6
93
+ rubygems_version: 3.1.2
93
94
  signing_key:
94
95
  specification_version: 4
95
96
  summary: Stealth LUIS