aws-sdk-bedrockruntime 1.10.0 → 1.11.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -39,9 +39,48 @@ module Aws::BedrockRuntime
39
39
  ConverseStreamRequestAdditionalModelResponseFieldPathsList = Shapes::ListShape.new(name: 'ConverseStreamRequestAdditionalModelResponseFieldPathsList')
40
40
  ConverseStreamRequestAdditionalModelResponseFieldPathsListMemberString = Shapes::StringShape.new(name: 'ConverseStreamRequestAdditionalModelResponseFieldPathsListMemberString')
41
41
  ConverseStreamResponse = Shapes::StructureShape.new(name: 'ConverseStreamResponse')
42
+ ConverseStreamTrace = Shapes::StructureShape.new(name: 'ConverseStreamTrace')
43
+ ConverseTrace = Shapes::StructureShape.new(name: 'ConverseTrace')
42
44
  Document = Shapes::DocumentShape.new(name: 'Document', document: true)
45
+ GuardrailAssessment = Shapes::StructureShape.new(name: 'GuardrailAssessment')
46
+ GuardrailAssessmentList = Shapes::ListShape.new(name: 'GuardrailAssessmentList')
47
+ GuardrailAssessmentListMap = Shapes::MapShape.new(name: 'GuardrailAssessmentListMap')
48
+ GuardrailAssessmentMap = Shapes::MapShape.new(name: 'GuardrailAssessmentMap')
49
+ GuardrailConfiguration = Shapes::StructureShape.new(name: 'GuardrailConfiguration')
50
+ GuardrailContentFilter = Shapes::StructureShape.new(name: 'GuardrailContentFilter')
51
+ GuardrailContentFilterConfidence = Shapes::StringShape.new(name: 'GuardrailContentFilterConfidence')
52
+ GuardrailContentFilterList = Shapes::ListShape.new(name: 'GuardrailContentFilterList')
53
+ GuardrailContentFilterType = Shapes::StringShape.new(name: 'GuardrailContentFilterType')
54
+ GuardrailContentPolicyAction = Shapes::StringShape.new(name: 'GuardrailContentPolicyAction')
55
+ GuardrailContentPolicyAssessment = Shapes::StructureShape.new(name: 'GuardrailContentPolicyAssessment')
56
+ GuardrailConverseContentBlock = Shapes::UnionShape.new(name: 'GuardrailConverseContentBlock')
57
+ GuardrailConverseTextBlock = Shapes::StructureShape.new(name: 'GuardrailConverseTextBlock')
58
+ GuardrailCustomWord = Shapes::StructureShape.new(name: 'GuardrailCustomWord')
59
+ GuardrailCustomWordList = Shapes::ListShape.new(name: 'GuardrailCustomWordList')
43
60
  GuardrailIdentifier = Shapes::StringShape.new(name: 'GuardrailIdentifier')
61
+ GuardrailManagedWord = Shapes::StructureShape.new(name: 'GuardrailManagedWord')
62
+ GuardrailManagedWordList = Shapes::ListShape.new(name: 'GuardrailManagedWordList')
63
+ GuardrailManagedWordType = Shapes::StringShape.new(name: 'GuardrailManagedWordType')
64
+ GuardrailOutputText = Shapes::StringShape.new(name: 'GuardrailOutputText')
65
+ GuardrailPiiEntityFilter = Shapes::StructureShape.new(name: 'GuardrailPiiEntityFilter')
66
+ GuardrailPiiEntityFilterList = Shapes::ListShape.new(name: 'GuardrailPiiEntityFilterList')
67
+ GuardrailPiiEntityType = Shapes::StringShape.new(name: 'GuardrailPiiEntityType')
68
+ GuardrailRegexFilter = Shapes::StructureShape.new(name: 'GuardrailRegexFilter')
69
+ GuardrailRegexFilterList = Shapes::ListShape.new(name: 'GuardrailRegexFilterList')
70
+ GuardrailSensitiveInformationPolicyAction = Shapes::StringShape.new(name: 'GuardrailSensitiveInformationPolicyAction')
71
+ GuardrailSensitiveInformationPolicyAssessment = Shapes::StructureShape.new(name: 'GuardrailSensitiveInformationPolicyAssessment')
72
+ GuardrailStreamConfiguration = Shapes::StructureShape.new(name: 'GuardrailStreamConfiguration')
73
+ GuardrailStreamProcessingMode = Shapes::StringShape.new(name: 'GuardrailStreamProcessingMode')
74
+ GuardrailTopic = Shapes::StructureShape.new(name: 'GuardrailTopic')
75
+ GuardrailTopicList = Shapes::ListShape.new(name: 'GuardrailTopicList')
76
+ GuardrailTopicPolicyAction = Shapes::StringShape.new(name: 'GuardrailTopicPolicyAction')
77
+ GuardrailTopicPolicyAssessment = Shapes::StructureShape.new(name: 'GuardrailTopicPolicyAssessment')
78
+ GuardrailTopicType = Shapes::StringShape.new(name: 'GuardrailTopicType')
79
+ GuardrailTrace = Shapes::StringShape.new(name: 'GuardrailTrace')
80
+ GuardrailTraceAssessment = Shapes::StructureShape.new(name: 'GuardrailTraceAssessment')
44
81
  GuardrailVersion = Shapes::StringShape.new(name: 'GuardrailVersion')
