aws-sdk-bedrockruntime 1.10.0 → 1.14.0
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/CHANGELOG.md +20 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-bedrockruntime/client.rb +223 -31
- data/lib/aws-sdk-bedrockruntime/client_api.rb +171 -0
- data/lib/aws-sdk-bedrockruntime/types.rb +548 -47
- data/lib/aws-sdk-bedrockruntime.rb +1 -1
- data/sig/client.rbs +63 -3
- data/sig/types.rbs +156 -2
- metadata +4 -4
data/sig/client.rbs
CHANGED
@@ -78,10 +78,11 @@ module Aws
|
|
78
78
|
interface _ConverseResponseSuccess
|
79
79
|
include ::Seahorse::Client::_ResponseSuccess[Types::ConverseResponse]
|
80
80
|
def output: () -> Types::ConverseOutput
|
81
|
-
def stop_reason: () -> ("end_turn" | "tool_use" | "max_tokens" | "stop_sequence" | "content_filtered")
|
81
|
+
def stop_reason: () -> ("end_turn" | "tool_use" | "max_tokens" | "stop_sequence" | "guardrail_intervened" | "content_filtered")
|
82
82
|
def usage: () -> Types::TokenUsage
|
83
83
|
def metrics: () -> Types::ConverseMetrics
|
84
84
|
def additional_model_response_fields: () -> untyped
|
85
|
+
def trace: () -> Types::ConverseTrace
|
85
86
|
end
|
86
87
|
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/BedrockRuntime/Client.html#converse-instance_method
|
87
88
|
def converse: (
|
@@ -98,6 +99,13 @@ module Aws
|
|
98
99
|
bytes: ::String?
|
99
100
|
}
|
100
101
|
}?,
|
102
|
+
document: {
|
103
|
+
format: ("pdf" | "csv" | "doc" | "docx" | "xls" | "xlsx" | "html" | "txt" | "md"),
|
104
|
+
name: ::String,
|
105
|
+
source: {
|
106
|
+
bytes: ::String?
|
107
|
+
}
|
108
|
+
}?,
|
101
109
|
tool_use: {
|
102
110
|
tool_use_id: ::String,
|
103
111
|
name: ::String,
|
@@ -116,10 +124,22 @@ module Aws
|
|
116
124
|
source: {
|
117
125
|
bytes: ::String?
|
118
126
|
}
|
127
|
+
}?,
|
128
|
+
document: {
|
129
|
+
format: ("pdf" | "csv" | "doc" | "docx" | "xls" | "xlsx" | "html" | "txt" | "md"),
|
130
|
+
name: ::String,
|
131
|
+
source: {
|
132
|
+
bytes: ::String?
|
133
|
+
}
|
119
134
|
}?
|
120
135
|
},
|
121
136
|
],
|
122
137
|
status: ("success" | "error")?
|
138
|
+
}?,
|
139
|
+
guard_content: {
|
140
|
+
text: {
|
141
|
+
text: ::String
|
142
|
+
}?
|
123
143
|
}?
|
124
144
|
},
|
125
145
|
]
|
@@ -127,7 +147,12 @@ module Aws
|
|
127
147
|
],
|
128
148
|
?system: Array[
|
129
149
|
{
|
130
|
-
text: ::String
|
150
|
+
text: ::String?,
|
151
|
+
guard_content: {
|
152
|
+
text: {
|
153
|
+
text: ::String
|
154
|
+
}?
|
155
|
+
}?
|
131
156
|
},
|
132
157
|
],
|
133
158
|
?inference_config: {
|
@@ -159,6 +184,11 @@ module Aws
|
|
159
184
|
}?
|
160
185
|
}?
|
161
186
|
},
|
187
|
+
?guardrail_config: {
|
188
|
+
guardrail_identifier: ::String,
|
189
|
+
guardrail_version: ::String,
|
190
|
+
trace: ("enabled" | "disabled")?
|
191
|
+
},
|
162
192
|
?additional_model_request_fields: {
|
163
193
|
},
|
164
194
|
?additional_model_response_field_paths: Array[::String]
|
@@ -184,6 +214,13 @@ module Aws
|
|
184
214
|
bytes: ::String?
|
185
215
|
}
|
186
216
|
}?,
|
217
|
+
document: {
|
218
|
+
format: ("pdf" | "csv" | "doc" | "docx" | "xls" | "xlsx" | "html" | "txt" | "md"),
|
219
|
+
name: ::String,
|
220
|
+
source: {
|
221
|
+
bytes: ::String?
|
222
|
+
}
|
223
|
+
}?,
|
187
224
|
tool_use: {
|
188
225
|
tool_use_id: ::String,
|
189
226
|
name: ::String,
|
@@ -202,10 +239,22 @@ module Aws
|
|
202
239
|
source: {
|
203
240
|
bytes: ::String?
|
204
241
|
}
|
242
|
+
}?,
|
243
|
+
document: {
|
244
|
+
format: ("pdf" | "csv" | "doc" | "docx" | "xls" | "xlsx" | "html" | "txt" | "md"),
|
245
|
+
name: ::String,
|
246
|
+
source: {
|
247
|
+
bytes: ::String?
|
248
|
+
}
|
205
249
|
}?
|
206
250
|
},
|
207
251
|
],
|
208
252
|
status: ("success" | "error")?
|
253
|
+
}?,
|
254
|
+
guard_content: {
|
255
|
+
text: {
|
256
|
+
text: ::String
|
257
|
+
}?
|
209
258
|
}?
|
210
259
|
},
|
211
260
|
]
|
@@ -213,7 +262,12 @@ module Aws
|
|
213
262
|
],
|
214
263
|
?system: Array[
|
215
264
|
{
|
216
|
-
text: ::String
|
265
|
+
text: ::String?,
|
266
|
+
guard_content: {
|
267
|
+
text: {
|
268
|
+
text: ::String
|
269
|
+
}?
|
270
|
+
}?
|
217
271
|
},
|
218
272
|
],
|
219
273
|
?inference_config: {
|
@@ -245,6 +299,12 @@ module Aws
|
|
245
299
|
}?
|
246
300
|
}?
|
247
301
|
},
|
302
|
+
?guardrail_config: {
|
303
|
+
guardrail_identifier: ::String,
|
304
|
+
guardrail_version: ::String,
|
305
|
+
trace: ("enabled" | "disabled")?,
|
306
|
+
stream_processing_mode: ("sync" | "async")?
|
307
|
+
},
|
248
308
|
?additional_model_request_fields: {
|
249
309
|
},
|
250
310
|
?additional_model_response_field_paths: Array[::String]
|
data/sig/types.rbs
CHANGED
@@ -22,8 +22,10 @@ module Aws::BedrockRuntime
|
|
22
22
|
class ContentBlock
|
23
23
|
attr_accessor text: ::String
|
24
24
|
attr_accessor image: Types::ImageBlock
|
25
|
+
attr_accessor document: Types::DocumentBlock
|
25
26
|
attr_accessor tool_use: Types::ToolUseBlock
|
26
27
|
attr_accessor tool_result: Types::ToolResultBlock
|
28
|
+
attr_accessor guard_content: Types::GuardrailConverseContentBlock
|
27
29
|
attr_accessor unknown: untyped
|
28
30
|
SENSITIVE: []
|
29
31
|
|
@@ -31,10 +33,14 @@ module Aws::BedrockRuntime
|
|
31
33
|
end
|
32
34
|
class Image < ContentBlock
|
33
35
|
end
|
36
|
+
class Document < ContentBlock
|
37
|
+
end
|
34
38
|
class ToolUse < ContentBlock
|
35
39
|
end
|
36
40
|
class ToolResult < ContentBlock
|
37
41
|
end
|
42
|
+
class GuardContent < ContentBlock
|
43
|
+
end
|
38
44
|
class Unknown < ContentBlock
|
39
45
|
end
|
40
46
|
end
|
@@ -106,6 +112,7 @@ module Aws::BedrockRuntime
|
|
106
112
|
attr_accessor system: ::Array[Types::SystemContentBlock]
|
107
113
|
attr_accessor inference_config: Types::InferenceConfiguration
|
108
114
|
attr_accessor tool_config: Types::ToolConfiguration
|
115
|
+
attr_accessor guardrail_config: Types::GuardrailConfiguration
|
109
116
|
attr_accessor additional_model_request_fields: untyped
|
110
117
|
attr_accessor additional_model_response_field_paths: ::Array[::String]
|
111
118
|
SENSITIVE: []
|
@@ -113,16 +120,18 @@ module Aws::BedrockRuntime
|
|
113
120
|
|
114
121
|
class ConverseResponse
|
115
122
|
attr_accessor output: Types::ConverseOutput
|
116
|
-
attr_accessor stop_reason: ("end_turn" | "tool_use" | "max_tokens" | "stop_sequence" | "content_filtered")
|
123
|
+
attr_accessor stop_reason: ("end_turn" | "tool_use" | "max_tokens" | "stop_sequence" | "guardrail_intervened" | "content_filtered")
|
117
124
|
attr_accessor usage: Types::TokenUsage
|
118
125
|
attr_accessor metrics: Types::ConverseMetrics
|
119
126
|
attr_accessor additional_model_response_fields: untyped
|
127
|
+
attr_accessor trace: Types::ConverseTrace
|
120
128
|
SENSITIVE: []
|
121
129
|
end
|
122
130
|
|
123
131
|
class ConverseStreamMetadataEvent
|
124
132
|
attr_accessor usage: Types::TokenUsage
|
125
133
|
attr_accessor metrics: Types::ConverseStreamMetrics
|
134
|
+
attr_accessor trace: Types::ConverseStreamTrace
|
126
135
|
attr_accessor event_type: untyped
|
127
136
|
SENSITIVE: []
|
128
137
|
end
|
@@ -138,6 +147,7 @@ module Aws::BedrockRuntime
|
|
138
147
|
attr_accessor system: ::Array[Types::SystemContentBlock]
|
139
148
|
attr_accessor inference_config: Types::InferenceConfiguration
|
140
149
|
attr_accessor tool_config: Types::ToolConfiguration
|
150
|
+
attr_accessor guardrail_config: Types::GuardrailStreamConfiguration
|
141
151
|
attr_accessor additional_model_request_fields: untyped
|
142
152
|
attr_accessor additional_model_response_field_paths: ::Array[::String]
|
143
153
|
SENSITIVE: []
|
@@ -148,6 +158,144 @@ module Aws::BedrockRuntime
|
|
148
158
|
SENSITIVE: []
|
149
159
|
end
|
150
160
|
|
161
|
+
class ConverseStreamTrace
|
162
|
+
attr_accessor guardrail: Types::GuardrailTraceAssessment
|
163
|
+
SENSITIVE: []
|
164
|
+
end
|
165
|
+
|
166
|
+
class ConverseTrace
|
167
|
+
attr_accessor guardrail: Types::GuardrailTraceAssessment
|
168
|
+
SENSITIVE: []
|
169
|
+
end
|
170
|
+
|
171
|
+
class DocumentBlock
|
172
|
+
attr_accessor format: ("pdf" | "csv" | "doc" | "docx" | "xls" | "xlsx" | "html" | "txt" | "md")
|
173
|
+
attr_accessor name: ::String
|
174
|
+
attr_accessor source: Types::DocumentSource
|
175
|
+
SENSITIVE: []
|
176
|
+
end
|
177
|
+
|
178
|
+
class DocumentSource
|
179
|
+
attr_accessor bytes: ::String
|
180
|
+
attr_accessor unknown: untyped
|
181
|
+
SENSITIVE: []
|
182
|
+
|
183
|
+
class Bytes < DocumentSource
|
184
|
+
end
|
185
|
+
class Unknown < DocumentSource
|
186
|
+
end
|
187
|
+
end
|
188
|
+
|
189
|
+
class GuardrailAssessment
|
190
|
+
attr_accessor topic_policy: Types::GuardrailTopicPolicyAssessment
|
191
|
+
attr_accessor content_policy: Types::GuardrailContentPolicyAssessment
|
192
|
+
attr_accessor word_policy: Types::GuardrailWordPolicyAssessment
|
193
|
+
attr_accessor sensitive_information_policy: Types::GuardrailSensitiveInformationPolicyAssessment
|
194
|
+
SENSITIVE: []
|
195
|
+
end
|
196
|
+
|
197
|
+
class GuardrailConfiguration
|
198
|
+
attr_accessor guardrail_identifier: ::String
|
199
|
+
attr_accessor guardrail_version: ::String
|
200
|
+
attr_accessor trace: ("enabled" | "disabled")
|
201
|
+
SENSITIVE: []
|
202
|
+
end
|
203
|
+
|
204
|
+
class GuardrailContentFilter
|
205
|
+
attr_accessor type: ("INSULTS" | "HATE" | "SEXUAL" | "VIOLENCE" | "MISCONDUCT" | "PROMPT_ATTACK")
|
206
|
+
attr_accessor confidence: ("NONE" | "LOW" | "MEDIUM" | "HIGH")
|
207
|
+
attr_accessor action: ("BLOCKED")
|
208
|
+
SENSITIVE: []
|
209
|
+
end
|
210
|
+
|
211
|
+
class GuardrailContentPolicyAssessment
|
212
|
+
attr_accessor filters: ::Array[Types::GuardrailContentFilter]
|
213
|
+
SENSITIVE: []
|
214
|
+
end
|
215
|
+
|
216
|
+
class GuardrailConverseContentBlock
|
217
|
+
attr_accessor text: Types::GuardrailConverseTextBlock
|
218
|
+
attr_accessor unknown: untyped
|
219
|
+
SENSITIVE: []
|
220
|
+
|
221
|
+
class Text < GuardrailConverseContentBlock
|
222
|
+
end
|
223
|
+
class Unknown < GuardrailConverseContentBlock
|
224
|
+
end
|
225
|
+
end
|
226
|
+
|
227
|
+
class GuardrailConverseTextBlock
|
228
|
+
attr_accessor text: ::String
|
229
|
+
SENSITIVE: []
|
230
|
+
end
|
231
|
+
|
232
|
+
class GuardrailCustomWord
|
233
|
+
attr_accessor match: ::String
|
234
|
+
attr_accessor action: ("BLOCKED")
|
235
|
+
SENSITIVE: []
|
236
|
+
end
|
237
|
+
|
238
|
+
class GuardrailManagedWord
|
239
|
+
attr_accessor match: ::String
|
240
|
+
attr_accessor type: ("PROFANITY")
|
241
|
+
attr_accessor action: ("BLOCKED")
|
242
|
+
SENSITIVE: []
|
243
|
+
end
|
244
|
+
|
245
|
+
class GuardrailPiiEntityFilter
|
246
|
+
attr_accessor match: ::String
|
247
|
+
attr_accessor type: ("ADDRESS" | "AGE" | "AWS_ACCESS_KEY" | "AWS_SECRET_KEY" | "CA_HEALTH_NUMBER" | "CA_SOCIAL_INSURANCE_NUMBER" | "CREDIT_DEBIT_CARD_CVV" | "CREDIT_DEBIT_CARD_EXPIRY" | "CREDIT_DEBIT_CARD_NUMBER" | "DRIVER_ID" | "EMAIL" | "INTERNATIONAL_BANK_ACCOUNT_NUMBER" | "IP_ADDRESS" | "LICENSE_PLATE" | "MAC_ADDRESS" | "NAME" | "PASSWORD" | "PHONE" | "PIN" | "SWIFT_CODE" | "UK_NATIONAL_HEALTH_SERVICE_NUMBER" | "UK_NATIONAL_INSURANCE_NUMBER" | "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER" | "URL" | "USERNAME" | "US_BANK_ACCOUNT_NUMBER" | "US_BANK_ROUTING_NUMBER" | "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER" | "US_PASSPORT_NUMBER" | "US_SOCIAL_SECURITY_NUMBER" | "VEHICLE_IDENTIFICATION_NUMBER")
|
248
|
+
attr_accessor action: ("ANONYMIZED" | "BLOCKED")
|
249
|
+
SENSITIVE: []
|
250
|
+
end
|
251
|
+
|
252
|
+
class GuardrailRegexFilter
|
253
|
+
attr_accessor name: ::String
|
254
|
+
attr_accessor match: ::String
|
255
|
+
attr_accessor regex: ::String
|
256
|
+
attr_accessor action: ("ANONYMIZED" | "BLOCKED")
|
257
|
+
SENSITIVE: []
|
258
|
+
end
|
259
|
+
|
260
|
+
class GuardrailSensitiveInformationPolicyAssessment
|
261
|
+
attr_accessor pii_entities: ::Array[Types::GuardrailPiiEntityFilter]
|
262
|
+
attr_accessor regexes: ::Array[Types::GuardrailRegexFilter]
|
263
|
+
SENSITIVE: []
|
264
|
+
end
|
265
|
+
|
266
|
+
class GuardrailStreamConfiguration
|
267
|
+
attr_accessor guardrail_identifier: ::String
|
268
|
+
attr_accessor guardrail_version: ::String
|
269
|
+
attr_accessor trace: ("enabled" | "disabled")
|
270
|
+
attr_accessor stream_processing_mode: ("sync" | "async")
|
271
|
+
SENSITIVE: []
|
272
|
+
end
|
273
|
+
|
274
|
+
class GuardrailTopic
|
275
|
+
attr_accessor name: ::String
|
276
|
+
attr_accessor type: ("DENY")
|
277
|
+
attr_accessor action: ("BLOCKED")
|
278
|
+
SENSITIVE: []
|
279
|
+
end
|
280
|
+
|
281
|
+
class GuardrailTopicPolicyAssessment
|
282
|
+
attr_accessor topics: ::Array[Types::GuardrailTopic]
|
283
|
+
SENSITIVE: []
|
284
|
+
end
|
285
|
+
|
286
|
+
class GuardrailTraceAssessment
|
287
|
+
attr_accessor model_output: ::Array[::String]
|
288
|
+
attr_accessor input_assessment: ::Hash[::String, Types::GuardrailAssessment]
|
289
|
+
attr_accessor output_assessments: ::Hash[::String, ::Array[Types::GuardrailAssessment]]
|
290
|
+
SENSITIVE: []
|
291
|
+
end
|
292
|
+
|
293
|
+
class GuardrailWordPolicyAssessment
|
294
|
+
attr_accessor custom_words: ::Array[Types::GuardrailCustomWord]
|
295
|
+
attr_accessor managed_word_lists: ::Array[Types::GuardrailManagedWord]
|
296
|
+
SENSITIVE: []
|
297
|
+
end
|
298
|
+
|
151
299
|
class ImageBlock
|
152
300
|
attr_accessor format: ("png" | "jpeg" | "gif" | "webp")
|
153
301
|
attr_accessor source: Types::ImageSource
|
@@ -226,7 +374,7 @@ module Aws::BedrockRuntime
|
|
226
374
|
end
|
227
375
|
|
228
376
|
class MessageStopEvent
|
229
|
-
attr_accessor stop_reason: ("end_turn" | "tool_use" | "max_tokens" | "stop_sequence" | "content_filtered")
|
377
|
+
attr_accessor stop_reason: ("end_turn" | "tool_use" | "max_tokens" | "stop_sequence" | "guardrail_intervened" | "content_filtered")
|
230
378
|
attr_accessor additional_model_response_fields: untyped
|
231
379
|
attr_accessor event_type: untyped
|
232
380
|
SENSITIVE: []
|
@@ -281,11 +429,14 @@ module Aws::BedrockRuntime
|
|
281
429
|
|
282
430
|
class SystemContentBlock
|
283
431
|
attr_accessor text: ::String
|
432
|
+
attr_accessor guard_content: Types::GuardrailConverseContentBlock
|
284
433
|
attr_accessor unknown: untyped
|
285
434
|
SENSITIVE: []
|
286
435
|
|
287
436
|
class Text < SystemContentBlock
|
288
437
|
end
|
438
|
+
class GuardContent < SystemContentBlock
|
439
|
+
end
|
289
440
|
class Unknown < SystemContentBlock
|
290
441
|
end
|
291
442
|
end
|
@@ -359,6 +510,7 @@ module Aws::BedrockRuntime
|
|
359
510
|
attr_accessor json: untyped
|
360
511
|
attr_accessor text: ::String
|
361
512
|
attr_accessor image: Types::ImageBlock
|
513
|
+
attr_accessor document: Types::DocumentBlock
|
362
514
|
attr_accessor unknown: untyped
|
363
515
|
SENSITIVE: []
|
364
516
|
|
@@ -368,6 +520,8 @@ module Aws::BedrockRuntime
|
|
368
520
|
end
|
369
521
|
class Image < ToolResultContentBlock
|
370
522
|
end
|
523
|
+
class Document < ToolResultContentBlock
|
524
|
+
end
|
371
525
|
class Unknown < ToolResultContentBlock
|
372
526
|
end
|
373
527
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-bedrockruntime
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amazon Web Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-06-
|
11
|
+
date: 2024-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-core
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '3'
|
20
20
|
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 3.
|
22
|
+
version: 3.199.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '3'
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: 3.
|
32
|
+
version: 3.199.0
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: aws-sigv4
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|