aws-sdk-bedrockruntime 1.33.0 → 1.34.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 +5 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-bedrockruntime/client.rb +47 -1
- data/lib/aws-sdk-bedrockruntime/client_api.rb +47 -0
- data/lib/aws-sdk-bedrockruntime/types.rb +159 -5
- data/lib/aws-sdk-bedrockruntime.rb +1 -1
- data/sig/client.rbs +30 -0
- data/sig/types.rbs +56 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8065d70473b04cbf17290397ee4f53f87d97a7cc44612cc378394646a17153c0
|
4
|
+
data.tar.gz: 89b03ed39b4e327953b9288f9352b0afe81ade6d334484f72e8a1f2241581e45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b4a80fddff5b92265024444d95ead39a0928d295524bdcf73e8475d236656d0ceb77e2522b49f89e2010d4968b0ce640670a2c5d51be3b911a8faadf8f6ab59
|
7
|
+
data.tar.gz: 625de35985685be676c3a2ae41d427858befea8fbbc817157b6bc5cd8e460c1acfb6ff9d0fc5d043378c146fd7f8122fb2989317fe687b27bc1be3e18d2edd13
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
Unreleased Changes
|
2
2
|
------------------
|
3
3
|
|
4
|
+
1.34.0 (2024-12-04)
|
5
|
+
------------------
|
6
|
+
|
7
|
+
* Feature - Added support for Intelligent Prompt Router in Invoke, InvokeStream, Converse and ConverseStream. Add support for Bedrock Guardrails image content filter. New Bedrock Marketplace feature enabling a wider range of bedrock compatible models with self-hosted capability.
|
8
|
+
|
4
9
|
1.33.0 (2024-12-03)
|
5
10
|
------------------
|
6
11
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.34.0
|
@@ -500,6 +500,12 @@ module Aws::BedrockRuntime
|
|
500
500
|
# text: "String", # required
|
501
501
|
# qualifiers: ["grounding_source"], # accepts grounding_source, query, guard_content
|
502
502
|
# },
|
503
|
+
# image: {
|
504
|
+
# format: "png", # required, accepts png, jpeg
|
505
|
+
# source: { # required
|
506
|
+
# bytes: "data",
|
507
|
+
# },
|
508
|
+
# },
|
503
509
|
# },
|
504
510
|
# ],
|
505
511
|
# })
|
@@ -555,8 +561,12 @@ module Aws::BedrockRuntime
|
|
555
561
|
# resp.assessments[0].invocation_metrics.usage.contextual_grounding_policy_units #=> Integer
|
556
562
|
# resp.assessments[0].invocation_metrics.guardrail_coverage.text_characters.guarded #=> Integer
|
557
563
|
# resp.assessments[0].invocation_metrics.guardrail_coverage.text_characters.total #=> Integer
|
564
|
+
# resp.assessments[0].invocation_metrics.guardrail_coverage.images.guarded #=> Integer
|
565
|
+
# resp.assessments[0].invocation_metrics.guardrail_coverage.images.total #=> Integer
|
558
566
|
# resp.guardrail_coverage.text_characters.guarded #=> Integer
|
559
567
|
# resp.guardrail_coverage.text_characters.total #=> Integer
|
568
|
+
# resp.guardrail_coverage.images.guarded #=> Integer
|
569
|
+
# resp.guardrail_coverage.images.total #=> Integer
|
560
570
|
#
|
561
571
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ApplyGuardrail AWS API Documentation
|
562
572
|
#
|
@@ -827,6 +837,12 @@ module Aws::BedrockRuntime
|
|
827
837
|
# text: "String", # required
|
828
838
|
# qualifiers: ["grounding_source"], # accepts grounding_source, query, guard_content
|
829
839
|
# },
|
840
|
+
# image: {
|
841
|
+
# format: "png", # required, accepts png, jpeg
|
842
|
+
# source: { # required
|
843
|
+
# bytes: "data",
|
844
|
+
# },
|
845
|
+
# },
|
830
846
|
# },
|
831
847
|
# },
|
832
848
|
# ],
|
@@ -840,6 +856,12 @@ module Aws::BedrockRuntime
|
|
840
856
|
# text: "String", # required
|
841
857
|
# qualifiers: ["grounding_source"], # accepts grounding_source, query, guard_content
|
842
858
|
# },
|
859
|
+
# image: {
|
860
|
+
# format: "png", # required, accepts png, jpeg
|
861
|
+
# source: { # required
|
862
|
+
# bytes: "data",
|
863
|
+
# },
|
864
|
+
# },
|
843
865
|
# },
|
844
866
|
# },
|
845
867
|
# ],
|
@@ -925,6 +947,8 @@ module Aws::BedrockRuntime
|
|
925
947
|
# resp.output.message.content[0].guard_content.text.text #=> String
|
926
948
|
# resp.output.message.content[0].guard_content.text.qualifiers #=> Array
|
927
949
|
# resp.output.message.content[0].guard_content.text.qualifiers[0] #=> String, one of "grounding_source", "query", "guard_content"
|
950
|
+
# resp.output.message.content[0].guard_content.image.format #=> String, one of "png", "jpeg"
|
951
|
+
# resp.output.message.content[0].guard_content.image.source.bytes #=> String
|
928
952
|
# resp.stop_reason #=> String, one of "end_turn", "tool_use", "max_tokens", "stop_sequence", "guardrail_intervened", "content_filtered"
|
929
953
|
# resp.usage.input_tokens #=> Integer
|
930
954
|
# resp.usage.output_tokens #=> Integer
|
@@ -972,6 +996,8 @@ module Aws::BedrockRuntime
|
|
972
996
|
# resp.trace.guardrail.input_assessment["String"].invocation_metrics.usage.contextual_grounding_policy_units #=> Integer
|
973
997
|
# resp.trace.guardrail.input_assessment["String"].invocation_metrics.guardrail_coverage.text_characters.guarded #=> Integer
|
974
998
|
# resp.trace.guardrail.input_assessment["String"].invocation_metrics.guardrail_coverage.text_characters.total #=> Integer
|
999
|
+
# resp.trace.guardrail.input_assessment["String"].invocation_metrics.guardrail_coverage.images.guarded #=> Integer
|
1000
|
+
# resp.trace.guardrail.input_assessment["String"].invocation_metrics.guardrail_coverage.images.total #=> Integer
|
975
1001
|
# resp.trace.guardrail.output_assessments #=> Hash
|
976
1002
|
# resp.trace.guardrail.output_assessments["String"] #=> Array
|
977
1003
|
# resp.trace.guardrail.output_assessments["String"][0].topic_policy.topics #=> Array
|
@@ -1013,6 +1039,9 @@ module Aws::BedrockRuntime
|
|
1013
1039
|
# resp.trace.guardrail.output_assessments["String"][0].invocation_metrics.usage.contextual_grounding_policy_units #=> Integer
|
1014
1040
|
# resp.trace.guardrail.output_assessments["String"][0].invocation_metrics.guardrail_coverage.text_characters.guarded #=> Integer
|
1015
1041
|
# resp.trace.guardrail.output_assessments["String"][0].invocation_metrics.guardrail_coverage.text_characters.total #=> Integer
|
1042
|
+
# resp.trace.guardrail.output_assessments["String"][0].invocation_metrics.guardrail_coverage.images.guarded #=> Integer
|
1043
|
+
# resp.trace.guardrail.output_assessments["String"][0].invocation_metrics.guardrail_coverage.images.total #=> Integer
|
1044
|
+
# resp.trace.prompt_router.invoked_model_id #=> String
|
1016
1045
|
# resp.performance_config.latency #=> String, one of "standard", "optimized"
|
1017
1046
|
#
|
1018
1047
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/Converse AWS API Documentation
|
@@ -1462,6 +1491,12 @@ module Aws::BedrockRuntime
|
|
1462
1491
|
# text: "String", # required
|
1463
1492
|
# qualifiers: ["grounding_source"], # accepts grounding_source, query, guard_content
|
1464
1493
|
# },
|
1494
|
+
# image: {
|
1495
|
+
# format: "png", # required, accepts png, jpeg
|
1496
|
+
# source: { # required
|
1497
|
+
# bytes: "data",
|
1498
|
+
# },
|
1499
|
+
# },
|
1465
1500
|
# },
|
1466
1501
|
# },
|
1467
1502
|
# ],
|
@@ -1475,6 +1510,12 @@ module Aws::BedrockRuntime
|
|
1475
1510
|
# text: "String", # required
|
1476
1511
|
# qualifiers: ["grounding_source"], # accepts grounding_source, query, guard_content
|
1477
1512
|
# },
|
1513
|
+
# image: {
|
1514
|
+
# format: "png", # required, accepts png, jpeg
|
1515
|
+
# source: { # required
|
1516
|
+
# bytes: "data",
|
1517
|
+
# },
|
1518
|
+
# },
|
1478
1519
|
# },
|
1479
1520
|
# },
|
1480
1521
|
# ],
|
@@ -1601,6 +1642,8 @@ module Aws::BedrockRuntime
|
|
1601
1642
|
# event.trace.guardrail.input_assessment["String"].invocation_metrics.usage.contextual_grounding_policy_units #=> Integer
|
1602
1643
|
# event.trace.guardrail.input_assessment["String"].invocation_metrics.guardrail_coverage.text_characters.guarded #=> Integer
|
1603
1644
|
# event.trace.guardrail.input_assessment["String"].invocation_metrics.guardrail_coverage.text_characters.total #=> Integer
|
1645
|
+
# event.trace.guardrail.input_assessment["String"].invocation_metrics.guardrail_coverage.images.guarded #=> Integer
|
1646
|
+
# event.trace.guardrail.input_assessment["String"].invocation_metrics.guardrail_coverage.images.total #=> Integer
|
1604
1647
|
# event.trace.guardrail.output_assessments #=> Hash
|
1605
1648
|
# event.trace.guardrail.output_assessments["String"] #=> Array
|
1606
1649
|
# event.trace.guardrail.output_assessments["String"][0].topic_policy.topics #=> Array
|
@@ -1642,6 +1685,9 @@ module Aws::BedrockRuntime
|
|
1642
1685
|
# event.trace.guardrail.output_assessments["String"][0].invocation_metrics.usage.contextual_grounding_policy_units #=> Integer
|
1643
1686
|
# event.trace.guardrail.output_assessments["String"][0].invocation_metrics.guardrail_coverage.text_characters.guarded #=> Integer
|
1644
1687
|
# event.trace.guardrail.output_assessments["String"][0].invocation_metrics.guardrail_coverage.text_characters.total #=> Integer
|
1688
|
+
# event.trace.guardrail.output_assessments["String"][0].invocation_metrics.guardrail_coverage.images.guarded #=> Integer
|
1689
|
+
# event.trace.guardrail.output_assessments["String"][0].invocation_metrics.guardrail_coverage.images.total #=> Integer
|
1690
|
+
# event.trace.prompt_router.invoked_model_id #=> String
|
1645
1691
|
# event.performance_config.latency #=> String, one of "standard", "optimized"
|
1646
1692
|
#
|
1647
1693
|
# For :internal_server_exception event available at #on_internal_server_exception_event callback and response eventstream enumerator:
|
@@ -2380,7 +2426,7 @@ module Aws::BedrockRuntime
|
|
2380
2426
|
tracer: tracer
|
2381
2427
|
)
|
2382
2428
|
context[:gem_name] = 'aws-sdk-bedrockruntime'
|
2383
|
-
context[:gem_version] = '1.
|
2429
|
+
context[:gem_version] = '1.34.0'
|
2384
2430
|
Seahorse::Client::Request.new(handlers, context)
|
2385
2431
|
end
|
2386
2432
|
|
@@ -93,11 +93,20 @@ module Aws::BedrockRuntime
|
|
93
93
|
GuardrailConverseContentBlock = Shapes::UnionShape.new(name: 'GuardrailConverseContentBlock')
|
94
94
|
GuardrailConverseContentQualifier = Shapes::StringShape.new(name: 'GuardrailConverseContentQualifier')
|
95
95
|
GuardrailConverseContentQualifierList = Shapes::ListShape.new(name: 'GuardrailConverseContentQualifierList')
|
96
|
+
GuardrailConverseImageBlock = Shapes::StructureShape.new(name: 'GuardrailConverseImageBlock')
|
97
|
+
GuardrailConverseImageFormat = Shapes::StringShape.new(name: 'GuardrailConverseImageFormat')
|
98
|
+
GuardrailConverseImageSource = Shapes::UnionShape.new(name: 'GuardrailConverseImageSource')
|
99
|
+
GuardrailConverseImageSourceBytesBlob = Shapes::BlobShape.new(name: 'GuardrailConverseImageSourceBytesBlob')
|
96
100
|
GuardrailConverseTextBlock = Shapes::StructureShape.new(name: 'GuardrailConverseTextBlock')
|
97
101
|
GuardrailCoverage = Shapes::StructureShape.new(name: 'GuardrailCoverage')
|
98
102
|
GuardrailCustomWord = Shapes::StructureShape.new(name: 'GuardrailCustomWord')
|
99
103
|
GuardrailCustomWordList = Shapes::ListShape.new(name: 'GuardrailCustomWordList')
|
100
104
|
GuardrailIdentifier = Shapes::StringShape.new(name: 'GuardrailIdentifier')
|
105
|
+
GuardrailImageBlock = Shapes::StructureShape.new(name: 'GuardrailImageBlock')
|
106
|
+
GuardrailImageCoverage = Shapes::StructureShape.new(name: 'GuardrailImageCoverage')
|
107
|
+
GuardrailImageFormat = Shapes::StringShape.new(name: 'GuardrailImageFormat')
|
108
|
+
GuardrailImageSource = Shapes::UnionShape.new(name: 'GuardrailImageSource')
|
109
|
+
GuardrailImageSourceBytesBlob = Shapes::BlobShape.new(name: 'GuardrailImageSourceBytesBlob')
|
101
110
|
GuardrailInvocationMetrics = Shapes::StructureShape.new(name: 'GuardrailInvocationMetrics')
|
102
111
|
GuardrailManagedWord = Shapes::StructureShape.new(name: 'GuardrailManagedWord')
|
103
112
|
GuardrailManagedWordList = Shapes::ListShape.new(name: 'GuardrailManagedWordList')
|
@@ -136,6 +145,8 @@ module Aws::BedrockRuntime
|
|
136
145
|
ImageFormat = Shapes::StringShape.new(name: 'ImageFormat')
|
137
146
|
ImageSource = Shapes::UnionShape.new(name: 'ImageSource')
|
138
147
|
ImageSourceBytesBlob = Shapes::BlobShape.new(name: 'ImageSourceBytesBlob')
|
148
|
+
ImagesGuarded = Shapes::IntegerShape.new(name: 'ImagesGuarded')
|
149
|
+
ImagesTotal = Shapes::IntegerShape.new(name: 'ImagesTotal')
|
139
150
|
InferenceConfiguration = Shapes::StructureShape.new(name: 'InferenceConfiguration')
|
140
151
|
InferenceConfigurationMaxTokensInteger = Shapes::IntegerShape.new(name: 'InferenceConfigurationMaxTokensInteger')
|
141
152
|
InferenceConfigurationStopSequencesList = Shapes::ListShape.new(name: 'InferenceConfigurationStopSequencesList')
|
@@ -148,6 +159,7 @@ module Aws::BedrockRuntime
|
|
148
159
|
InvokeModelResponse = Shapes::StructureShape.new(name: 'InvokeModelResponse')
|
149
160
|
InvokeModelWithResponseStreamRequest = Shapes::StructureShape.new(name: 'InvokeModelWithResponseStreamRequest')
|
150
161
|
InvokeModelWithResponseStreamResponse = Shapes::StructureShape.new(name: 'InvokeModelWithResponseStreamResponse')
|
162
|
+
InvokedModelId = Shapes::StringShape.new(name: 'InvokedModelId')
|
151
163
|
KmsKeyId = Shapes::StringShape.new(name: 'KmsKeyId')
|
152
164
|
ListAsyncInvokesRequest = Shapes::StructureShape.new(name: 'ListAsyncInvokesRequest')
|
153
165
|
ListAsyncInvokesResponse = Shapes::StructureShape.new(name: 'ListAsyncInvokesResponse')
|
@@ -172,6 +184,7 @@ module Aws::BedrockRuntime
|
|
172
184
|
PayloadPart = Shapes::StructureShape.new(name: 'PayloadPart')
|
173
185
|
PerformanceConfigLatency = Shapes::StringShape.new(name: 'PerformanceConfigLatency')
|
174
186
|
PerformanceConfiguration = Shapes::StructureShape.new(name: 'PerformanceConfiguration')
|
187
|
+
PromptRouterTrace = Shapes::StructureShape.new(name: 'PromptRouterTrace')
|
175
188
|
PromptVariableMap = Shapes::MapShape.new(name: 'PromptVariableMap')
|
176
189
|
PromptVariableValues = Shapes::UnionShape.new(name: 'PromptVariableValues')
|
177
190
|
RequestMetadata = Shapes::MapShape.new(name: 'RequestMetadata')
|
@@ -395,9 +408,11 @@ module Aws::BedrockRuntime
|
|
395
408
|
ConverseStreamResponse[:payload_member] = ConverseStreamResponse.member(:stream)
|
396
409
|
|
397
410
|
ConverseStreamTrace.add_member(:guardrail, Shapes::ShapeRef.new(shape: GuardrailTraceAssessment, location_name: "guardrail"))
|
411
|
+
ConverseStreamTrace.add_member(:prompt_router, Shapes::ShapeRef.new(shape: PromptRouterTrace, location_name: "promptRouter"))
|
398
412
|
ConverseStreamTrace.struct_class = Types::ConverseStreamTrace
|
399
413
|
|
400
414
|
ConverseTrace.add_member(:guardrail, Shapes::ShapeRef.new(shape: GuardrailTraceAssessment, location_name: "guardrail"))
|
415
|
+
ConverseTrace.add_member(:prompt_router, Shapes::ShapeRef.new(shape: PromptRouterTrace, location_name: "promptRouter"))
|
401
416
|
ConverseTrace.struct_class = Types::ConverseTrace
|
402
417
|
|
403
418
|
DocumentBlock.add_member(:format, Shapes::ShapeRef.new(shape: DocumentFormat, required: true, location_name: "format"))
|
@@ -447,8 +462,10 @@ module Aws::BedrockRuntime
|
|
447
462
|
GuardrailConfiguration.struct_class = Types::GuardrailConfiguration
|
448
463
|
|
449
464
|
GuardrailContentBlock.add_member(:text, Shapes::ShapeRef.new(shape: GuardrailTextBlock, location_name: "text"))
|
465
|
+
GuardrailContentBlock.add_member(:image, Shapes::ShapeRef.new(shape: GuardrailImageBlock, location_name: "image"))
|
450
466
|
GuardrailContentBlock.add_member(:unknown, Shapes::ShapeRef.new(shape: nil, location_name: 'unknown'))
|
451
467
|
GuardrailContentBlock.add_member_subclass(:text, Types::GuardrailContentBlock::Text)
|
468
|
+
GuardrailContentBlock.add_member_subclass(:image, Types::GuardrailContentBlock::Image)
|
452
469
|
GuardrailContentBlock.add_member_subclass(:unknown, Types::GuardrailContentBlock::Unknown)
|
453
470
|
GuardrailContentBlock.struct_class = Types::GuardrailContentBlock
|
454
471
|
|
@@ -479,18 +496,31 @@ module Aws::BedrockRuntime
|
|
479
496
|
GuardrailContextualGroundingPolicyAssessment.struct_class = Types::GuardrailContextualGroundingPolicyAssessment
|
480
497
|
|
481
498
|
GuardrailConverseContentBlock.add_member(:text, Shapes::ShapeRef.new(shape: GuardrailConverseTextBlock, location_name: "text"))
|
499
|
+
GuardrailConverseContentBlock.add_member(:image, Shapes::ShapeRef.new(shape: GuardrailConverseImageBlock, location_name: "image"))
|
482
500
|
GuardrailConverseContentBlock.add_member(:unknown, Shapes::ShapeRef.new(shape: nil, location_name: 'unknown'))
|
483
501
|
GuardrailConverseContentBlock.add_member_subclass(:text, Types::GuardrailConverseContentBlock::Text)
|
502
|
+
GuardrailConverseContentBlock.add_member_subclass(:image, Types::GuardrailConverseContentBlock::Image)
|
484
503
|
GuardrailConverseContentBlock.add_member_subclass(:unknown, Types::GuardrailConverseContentBlock::Unknown)
|
485
504
|
GuardrailConverseContentBlock.struct_class = Types::GuardrailConverseContentBlock
|
486
505
|
|
487
506
|
GuardrailConverseContentQualifierList.member = Shapes::ShapeRef.new(shape: GuardrailConverseContentQualifier)
|
488
507
|
|
508
|
+
GuardrailConverseImageBlock.add_member(:format, Shapes::ShapeRef.new(shape: GuardrailConverseImageFormat, required: true, location_name: "format"))
|
509
|
+
GuardrailConverseImageBlock.add_member(:source, Shapes::ShapeRef.new(shape: GuardrailConverseImageSource, required: true, location_name: "source"))
|
510
|
+
GuardrailConverseImageBlock.struct_class = Types::GuardrailConverseImageBlock
|
511
|
+
|
512
|
+
GuardrailConverseImageSource.add_member(:bytes, Shapes::ShapeRef.new(shape: GuardrailConverseImageSourceBytesBlob, location_name: "bytes"))
|
513
|
+
GuardrailConverseImageSource.add_member(:unknown, Shapes::ShapeRef.new(shape: nil, location_name: 'unknown'))
|
514
|
+
GuardrailConverseImageSource.add_member_subclass(:bytes, Types::GuardrailConverseImageSource::Bytes)
|
515
|
+
GuardrailConverseImageSource.add_member_subclass(:unknown, Types::GuardrailConverseImageSource::Unknown)
|
516
|
+
GuardrailConverseImageSource.struct_class = Types::GuardrailConverseImageSource
|
517
|
+
|
489
518
|
GuardrailConverseTextBlock.add_member(:text, Shapes::ShapeRef.new(shape: String, required: true, location_name: "text"))
|
490
519
|
GuardrailConverseTextBlock.add_member(:qualifiers, Shapes::ShapeRef.new(shape: GuardrailConverseContentQualifierList, location_name: "qualifiers"))
|
491
520
|
GuardrailConverseTextBlock.struct_class = Types::GuardrailConverseTextBlock
|
492
521
|
|
493
522
|
GuardrailCoverage.add_member(:text_characters, Shapes::ShapeRef.new(shape: GuardrailTextCharactersCoverage, location_name: "textCharacters"))
|
523
|
+
GuardrailCoverage.add_member(:images, Shapes::ShapeRef.new(shape: GuardrailImageCoverage, location_name: "images"))
|
494
524
|
GuardrailCoverage.struct_class = Types::GuardrailCoverage
|
495
525
|
|
496
526
|
GuardrailCustomWord.add_member(:match, Shapes::ShapeRef.new(shape: String, required: true, location_name: "match"))
|
@@ -499,6 +529,20 @@ module Aws::BedrockRuntime
|
|
499
529
|
|
500
530
|
GuardrailCustomWordList.member = Shapes::ShapeRef.new(shape: GuardrailCustomWord)
|
501
531
|
|
532
|
+
GuardrailImageBlock.add_member(:format, Shapes::ShapeRef.new(shape: GuardrailImageFormat, required: true, location_name: "format"))
|
533
|
+
GuardrailImageBlock.add_member(:source, Shapes::ShapeRef.new(shape: GuardrailImageSource, required: true, location_name: "source"))
|
534
|
+
GuardrailImageBlock.struct_class = Types::GuardrailImageBlock
|
535
|
+
|
536
|
+
GuardrailImageCoverage.add_member(:guarded, Shapes::ShapeRef.new(shape: ImagesGuarded, location_name: "guarded"))
|
537
|
+
GuardrailImageCoverage.add_member(:total, Shapes::ShapeRef.new(shape: ImagesTotal, location_name: "total"))
|
538
|
+
GuardrailImageCoverage.struct_class = Types::GuardrailImageCoverage
|
539
|
+
|
540
|
+
GuardrailImageSource.add_member(:bytes, Shapes::ShapeRef.new(shape: GuardrailImageSourceBytesBlob, location_name: "bytes"))
|
541
|
+
GuardrailImageSource.add_member(:unknown, Shapes::ShapeRef.new(shape: nil, location_name: 'unknown'))
|
542
|
+
GuardrailImageSource.add_member_subclass(:bytes, Types::GuardrailImageSource::Bytes)
|
543
|
+
GuardrailImageSource.add_member_subclass(:unknown, Types::GuardrailImageSource::Unknown)
|
544
|
+
GuardrailImageSource.struct_class = Types::GuardrailImageSource
|
545
|
+
|
502
546
|
GuardrailInvocationMetrics.add_member(:guardrail_processing_latency, Shapes::ShapeRef.new(shape: GuardrailProcessingLatency, location_name: "guardrailProcessingLatency"))
|
503
547
|
GuardrailInvocationMetrics.add_member(:usage, Shapes::ShapeRef.new(shape: GuardrailUsage, location_name: "usage"))
|
504
548
|
GuardrailInvocationMetrics.add_member(:guardrail_coverage, Shapes::ShapeRef.new(shape: GuardrailCoverage, location_name: "guardrailCoverage"))
|
@@ -685,6 +729,9 @@ module Aws::BedrockRuntime
|
|
685
729
|
PerformanceConfiguration.add_member(:latency, Shapes::ShapeRef.new(shape: PerformanceConfigLatency, location_name: "latency"))
|
686
730
|
PerformanceConfiguration.struct_class = Types::PerformanceConfiguration
|
687
731
|
|
732
|
+
PromptRouterTrace.add_member(:invoked_model_id, Shapes::ShapeRef.new(shape: InvokedModelId, location_name: "invokedModelId"))
|
733
|
+
PromptRouterTrace.struct_class = Types::PromptRouterTrace
|
734
|
+
|
688
735
|
PromptVariableMap.key = Shapes::ShapeRef.new(shape: String)
|
689
736
|
PromptVariableMap.value = Shapes::ShapeRef.new(shape: PromptVariableValues)
|
690
737
|
|
@@ -843,10 +843,15 @@ module Aws::BedrockRuntime
|
|
843
843
|
# The guardrail trace object.
|
844
844
|
# @return [Types::GuardrailTraceAssessment]
|
845
845
|
#
|
846
|
+
# @!attribute [rw] prompt_router
|
847
|
+
# The request's prompt router.
|
848
|
+
# @return [Types::PromptRouterTrace]
|
849
|
+
#
|
846
850
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ConverseStreamTrace AWS API Documentation
|
847
851
|
#
|
848
852
|
class ConverseStreamTrace < Struct.new(
|
849
|
-
:guardrail
|
853
|
+
:guardrail,
|
854
|
+
:prompt_router)
|
850
855
|
SENSITIVE = []
|
851
856
|
include Aws::Structure
|
852
857
|
end
|
@@ -862,10 +867,15 @@ module Aws::BedrockRuntime
|
|
862
867
|
# The guardrail trace object.
|
863
868
|
# @return [Types::GuardrailTraceAssessment]
|
864
869
|
#
|
870
|
+
# @!attribute [rw] prompt_router
|
871
|
+
# The request's prompt router.
|
872
|
+
# @return [Types::PromptRouterTrace]
|
873
|
+
#
|
865
874
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ConverseTrace AWS API Documentation
|
866
875
|
#
|
867
876
|
class ConverseTrace < Struct.new(
|
868
|
-
:guardrail
|
877
|
+
:guardrail,
|
878
|
+
:prompt_router)
|
869
879
|
SENSITIVE = []
|
870
880
|
include Aws::Structure
|
871
881
|
end
|
@@ -1076,16 +1086,23 @@ module Aws::BedrockRuntime
|
|
1076
1086
|
# Text within content block to be evaluated by the guardrail.
|
1077
1087
|
# @return [Types::GuardrailTextBlock]
|
1078
1088
|
#
|
1089
|
+
# @!attribute [rw] image
|
1090
|
+
# Image within guardrail content block to be evaluated by the
|
1091
|
+
# guardrail.
|
1092
|
+
# @return [Types::GuardrailImageBlock]
|
1093
|
+
#
|
1079
1094
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailContentBlock AWS API Documentation
|
1080
1095
|
#
|
1081
1096
|
class GuardrailContentBlock < Struct.new(
|
1082
1097
|
:text,
|
1098
|
+
:image,
|
1083
1099
|
:unknown)
|
1084
|
-
SENSITIVE = []
|
1100
|
+
SENSITIVE = [:image]
|
1085
1101
|
include Aws::Structure
|
1086
1102
|
include Aws::Structure::Union
|
1087
1103
|
|
1088
1104
|
class Text < GuardrailContentBlock; end
|
1105
|
+
class Image < GuardrailContentBlock; end
|
1089
1106
|
class Unknown < GuardrailContentBlock; end
|
1090
1107
|
end
|
1091
1108
|
|
@@ -1193,19 +1210,71 @@ module Aws::BedrockRuntime
|
|
1193
1210
|
# The text to guard.
|
1194
1211
|
# @return [Types::GuardrailConverseTextBlock]
|
1195
1212
|
#
|
1213
|
+
# @!attribute [rw] image
|
1214
|
+
# Image within converse content block to be evaluated by the
|
1215
|
+
# guardrail.
|
1216
|
+
# @return [Types::GuardrailConverseImageBlock]
|
1217
|
+
#
|
1196
1218
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailConverseContentBlock AWS API Documentation
|
1197
1219
|
#
|
1198
1220
|
class GuardrailConverseContentBlock < Struct.new(
|
1199
1221
|
:text,
|
1222
|
+
:image,
|
1200
1223
|
:unknown)
|
1201
|
-
SENSITIVE = []
|
1224
|
+
SENSITIVE = [:image]
|
1202
1225
|
include Aws::Structure
|
1203
1226
|
include Aws::Structure::Union
|
1204
1227
|
|
1205
1228
|
class Text < GuardrailConverseContentBlock; end
|
1229
|
+
class Image < GuardrailConverseContentBlock; end
|
1206
1230
|
class Unknown < GuardrailConverseContentBlock; end
|
1207
1231
|
end
|
1208
1232
|
|
1233
|
+
# An image block that contains images that you want to assess with a
|
1234
|
+
# guardrail.
|
1235
|
+
#
|
1236
|
+
# @!attribute [rw] format
|
1237
|
+
# The format details for the image type of the guardrail converse
|
1238
|
+
# image block.
|
1239
|
+
# @return [String]
|
1240
|
+
#
|
1241
|
+
# @!attribute [rw] source
|
1242
|
+
# The image source (image bytes) of the guardrail converse image
|
1243
|
+
# block.
|
1244
|
+
# @return [Types::GuardrailConverseImageSource]
|
1245
|
+
#
|
1246
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailConverseImageBlock AWS API Documentation
|
1247
|
+
#
|
1248
|
+
class GuardrailConverseImageBlock < Struct.new(
|
1249
|
+
:format,
|
1250
|
+
:source)
|
1251
|
+
SENSITIVE = [:source]
|
1252
|
+
include Aws::Structure
|
1253
|
+
end
|
1254
|
+
|
1255
|
+
# The image source (image bytes) of the guardrail converse image source.
|
1256
|
+
#
|
1257
|
+
# @note GuardrailConverseImageSource is a union - when making an API calls you must set exactly one of the members.
|
1258
|
+
#
|
1259
|
+
# @note GuardrailConverseImageSource is a union - when returned from an API call exactly one value will be set and the returned type will be a subclass of GuardrailConverseImageSource corresponding to the set member.
|
1260
|
+
#
|
1261
|
+
# @!attribute [rw] bytes
|
1262
|
+
# The raw image bytes for the image.
|
1263
|
+
# @return [String]
|
1264
|
+
#
|
1265
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailConverseImageSource AWS API Documentation
|
1266
|
+
#
|
1267
|
+
class GuardrailConverseImageSource < Struct.new(
|
1268
|
+
:bytes,
|
1269
|
+
:unknown)
|
1270
|
+
SENSITIVE = []
|
1271
|
+
include Aws::Structure
|
1272
|
+
include Aws::Structure::Union
|
1273
|
+
|
1274
|
+
class Bytes < GuardrailConverseImageSource; end
|
1275
|
+
class Unknown < GuardrailConverseImageSource; end
|
1276
|
+
end
|
1277
|
+
|
1209
1278
|
# A text block that contains text that you want to assess with a
|
1210
1279
|
# guardrail. For more information, see GuardrailConverseContentBlock.
|
1211
1280
|
#
|
@@ -1233,10 +1302,16 @@ module Aws::BedrockRuntime
|
|
1233
1302
|
# The text characters of the guardrail coverage details.
|
1234
1303
|
# @return [Types::GuardrailTextCharactersCoverage]
|
1235
1304
|
#
|
1305
|
+
# @!attribute [rw] images
|
1306
|
+
# The guardrail coverage for images (the number of images that
|
1307
|
+
# guardrails guarded).
|
1308
|
+
# @return [Types::GuardrailImageCoverage]
|
1309
|
+
#
|
1236
1310
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailCoverage AWS API Documentation
|
1237
1311
|
#
|
1238
1312
|
class GuardrailCoverage < Struct.new(
|
1239
|
-
:text_characters
|
1313
|
+
:text_characters,
|
1314
|
+
:images)
|
1240
1315
|
SENSITIVE = []
|
1241
1316
|
include Aws::Structure
|
1242
1317
|
end
|
@@ -1260,6 +1335,71 @@ module Aws::BedrockRuntime
|
|
1260
1335
|
include Aws::Structure
|
1261
1336
|
end
|
1262
1337
|
|
1338
|
+
# Contain an image which user wants guarded. This block is accepted by
|
1339
|
+
# the guardrails independent API.
|
1340
|
+
#
|
1341
|
+
# @!attribute [rw] format
|
1342
|
+
# The format details for the file type of the image blocked by the
|
1343
|
+
# guardrail.
|
1344
|
+
# @return [String]
|
1345
|
+
#
|
1346
|
+
# @!attribute [rw] source
|
1347
|
+
# The image source (image bytes) details of the image blocked by the
|
1348
|
+
# guardrail.
|
1349
|
+
# @return [Types::GuardrailImageSource]
|
1350
|
+
#
|
1351
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailImageBlock AWS API Documentation
|
1352
|
+
#
|
1353
|
+
class GuardrailImageBlock < Struct.new(
|
1354
|
+
:format,
|
1355
|
+
:source)
|
1356
|
+
SENSITIVE = [:source]
|
1357
|
+
include Aws::Structure
|
1358
|
+
end
|
1359
|
+
|
1360
|
+
# The details of the guardrail image coverage.
|
1361
|
+
#
|
1362
|
+
# @!attribute [rw] guarded
|
1363
|
+
# The count (integer) of images guardrails guarded.
|
1364
|
+
# @return [Integer]
|
1365
|
+
#
|
1366
|
+
# @!attribute [rw] total
|
1367
|
+
# Represents the total number of images (integer) that were in the
|
1368
|
+
# request (guarded and unguarded).
|
1369
|
+
# @return [Integer]
|
1370
|
+
#
|
1371
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailImageCoverage AWS API Documentation
|
1372
|
+
#
|
1373
|
+
class GuardrailImageCoverage < Struct.new(
|
1374
|
+
:guarded,
|
1375
|
+
:total)
|
1376
|
+
SENSITIVE = []
|
1377
|
+
include Aws::Structure
|
1378
|
+
end
|
1379
|
+
|
1380
|
+
# The image source (image bytes) of the guardrail image source. Object
|
1381
|
+
# used in independent api.
|
1382
|
+
#
|
1383
|
+
# @note GuardrailImageSource is a union - when making an API calls you must set exactly one of the members.
|
1384
|
+
#
|
1385
|
+
# @!attribute [rw] bytes
|
1386
|
+
# The bytes details of the guardrail image source. Object used in
|
1387
|
+
# independent api.
|
1388
|
+
# @return [String]
|
1389
|
+
#
|
1390
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailImageSource AWS API Documentation
|
1391
|
+
#
|
1392
|
+
class GuardrailImageSource < Struct.new(
|
1393
|
+
:bytes,
|
1394
|
+
:unknown)
|
1395
|
+
SENSITIVE = []
|
1396
|
+
include Aws::Structure
|
1397
|
+
include Aws::Structure::Union
|
1398
|
+
|
1399
|
+
class Bytes < GuardrailImageSource; end
|
1400
|
+
class Unknown < GuardrailImageSource; end
|
1401
|
+
end
|
1402
|
+
|
1263
1403
|
# The invocation metrics for the guardrail.
|
1264
1404
|
#
|
1265
1405
|
# @!attribute [rw] guardrail_processing_latency
|
@@ -2236,6 +2376,20 @@ module Aws::BedrockRuntime
|
|
2236
2376
|
include Aws::Structure
|
2237
2377
|
end
|
2238
2378
|
|
2379
|
+
# A prompt router trace.
|
2380
|
+
#
|
2381
|
+
# @!attribute [rw] invoked_model_id
|
2382
|
+
# The ID of the invoked model.
|
2383
|
+
# @return [String]
|
2384
|
+
#
|
2385
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/PromptRouterTrace AWS API Documentation
|
2386
|
+
#
|
2387
|
+
class PromptRouterTrace < Struct.new(
|
2388
|
+
:invoked_model_id)
|
2389
|
+
SENSITIVE = []
|
2390
|
+
include Aws::Structure
|
2391
|
+
end
|
2392
|
+
|
2239
2393
|
# Contains a map of variables in a prompt from Prompt management to an
|
2240
2394
|
# object containing the values to fill in for them when running model
|
2241
2395
|
# invocation. For more information, see [How Prompt management
|
data/sig/client.rbs
CHANGED
@@ -96,6 +96,12 @@ module Aws
|
|
96
96
|
text: {
|
97
97
|
text: ::String,
|
98
98
|
qualifiers: Array[("grounding_source" | "query" | "guard_content")]?
|
99
|
+
}?,
|
100
|
+
image: {
|
101
|
+
format: ("png" | "jpeg"),
|
102
|
+
source: {
|
103
|
+
bytes: ::String?
|
104
|
+
}
|
99
105
|
}?
|
100
106
|
},
|
101
107
|
]
|
@@ -188,6 +194,12 @@ module Aws
|
|
188
194
|
text: {
|
189
195
|
text: ::String,
|
190
196
|
qualifiers: Array[("grounding_source" | "query" | "guard_content")]?
|
197
|
+
}?,
|
198
|
+
image: {
|
199
|
+
format: ("png" | "jpeg"),
|
200
|
+
source: {
|
201
|
+
bytes: ::String?
|
202
|
+
}
|
191
203
|
}?
|
192
204
|
}?
|
193
205
|
},
|
@@ -201,6 +213,12 @@ module Aws
|
|
201
213
|
text: {
|
202
214
|
text: ::String,
|
203
215
|
qualifiers: Array[("grounding_source" | "query" | "guard_content")]?
|
216
|
+
}?,
|
217
|
+
image: {
|
218
|
+
format: ("png" | "jpeg"),
|
219
|
+
source: {
|
220
|
+
bytes: ::String?
|
221
|
+
}
|
204
222
|
}?
|
205
223
|
}?
|
206
224
|
},
|
@@ -332,6 +350,12 @@ module Aws
|
|
332
350
|
text: {
|
333
351
|
text: ::String,
|
334
352
|
qualifiers: Array[("grounding_source" | "query" | "guard_content")]?
|
353
|
+
}?,
|
354
|
+
image: {
|
355
|
+
format: ("png" | "jpeg"),
|
356
|
+
source: {
|
357
|
+
bytes: ::String?
|
358
|
+
}
|
335
359
|
}?
|
336
360
|
}?
|
337
361
|
},
|
@@ -345,6 +369,12 @@ module Aws
|
|
345
369
|
text: {
|
346
370
|
text: ::String,
|
347
371
|
qualifiers: Array[("grounding_source" | "query" | "guard_content")]?
|
372
|
+
}?,
|
373
|
+
image: {
|
374
|
+
format: ("png" | "jpeg"),
|
375
|
+
source: {
|
376
|
+
bytes: ::String?
|
377
|
+
}
|
348
378
|
}?
|
349
379
|
}?
|
350
380
|
},
|
data/sig/types.rbs
CHANGED
@@ -224,11 +224,13 @@ module Aws::BedrockRuntime
|
|
224
224
|
|
225
225
|
class ConverseStreamTrace
|
226
226
|
attr_accessor guardrail: Types::GuardrailTraceAssessment
|
227
|
+
attr_accessor prompt_router: Types::PromptRouterTrace
|
227
228
|
SENSITIVE: []
|
228
229
|
end
|
229
230
|
|
230
231
|
class ConverseTrace
|
231
232
|
attr_accessor guardrail: Types::GuardrailTraceAssessment
|
233
|
+
attr_accessor prompt_router: Types::PromptRouterTrace
|
232
234
|
SENSITIVE: []
|
233
235
|
end
|
234
236
|
|
@@ -287,11 +289,14 @@ module Aws::BedrockRuntime
|
|
287
289
|
|
288
290
|
class GuardrailContentBlock
|
289
291
|
attr_accessor text: Types::GuardrailTextBlock
|
292
|
+
attr_accessor image: Types::GuardrailImageBlock
|
290
293
|
attr_accessor unknown: untyped
|
291
|
-
SENSITIVE: []
|
294
|
+
SENSITIVE: [:image]
|
292
295
|
|
293
296
|
class Text < GuardrailContentBlock
|
294
297
|
end
|
298
|
+
class Image < GuardrailContentBlock
|
299
|
+
end
|
295
300
|
class Unknown < GuardrailContentBlock
|
296
301
|
end
|
297
302
|
end
|
@@ -324,15 +329,35 @@ module Aws::BedrockRuntime
|
|
324
329
|
|
325
330
|
class GuardrailConverseContentBlock
|
326
331
|
attr_accessor text: Types::GuardrailConverseTextBlock
|
332
|
+
attr_accessor image: Types::GuardrailConverseImageBlock
|
327
333
|
attr_accessor unknown: untyped
|
328
|
-
SENSITIVE: []
|
334
|
+
SENSITIVE: [:image]
|
329
335
|
|
330
336
|
class Text < GuardrailConverseContentBlock
|
331
337
|
end
|
338
|
+
class Image < GuardrailConverseContentBlock
|
339
|
+
end
|
332
340
|
class Unknown < GuardrailConverseContentBlock
|
333
341
|
end
|
334
342
|
end
|
335
343
|
|
344
|
+
class GuardrailConverseImageBlock
|
345
|
+
attr_accessor format: ("png" | "jpeg")
|
346
|
+
attr_accessor source: Types::GuardrailConverseImageSource
|
347
|
+
SENSITIVE: [:source]
|
348
|
+
end
|
349
|
+
|
350
|
+
class GuardrailConverseImageSource
|
351
|
+
attr_accessor bytes: ::String
|
352
|
+
attr_accessor unknown: untyped
|
353
|
+
SENSITIVE: []
|
354
|
+
|
355
|
+
class Bytes < GuardrailConverseImageSource
|
356
|
+
end
|
357
|
+
class Unknown < GuardrailConverseImageSource
|
358
|
+
end
|
359
|
+
end
|
360
|
+
|
336
361
|
class GuardrailConverseTextBlock
|
337
362
|
attr_accessor text: ::String
|
338
363
|
attr_accessor qualifiers: ::Array[("grounding_source" | "query" | "guard_content")]
|
@@ -341,6 +366,7 @@ module Aws::BedrockRuntime
|
|
341
366
|
|
342
367
|
class GuardrailCoverage
|
343
368
|
attr_accessor text_characters: Types::GuardrailTextCharactersCoverage
|
369
|
+
attr_accessor images: Types::GuardrailImageCoverage
|
344
370
|
SENSITIVE: []
|
345
371
|
end
|
346
372
|
|
@@ -350,6 +376,29 @@ module Aws::BedrockRuntime
|
|
350
376
|
SENSITIVE: []
|
351
377
|
end
|
352
378
|
|
379
|
+
class GuardrailImageBlock
|
380
|
+
attr_accessor format: ("png" | "jpeg")
|
381
|
+
attr_accessor source: Types::GuardrailImageSource
|
382
|
+
SENSITIVE: [:source]
|
383
|
+
end
|
384
|
+
|
385
|
+
class GuardrailImageCoverage
|
386
|
+
attr_accessor guarded: ::Integer
|
387
|
+
attr_accessor total: ::Integer
|
388
|
+
SENSITIVE: []
|
389
|
+
end
|
390
|
+
|
391
|
+
class GuardrailImageSource
|
392
|
+
attr_accessor bytes: ::String
|
393
|
+
attr_accessor unknown: untyped
|
394
|
+
SENSITIVE: []
|
395
|
+
|
396
|
+
class Bytes < GuardrailImageSource
|
397
|
+
end
|
398
|
+
class Unknown < GuardrailImageSource
|
399
|
+
end
|
400
|
+
end
|
401
|
+
|
353
402
|
class GuardrailInvocationMetrics
|
354
403
|
attr_accessor guardrail_processing_latency: ::Integer
|
355
404
|
attr_accessor usage: Types::GuardrailUsage
|
@@ -587,6 +636,11 @@ module Aws::BedrockRuntime
|
|
587
636
|
SENSITIVE: []
|
588
637
|
end
|
589
638
|
|
639
|
+
class PromptRouterTrace
|
640
|
+
attr_accessor invoked_model_id: ::String
|
641
|
+
SENSITIVE: []
|
642
|
+
end
|
643
|
+
|
590
644
|
class PromptVariableValues
|
591
645
|
attr_accessor text: ::String
|
592
646
|
attr_accessor unknown: untyped
|
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.34.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-12-
|
11
|
+
date: 2024-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-core
|