82
+ GuardrailWordPolicyAction = Shapes::StringShape.new(name: 'GuardrailWordPolicyAction')
83
+ GuardrailWordPolicyAssessment = Shapes::StructureShape.new(name: 'GuardrailWordPolicyAssessment')
45
84
  ImageBlock = Shapes::StructureShape.new(name: 'ImageBlock')
46
85
  ImageFormat = Shapes::StringShape.new(name: 'ImageFormat')
47
86
  ImageSource = Shapes::UnionShape.new(name: 'ImageSource')
@@ -65,6 +104,7 @@ module Aws::BedrockRuntime
65
104
  MimeType = Shapes::StringShape.new(name: 'MimeType')
66
105
  ModelErrorException = Shapes::StructureShape.new(name: 'ModelErrorException')
67
106
  ModelNotReadyException = Shapes::StructureShape.new(name: 'ModelNotReadyException')
107
+ ModelOutputs = Shapes::ListShape.new(name: 'ModelOutputs')
68
108
  ModelStreamErrorException = Shapes::StructureShape.new(name: 'ModelStreamErrorException')
69
109
  ModelTimeoutException = Shapes::StructureShape.new(name: 'ModelTimeoutException')
70
110
  NonBlankString = Shapes::StringShape.new(name: 'NonBlankString')
@@ -115,11 +155,13 @@ module Aws::BedrockRuntime
115
155
  ContentBlock.add_member(:image, Shapes::ShapeRef.new(shape: ImageBlock, location_name: "image"))
116
156
  ContentBlock.add_member(:tool_use, Shapes::ShapeRef.new(shape: ToolUseBlock, location_name: "toolUse"))
117
157
  ContentBlock.add_member(:tool_result, Shapes::ShapeRef.new(shape: ToolResultBlock, location_name: "toolResult"))
158
+ ContentBlock.add_member(:guard_content, Shapes::ShapeRef.new(shape: GuardrailConverseContentBlock, location_name: "guardContent"))
118
159
  ContentBlock.add_member(:unknown, Shapes::ShapeRef.new(shape: nil, location_name: 'unknown'))
119
160
  ContentBlock.add_member_subclass(:text, Types::ContentBlock::Text)
120
161
  ContentBlock.add_member_subclass(:image, Types::ContentBlock::Image)
121
162
  ContentBlock.add_member_subclass(:tool_use, Types::ContentBlock::ToolUse)
122
163
  ContentBlock.add_member_subclass(:tool_result, Types::ContentBlock::ToolResult)
164
+ ContentBlock.add_member_subclass(:guard_content, Types::ContentBlock::GuardContent)
123
165
  ContentBlock.add_member_subclass(:unknown, Types::ContentBlock::Unknown)
124
166
  ContentBlock.struct_class = Types::ContentBlock
125
167
 
@@ -164,6 +206,7 @@ module Aws::BedrockRuntime
164
206
  ConverseRequest.add_member(:system, Shapes::ShapeRef.new(shape: SystemContentBlocks, location_name: "system"))
165
207
  ConverseRequest.add_member(:inference_config, Shapes::ShapeRef.new(shape: InferenceConfiguration, location_name: "inferenceConfig"))
