aws-lex-conversation 4.2.0 → 4.3.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: 10b9a6aa5e59e3f2c016255c6fbd46f30631ece6c981fa81d45c2b300f676041
4
- data.tar.gz: a49c289a1c5cf5189f3f87e971a32947dc5ab2a6380189b39c8544c1d5792c20
3
+ metadata.gz: 69743533fc27787f0b8ac0f5d2a002496a118c92949c57b90ab1738439a7618d
4
+ data.tar.gz: 98d688962a53a164c398436a9f9101cfedd50dc0238598a3c71e387e6f271f89
5
5
  SHA512:
6
- metadata.gz: c94e997fba06c3658c53d0a51dd4b67a0c3f75118fddd7ba0430ecba2e8433d4e601ba9da5e14d7307d200c97bdda47f74e35809b0e4ae95883c6572365e311e
7
- data.tar.gz: 8734811c21883cc5ba09a234bbd04a1cd6fcf5b98f189406da843c30ea631c19fc0e32ae2a95a7bfdda6985f849ba4e2804f3e3897a3a46eebc9b2de6eb2396d
6
+ metadata.gz: 336228d5bebb36f2f275a78decf3459ce34c48bdaf4c73d48b2f3c15634d414fbf4f3036bb1603b0996b8026cb49605b11d20ef1d5f0b30bc993638aaa549eb2
7
+ data.tar.gz: 7d7147e2c8c65dfa93424f5bb366206b825d9c88c2831f3a140294002ebd6805da384ead59538e964c2934b33a11fb9c80b22c915ece0007382532ef0bb87691
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 4.3.0 - August 25, 2021
2
+
3
+ * Slot elicitor can now be passed an Aws::Lex::Conversation::Type::Message as part of the DSL/callback and properly formats the response as such
4
+
1
5
  # 4.1.0 - July 21, 2021
2
6
 
3
7
  * Don't set the `intent` property in the response for `ElicitIntent`
@@ -28,10 +28,7 @@ module Aws
28
28
  conversation.elicit_slot(
29
29
  slot_to_elicit: name,
30
30
  messages: [
31
- {
32
- contentType: message_content_type,
33
- content: elicitation_content
34
- }
31
+ elicitation_message
35
32
  ]
36
33
  )
37
34
  end
@@ -50,12 +47,21 @@ module Aws
50
47
  conversation.slots[name.to_sym]
51
48
  end
52
49
 
53
- def elicitation_content
50
+ def elicitation_message
54
51
  first_elicitation? ? compose_message(message) : compose_message(follow_up_message)
55
52
  end
56
53
 
57
54
  def compose_message(msg)
58
- msg.is_a?(Proc) ? msg.call(conversation) : msg
55
+ content = msg.is_a?(Proc) ? msg.call(conversation) : msg
56
+
57
+ if content.is_a?(Aws::Lex::Conversation::Type::Message)
58
+ content
59
+ else
60
+ {
61
+ content: content,
62
+ contentType: message_content_type
63
+ }
64
+ end
59
65
  end
60
66
 
61
67
  def increment_slot_elicitations!
@@ -3,7 +3,7 @@
3
3
  module Aws
4
4
  module Lex
5
5
  class Conversation
6
- VERSION = '4.2.0'
6
+ VERSION = '4.3.0'
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-lex-conversation
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.0
4
+ version: 4.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jesse Doyle
@@ -9,10 +9,10 @@ authors:
9
9
  - Darko Dosenovic
10
10
  - Zoie Carnegie
11
11
  - Carlos Mejia Castelo
12
- autorequire:
12
+ autorequire:
13
13
  bindir: exe
14
14
  cert_chain: []
15
- date: 2021-08-23 00:00:00.000000000 Z
15
+ date: 2021-08-26 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: shrink_wrap
@@ -107,7 +107,7 @@ licenses:
107
107
  - MIT
108
108
  metadata:
109
109
  homepage_uri: https://github.com/amaabca/aws-lex-conversation
110
- post_install_message:
110
+ post_install_message:
111
111
  rdoc_options: []
112
112
  require_paths:
113
113
  - lib
@@ -123,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
123
  version: '0'
124
124
  requirements: []
125
125
  rubygems_version: 3.1.2
126
- signing_key:
126
+ signing_key:
127
127
  specification_version: 4
128
128
  summary: AWS Lex Conversation Dialog Management
129
129
  test_files: []