166
208
  ConverseRequest.add_member(:tool_config, Shapes::ShapeRef.new(shape: ToolConfiguration, location_name: "toolConfig"))
209
+ ConverseRequest.add_member(:guardrail_config, Shapes::ShapeRef.new(shape: GuardrailConfiguration, location_name: "guardrailConfig"))
167
210
  ConverseRequest.add_member(:additional_model_request_fields, Shapes::ShapeRef.new(shape: Document, location_name: "additionalModelRequestFields"))
168
211
  ConverseRequest.add_member(:additional_model_response_field_paths, Shapes::ShapeRef.new(shape: ConverseRequestAdditionalModelResponseFieldPathsList, location_name: "additionalModelResponseFieldPaths"))
169
212
  ConverseRequest.struct_class = Types::ConverseRequest
@@ -175,10 +218,12 @@ module Aws::BedrockRuntime
175
218
  ConverseResponse.add_member(:usage, Shapes::ShapeRef.new(shape: TokenUsage, required: true, location_name: "usage"))
176
219
  ConverseResponse.add_member(:metrics, Shapes::ShapeRef.new(shape: ConverseMetrics, required: true, location_name: "metrics"))
177
220
  ConverseResponse.add_member(:additional_model_response_fields, Shapes::ShapeRef.new(shape: Document, location_name: "additionalModelResponseFields"))
221
+ ConverseResponse.add_member(:trace, Shapes::ShapeRef.new(shape: ConverseTrace, location_name: "trace"))
178
222
  ConverseResponse.struct_class = Types::ConverseResponse
179
223
 
180
224
  ConverseStreamMetadataEvent.add_member(:usage, Shapes::ShapeRef.new(shape: TokenUsage, required: true, location_name: "usage"))
181
225
  ConverseStreamMetadataEvent.add_member(:metrics, Shapes::ShapeRef.new(shape: ConverseStreamMetrics, required: true, location_name: "metrics"))
226
+ ConverseStreamMetadataEvent.add_member(:trace, Shapes::ShapeRef.new(shape: ConverseStreamTrace, location_name: "trace"))
182
227
  ConverseStreamMetadataEvent.struct_class = Types::ConverseStreamMetadataEvent
183
228
 
184
229
  ConverseStreamMetrics.add_member(:latency_ms, Shapes::ShapeRef.new(shape: Long, required: true, location_name: "latencyMs"))
@@ -201,6 +246,7 @@ module Aws::BedrockRuntime
201
246
  ConverseStreamRequest.add_member(:system, Shapes::ShapeRef.new(shape: SystemContentBlocks, location_name: "system"))
202
247
  ConverseStreamRequest.add_member(:inference_config, Shapes::ShapeRef.new(shape: InferenceConfiguration, location_name: "inferenceConfig"))
203
248
  ConverseStreamRequest.add_member(:tool_config, Shapes::ShapeRef.new(shape: ToolConfiguration, location_name: "toolConfig"))
249
+ ConverseStreamRequest.add_member(:guardrail_config, Shapes::ShapeRef.new(shape: GuardrailStreamConfiguration, location_name: "guardrailConfig"))
204
250
  ConverseStreamRequest.add_member(:additional_model_request_fields, Shapes::ShapeRef.new(shape: Document, location_name: "additionalModelRequestFields"))
205
251
  ConverseStreamRequest.add_member(:additional_model_response_field_paths, Shapes::ShapeRef.new(shape: ConverseStreamRequestAdditionalModelResponseFieldPathsList, location_name: "additionalModelResponseFieldPaths"))
206
252
  ConverseStreamRequest.struct_class = Types::ConverseStreamRequest
@@ -212,6 +258,107 @@ module Aws::BedrockRuntime
212
258
  ConverseStreamResponse[:payload] = :stream
213
259
  ConverseStreamResponse[:payload_member] = ConverseStreamResponse.member(:stream)
214
260
 
261
+ ConverseStreamTrace.add_member(:guardrail, Shapes::ShapeRef.new(shape: GuardrailTraceAssessment, location_name: "guardrail"))
262
+ ConverseStreamTrace.struct_class = Types::ConverseStreamTrace
263
+
264
+ ConverseTrace.add_member(:guardrail, Shapes::ShapeRef.new(shape: GuardrailTraceAssessment, location_name: "guardrail"))
265
+ ConverseTrace.struct_class = Types::ConverseTrace
266
+
267
+ GuardrailAssessment.add_member(:topic_policy, Shapes::ShapeRef.new(shape: GuardrailTopicPolicyAssessment, location_name: "topicPolicy"))
268
+ GuardrailAssessment.add_member(:content_policy, Shapes::ShapeRef.new(shape: GuardrailContentPolicyAssessment, location_name: "contentPolicy"))
269
+ GuardrailAssessment.add_member(:word_policy, Shapes::ShapeRef.new(shape: GuardrailWordPolicyAssessment, location_name: "wordPolicy"))
270
+ GuardrailAssessment.add_member(:sensitive_information_policy, Shapes::ShapeRef.new(shape: GuardrailSensitiveInformationPolicyAssessment, location_name: "sensitiveInformationPolicy"))
271
+ GuardrailAssessment.struct_class = Types::GuardrailAssessment
272
+
273
+ GuardrailAssessmentList.member = Shapes::ShapeRef.new(shape: GuardrailAssessment)
274
+
275
+ GuardrailAssessmentListMap.key = Shapes::ShapeRef.new(shape: String)
276
+ GuardrailAssessmentListMap.value = Shapes::ShapeRef.new(shape: GuardrailAssessmentList)
277
+
278
+ GuardrailAssessmentMap.key = Shapes::ShapeRef.new(shape: String)
279
+ GuardrailAssessmentMap.value = Shapes::ShapeRef.new(shape: GuardrailAssessment)
280
+
281
+ GuardrailConfiguration.add_member(:guardrail_identifier, Shapes::ShapeRef.new(shape: GuardrailIdentifier, required: true, location_name: "guardrailIdentifier"))
282
+ GuardrailConfiguration.add_member(:guardrail_version, Shapes::ShapeRef.new(shape: GuardrailVersion, required: true, location_name: "guardrailVersion"))
283
+ GuardrailConfiguration.add_member(:trace, Shapes::ShapeRef.new(shape: GuardrailTrace, location_name: "trace"))
284
+ GuardrailConfiguration.struct_class = Types::GuardrailConfiguration
285
+
286
+ GuardrailContentFilter.add_member(:type, Shapes::ShapeRef.new(shape: GuardrailContentFilterType, required: true, location_name: "type"))
287
+ GuardrailContentFilter.add_member(:confidence, Shapes::ShapeRef.new(shape: GuardrailContentFilterConfidence, required: true, location_name: "confidence"))
288
+ GuardrailContentFilter.add_member(:action, Shapes::ShapeRef.new(shape: GuardrailContentPolicyAction, required: true, location_name: "action"))
289
+ GuardrailContentFilter.struct_class = Types::GuardrailContentFilter
290
+
291
+ GuardrailContentFilterList.member = Shapes::ShapeRef.new(shape: GuardrailContentFilter)
292
+
293
+ GuardrailContentPolicyAssessment.add_member(:filters, Shapes::ShapeRef.new(shape: GuardrailContentFilterList, required: true, location_name: "filters"))
294
+ GuardrailContentPolicyAssessment.struct_class = Types::GuardrailContentPolicyAssessment
295
+
296
+ GuardrailConverseContentBlock.add_member(:text, Shapes::ShapeRef.new(shape: GuardrailConverseTextBlock, location_name: "text"))
297
+ GuardrailConverseContentBlock.add_member(:unknown, Shapes::ShapeRef.new(shape: nil, location_name: 'unknown'))
298
+ GuardrailConverseContentBlock.add_member_subclass(:text, Types::GuardrailConverseContentBlock::Text)
299
+ GuardrailConverseContentBlock.add_member_subclass(:unknown, Types::GuardrailConverseContentBlock::Unknown)
300
+ GuardrailConverseContentBlock.struct_class = Types::GuardrailConverseContentBlock
301
+
302
+ GuardrailConverseTextBlock.add_member(:text, Shapes::ShapeRef.new(shape: String, required: true, location_name: "text"))
303
+ GuardrailConverseTextBlock.struct_class = Types::GuardrailConverseTextBlock
304
+
305
+ GuardrailCustomWord.add_member(:match, Shapes::ShapeRef.new(shape: String, required: true, location_name: "match"))
306
+ GuardrailCustomWord.add_member(:action, Shapes::ShapeRef.new(shape: GuardrailWordPolicyAction, required: true, location_name: "action"))
307
+ GuardrailCustomWord.struct_class = Types::GuardrailCustomWord
308
+
309
+ GuardrailCustomWordList.member = Shapes::ShapeRef.new(shape: GuardrailCustomWord)
310
+
311
+ GuardrailManagedWord.add_member(:match, Shapes::ShapeRef.new(shape: String, required: true, location_name: "match"))
312
+ GuardrailManagedWord.add_member(:type, Shapes::ShapeRef.new(shape: GuardrailManagedWordType, required: true, location_name: "type"))
313
+ GuardrailManagedWord.add_member(:action, Shapes::ShapeRef.new(shape: GuardrailWordPolicyAction, required: true, location_name: "action"))
314
+ GuardrailManagedWord.struct_class = Types::GuardrailManagedWord
315
+
316
+ GuardrailManagedWordList.member = Shapes::ShapeRef.new(shape: GuardrailManagedWord)
317
+
318
+ GuardrailPiiEntityFilter.add_member(:match, Shapes::ShapeRef.new(shape: String, required: true, location_name: "match"))
319
+ GuardrailPiiEntityFilter.add_member(:type, Shapes::ShapeRef.new(shape: GuardrailPiiEntityType, required: true, location_name: "type"))
320
+ GuardrailPiiEntityFilter.add_member(:action, Shapes::ShapeRef.new(shape: GuardrailSensitiveInformationPolicyAction, required: true, location_name: "action"))
321
+ GuardrailPiiEntityFilter.struct_class = Types::GuardrailPiiEntityFilter
322
+
323
+ GuardrailPiiEntityFilterList.member = Shapes::ShapeRef.new(shape: GuardrailPiiEntityFilter)
324
+
325
+ GuardrailRegexFilter.add_member(:name, Shapes::ShapeRef.new(shape: String, location_name: "name"))
326
+ GuardrailRegexFilter.add_member(:match, Shapes::ShapeRef.new(shape: String, location_name: "match"))
327
+ GuardrailRegexFilter.add_member(:regex, Shapes::ShapeRef.new(shape: String, location_name: "regex"))
328
+ GuardrailRegexFilter.add_member(:action, Shapes::ShapeRef.new(shape: GuardrailSensitiveInformationPolicyAction, required: true, location_name: "action"))
329
+ GuardrailRegexFilter.struct_class = Types::GuardrailRegexFilter
330
+
331
+ GuardrailRegexFilterList.member = Shapes::ShapeRef.new(shape: GuardrailRegexFilter)
332
+
333
+ GuardrailSensitiveInformationPolicyAssessment.add_member(:pii_entities, Shapes::ShapeRef.new(shape: GuardrailPiiEntityFilterList, required: true, location_name: "piiEntities"))
334
+ GuardrailSensitiveInformationPolicyAssessment.add_member(:regexes, Shapes::ShapeRef.new(shape: GuardrailRegexFilterList, required: true, location_name: "regexes"))
335
+ GuardrailSensitiveInformationPolicyAssessment.struct_class = Types::GuardrailSensitiveInformationPolicyAssessment
336
+
337
+ GuardrailStreamConfiguration.add_member(:guardrail_identifier, Shapes::ShapeRef.new(shape: GuardrailIdentifier, required: true, location_name: "guardrailIdentifier"))
338
+ GuardrailStreamConfiguration.add_member(:guardrail_version, Shapes::ShapeRef.new(shape: GuardrailVersion, required: true, location_name: "guardrailVersion"))
339
+ GuardrailStreamConfiguration.add_member(:trace, Shapes::ShapeRef.new(shape: GuardrailTrace, location_name: "trace"))
340
+ GuardrailStreamConfiguration.add_member(:stream_processing_mode, Shapes::ShapeRef.new(shape: GuardrailStreamProcessingMode, location_name: "streamProcessingMode"))
341
+ GuardrailStreamConfiguration.struct_class = Types::GuardrailStreamConfiguration
342
+
343
+ GuardrailTopic.add_member(:name, Shapes::ShapeRef.new(shape: String, required: true, location_name: "name"))
344
+ GuardrailTopic.add_member(:type, Shapes::ShapeRef.new(shape: GuardrailTopicType, required: true, location_name: "type"))
345
+ GuardrailTopic.add_member(:action, Shapes::ShapeRef.new(shape: GuardrailTopicPolicyAction, required: true, location_name: "action"))
346
+ GuardrailTopic.struct_class = Types::GuardrailTopic
347
+
348
+ GuardrailTopicList.member = Shapes::ShapeRef.new(shape: GuardrailTopic)
349
+
350
+ GuardrailTopicPolicyAssessment.add_member(:topics, Shapes::ShapeRef.new(shape: GuardrailTopicList, required: true, location_name: "topics"))
351
+ GuardrailTopicPolicyAssessment.struct_class = Types::GuardrailTopicPolicyAssessment
352
+
353
+ GuardrailTraceAssessment.add_member(:model_output, Shapes::ShapeRef.new(shape: ModelOutputs, location_name: "modelOutput"))
354
+ GuardrailTraceAssessment.add_member(:input_assessment, Shapes::ShapeRef.new(shape: GuardrailAssessmentMap, location_name: "inputAssessment"))
355
+ GuardrailTraceAssessment.add_member(:output_assessments, Shapes::ShapeRef.new(shape: GuardrailAssessmentListMap, location_name: "outputAssessments"))
356
+ GuardrailTraceAssessment.struct_class = Types::GuardrailTraceAssessment
357
+
358
+ GuardrailWordPolicyAssessment.add_member(:custom_words, Shapes::ShapeRef.new(shape: GuardrailCustomWordList, required: true, location_name: "customWords"))
359
+ GuardrailWordPolicyAssessment.add_member(:managed_word_lists, Shapes::ShapeRef.new(shape: GuardrailManagedWordList, required: true, location_name: "managedWordLists"))
360
+ GuardrailWordPolicyAssessment.struct_class = Types::GuardrailWordPolicyAssessment
361
+
215
362
  ImageBlock.add_member(:format, Shapes::ShapeRef.new(shape: ImageFormat, required: true, location_name: "format"))
216
363
  ImageBlock.add_member(:source, Shapes::ShapeRef.new(shape: ImageSource, required: true, location_name: "source"))
217
364
  ImageBlock.struct_class = Types::ImageBlock
@@ -288,6 +435,8 @@ module Aws::BedrockRuntime
288
435
  ModelNotReadyException.add_member(:message, Shapes::ShapeRef.new(shape: NonBlankString, location_name: "message"))
289
436
  ModelNotReadyException.struct_class = Types::ModelNotReadyException
290
437
 
438
+ ModelOutputs.member = Shapes::ShapeRef.new(shape: GuardrailOutputText)
439
+
291
440
  ModelStreamErrorException.add_member(:message, Shapes::ShapeRef.new(shape: NonBlankString, location_name: "message"))
292
441
  ModelStreamErrorException.add_member(:original_status_code, Shapes::ShapeRef.new(shape: StatusCode, location_name: "originalStatusCode"))
293
442
  ModelStreamErrorException.add_member(:original_message, Shapes::ShapeRef.new(shape: NonBlankString, location_name: "originalMessage"))
@@ -317,8 +466,10 @@ module Aws::BedrockRuntime
317
466
  SpecificToolChoice.struct_class = Types::SpecificToolChoice
318
467
 
319
468
  SystemContentBlock.add_member(:text, Shapes::ShapeRef.new(shape: NonEmptyString, location_name: "text"))
469
+ SystemContentBlock.add_member(:guard_content, Shapes::ShapeRef.new(shape: GuardrailConverseContentBlock, location_name: "guardContent"))
320
470
  SystemContentBlock.add_member(:unknown, Shapes::ShapeRef.new(shape: nil, location_name: 'unknown'))
321
471
  SystemContentBlock.add_member_subclass(:text, Types::SystemContentBlock::Text)
472
+ SystemContentBlock.add_member_subclass(:guard_content, Types::SystemContentBlock::GuardContent)
322
473
  SystemContentBlock.add_member_subclass(:unknown, Types::SystemContentBlock::Unknown)
323
474
  SystemContentBlock.struct_class = Types::SystemContentBlock
324
475