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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e0e0200afdf318bf8b42e56aa891f1c946e2ec4e9d7809d27eb667fa6cbc8387
4
- data.tar.gz: 1fede36e7d7af358c468cef01370b6638486dc034f6b73e830d500ad692f9d86
3
+ metadata.gz: e875b5ffdfd2d8e604a1d8481301f0e3bdc4ae4ebc264aa38b370a7204d4ecbd
4
+ data.tar.gz: 0ea7408dd8f9d338c8e65480e55156607391f3ef8c1ef29e456b3aca5425ecab
5
5
  SHA512:
6
- metadata.gz: c78778047928bc6fec7f83e47fb6e23016e760d1da29ea312d5a36dcb88612e69c878d6bedf5ed27f1ece1a6295f60114161e277c1b2552db09fae535b7ccc07
7
- data.tar.gz: f8ae819ac4a3205c105e66b2195867a45e600ac7001f878f3730662c15536080fe52ba2affe3d06340b5352f31780efcd9d969ee73148f4aceefa297eb00a0dd
6
+ metadata.gz: 3a1bdeb14d0b7436dffd2db8c3c4db1ca1fedebe9c849563a7819b0a506c7dfb0dfa910f4d38f41131cfe9dbf3a91a669a1c06a19520c61d277d9513f4f473c5
7
+ data.tar.gz: f7a2cba49fb4fbd1aea447b3264ee167ca9b1355504078ff55c4bf3e302d3981b029e187ad01eff51b1cec315136cb5ea90159d90598b22247b65283d6cc961d
data/CHANGELOG.md CHANGED
@@ -1,6 +1,26 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.14.0 (2024-06-25)
5
+ ------------------
6
+
7
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
8
+
9
+ 1.13.0 (2024-06-24)
10
+ ------------------
11
+
12
+ * Feature - Increases Converse API's document name length
13
+
14
+ 1.12.0 (2024-06-20)
15
+ ------------------
16
+
17
+ * Feature - This release adds document support to Converse and ConverseStream APIs
18
+
19
+ 1.11.0 (2024-06-18)
20
+ ------------------
21
+
22
+ * Feature - This release adds support for using Guardrails with the Converse and ConverseStream APIs.
23
+
4
24
  1.10.0 (2024-06-05)
5
25
  ------------------
6
26
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.10.0
1
+ 1.14.0
@@ -91,6 +91,11 @@ module Aws::BedrockRuntime
91
91
 
92
92
  # @overload initialize(options)
93
93
  # @param [Hash] options
94
+ #
95
+ # @option options [Array<Seahorse::Client::Plugin>] :plugins ([]])
96
+ # A list of plugins to apply to the client. Each plugin is either a
97
+ # class name or an instance of a plugin class.
98
+ #
94
99
  # @option options [required, Aws::CredentialProvider] :credentials
95
100
  # Your AWS credentials. This can be an instance of any one of the
96
101
  # following classes:
@@ -211,7 +216,6 @@ module Aws::BedrockRuntime
211
216
  # 'https://example.com'
212
217
  # 'http://example.com:123'
213
218
  #
214
- #
215
219
  # @option options [Integer] :endpoint_cache_max_entries (1000)
216
220
  # Used for the maximum size limit of the LRU cache storing endpoints data
217
221
  # for endpoint discovery enabled operations. Defaults to 1000.
@@ -309,7 +313,6 @@ module Aws::BedrockRuntime
309
313
  # throttling. This is a provisional mode that may change behavior
310
314
  # in the future.
311
315
  #
312
- #
313
316
  # @option options [String] :sdk_ua_app_id
314
317
  # A unique and opaque application ID that is appended to the
315
318
  # User-Agent header as app/sdk_ua_app_id. It should have a
@@ -428,15 +431,19 @@ module Aws::BedrockRuntime
428
431
  # provides a consistent interface that works with all models that
429
432
  # support messages. This allows you to write code once and use it with
430
433
  # different models. Should a model have unique inference parameters, you
431
- # can also pass those unique parameters to the model. For more
432
- # information, see [Run inference][1] in the Bedrock User Guide.
434
+ # can also pass those unique parameters to the model.
433
435
  #
434
- # This operation requires permission for the `bedrock:InvokeModel`
435
- # action.
436
+ # For information about the Converse API, see *Use the Converse API* in
437
+ # the *Amazon Bedrock User Guide*. To use a guardrail, see *Use a
438
+ # guardrail with the Converse API* in the *Amazon Bedrock User Guide*.
439
+ # To use a tool with a model, see *Tool use (Function calling)* in the
440
+ # *Amazon Bedrock User Guide*
436
441
  #
442
+ # For example code, see *Converse API examples* in the *Amazon Bedrock
443
+ # User Guide*.
437
444
  #
438
- #
439
- # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/api-methods-run.html
445
+ # This operation requires permission for the `bedrock:InvokeModel`
446
+ # action.
440
447
  #
441
448
  # @option params [required, String] :model_id
442
449
  # The identifier for the model that you want to call.
@@ -483,6 +490,10 @@ module Aws::BedrockRuntime
483
490
  #
484
491
  # </note>
485
492
  #
493
+ # @option params [Types::GuardrailConfiguration] :guardrail_config
494
+ # Configuration information for a guardrail that you want to use in the
495
+ # request.
496
+ #
486
497
  # @option params [Hash,Array,String,Numeric,Boolean] :additional_model_request_fields
487
498
  # Additional inference parameters that the model supports, beyond the
488
499
  # base set of inference parameters that `Converse` supports in the
@@ -501,8 +512,8 @@ module Aws::BedrockRuntime
501
512
  # @option params [Array<String>] :additional_model_response_field_paths
502
513
  # Additional model parameters field paths to return in the response.
503
514
  # `Converse` returns the requested fields as a JSON Pointer object in
504
- # the `additionalModelResultFields` field. The following is example JSON
505
- # for `additionalModelResponseFieldPaths`.
515
+ # the `additionalModelResponseFields` field. The following is example
516
+ # JSON for `additionalModelResponseFieldPaths`.
506
517
  #
507
518
  # `[ "/stop_sequence" ]`
508
519
  #
@@ -525,6 +536,7 @@ module Aws::BedrockRuntime
525
536
  # * {Types::ConverseResponse#usage #usage} => Types::TokenUsage
526
537
  # * {Types::ConverseResponse#metrics #metrics} => Types::ConverseMetrics
527
538
  # * {Types::ConverseResponse#additional_model_response_fields #additional_model_response_fields} => Hash,Array,String,Numeric,Boolean
539
+ # * {Types::ConverseResponse#trace #trace} => Types::ConverseTrace
528
540
  #
529
541
  # @example Request syntax with placeholder values
530
542
  #
@@ -542,6 +554,13 @@ module Aws::BedrockRuntime
542
554
  # bytes: "data",
543
555
  # },
544
556
  # },
557
+ # document: {
558
+ # format: "pdf", # required, accepts pdf, csv, doc, docx, xls, xlsx, html, txt, md
559
+ # name: "DocumentBlockNameString", # required
560
+ # source: { # required
561
+ # bytes: "data",
562
+ # },
563
+ # },
545
564
  # tool_use: {
546
565
  # tool_use_id: "ToolUseId", # required
547
566
  # name: "ToolName", # required
@@ -561,10 +580,22 @@ module Aws::BedrockRuntime
561
580
  # bytes: "data",
562
581
  # },
563
582
  # },
583
+ # document: {
584
+ # format: "pdf", # required, accepts pdf, csv, doc, docx, xls, xlsx, html, txt, md
585
+ # name: "DocumentBlockNameString", # required
586
+ # source: { # required
587
+ # bytes: "data",
588
+ # },
589
+ # },
564
590
  # },
565
591
  # ],
566
592
  # status: "success", # accepts success, error
567
593
  # },
594
+ # guard_content: {
595
+ # text: {
596
+ # text: "String", # required
597
+ # },
598
+ # },
568
599
  # },
569
600
  # ],
570
601
  # },
@@ -572,6 +603,11 @@ module Aws::BedrockRuntime
572
603
  # system: [
573
604
  # {
574
605
  # text: "NonEmptyString",
606
+ # guard_content: {
607
+ # text: {
608
+ # text: "String", # required
609
+ # },
610
+ # },
575
611
  # },
576
612
  # ],
577
613
  # inference_config: {
@@ -603,6 +639,11 @@ module Aws::BedrockRuntime
603
639
  # },
604
640
  # },
605
641
  # },
642
+ # guardrail_config: {
643
+ # guardrail_identifier: "GuardrailIdentifier", # required
644
+ # guardrail_version: "GuardrailVersion", # required
645
+ # trace: "enabled", # accepts enabled, disabled
646
+ # },
606
647
  # additional_model_request_fields: {
607
648
  # },
608
649
  # additional_model_response_field_paths: ["ConverseRequestAdditionalModelResponseFieldPathsListMemberString"],
@@ -615,6 +656,9 @@ module Aws::BedrockRuntime
615
656
  # resp.output.message.content[0].text #=> String
616
657
  # resp.output.message.content[0].image.format #=> String, one of "png", "jpeg", "gif", "webp"
617
658
  # resp.output.message.content[0].image.source.bytes #=> String
659
+ # resp.output.message.content[0].document.format #=> String, one of "pdf", "csv", "doc", "docx", "xls", "xlsx", "html", "txt", "md"
660
+ # resp.output.message.content[0].document.name #=> String
661
+ # resp.output.message.content[0].document.source.bytes #=> String
618
662
  # resp.output.message.content[0].tool_use.tool_use_id #=> String
619
663
  # resp.output.message.content[0].tool_use.name #=> String
620
664
  # resp.output.message.content[0].tool_result.tool_use_id #=> String
@@ -622,12 +666,69 @@ module Aws::BedrockRuntime
622
666
  # resp.output.message.content[0].tool_result.content[0].text #=> String
623
667
  # resp.output.message.content[0].tool_result.content[0].image.format #=> String, one of "png", "jpeg", "gif", "webp"
624
668
  # resp.output.message.content[0].tool_result.content[0].image.source.bytes #=> String
669
+ # resp.output.message.content[0].tool_result.content[0].document.format #=> String, one of "pdf", "csv", "doc", "docx", "xls", "xlsx", "html", "txt", "md"
670
+ # resp.output.message.content[0].tool_result.content[0].document.name #=> String
671
+ # resp.output.message.content[0].tool_result.content[0].document.source.bytes #=> String
625
672
  # resp.output.message.content[0].tool_result.status #=> String, one of "success", "error"
626
- # resp.stop_reason #=> String, one of "end_turn", "tool_use", "max_tokens", "stop_sequence", "content_filtered"
673
+ # resp.output.message.content[0].guard_content.text.text #=> String
674
+ # resp.stop_reason #=> String, one of "end_turn", "tool_use", "max_tokens", "stop_sequence", "guardrail_intervened", "content_filtered"
627
675
  # resp.usage.input_tokens #=> Integer
628
676
  # resp.usage.output_tokens #=> Integer
629
677
  # resp.usage.total_tokens #=> Integer
630
678
  # resp.metrics.latency_ms #=> Integer
679
+ # resp.trace.guardrail.model_output #=> Array
680
+ # resp.trace.guardrail.model_output[0] #=> String
681
+ # resp.trace.guardrail.input_assessment #=> Hash
682
+ # resp.trace.guardrail.input_assessment["String"].topic_policy.topics #=> Array
683
+ # resp.trace.guardrail.input_assessment["String"].topic_policy.topics[0].name #=> String
684
+ # resp.trace.guardrail.input_assessment["String"].topic_policy.topics[0].type #=> String, one of "DENY"
685
+ # resp.trace.guardrail.input_assessment["String"].topic_policy.topics[0].action #=> String, one of "BLOCKED"
686
+ # resp.trace.guardrail.input_assessment["String"].content_policy.filters #=> Array
687
+ # resp.trace.guardrail.input_assessment["String"].content_policy.filters[0].type #=> String, one of "INSULTS", "HATE", "SEXUAL", "VIOLENCE", "MISCONDUCT", "PROMPT_ATTACK"
688
+ # resp.trace.guardrail.input_assessment["String"].content_policy.filters[0].confidence #=> String, one of "NONE", "LOW", "MEDIUM", "HIGH"
689
+ # resp.trace.guardrail.input_assessment["String"].content_policy.filters[0].action #=> String, one of "BLOCKED"
690
+ # resp.trace.guardrail.input_assessment["String"].word_policy.custom_words #=> Array
691
+ # resp.trace.guardrail.input_assessment["String"].word_policy.custom_words[0].match #=> String
692
+ # resp.trace.guardrail.input_assessment["String"].word_policy.custom_words[0].action #=> String, one of "BLOCKED"
693
+ # resp.trace.guardrail.input_assessment["String"].word_policy.managed_word_lists #=> Array
694
+ # resp.trace.guardrail.input_assessment["String"].word_policy.managed_word_lists[0].match #=> String
695
+ # resp.trace.guardrail.input_assessment["String"].word_policy.managed_word_lists[0].type #=> String, one of "PROFANITY"
696
+ # resp.trace.guardrail.input_assessment["String"].word_policy.managed_word_lists[0].action #=> String, one of "BLOCKED"
697
+ # resp.trace.guardrail.input_assessment["String"].sensitive_information_policy.pii_entities #=> Array
698
+ # resp.trace.guardrail.input_assessment["String"].sensitive_information_policy.pii_entities[0].match #=> String
699
+ # resp.trace.guardrail.input_assessment["String"].sensitive_information_policy.pii_entities[0].type #=> String, one of "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"
700
+ # resp.trace.guardrail.input_assessment["String"].sensitive_information_policy.pii_entities[0].action #=> String, one of "ANONYMIZED", "BLOCKED"
701
+ # resp.trace.guardrail.input_assessment["String"].sensitive_information_policy.regexes #=> Array
702
+ # resp.trace.guardrail.input_assessment["String"].sensitive_information_policy.regexes[0].name #=> String
703
+ # resp.trace.guardrail.input_assessment["String"].sensitive_information_policy.regexes[0].match #=> String
704
+ # resp.trace.guardrail.input_assessment["String"].sensitive_information_policy.regexes[0].regex #=> String
705
+ # resp.trace.guardrail.input_assessment["String"].sensitive_information_policy.regexes[0].action #=> String, one of "ANONYMIZED", "BLOCKED"
706
+ # resp.trace.guardrail.output_assessments #=> Hash
707
+ # resp.trace.guardrail.output_assessments["String"] #=> Array
708
+ # resp.trace.guardrail.output_assessments["String"][0].topic_policy.topics #=> Array
709
+ # resp.trace.guardrail.output_assessments["String"][0].topic_policy.topics[0].name #=> String
710
+ # resp.trace.guardrail.output_assessments["String"][0].topic_policy.topics[0].type #=> String, one of "DENY"
711
+ # resp.trace.guardrail.output_assessments["String"][0].topic_policy.topics[0].action #=> String, one of "BLOCKED"
712
+ # resp.trace.guardrail.output_assessments["String"][0].content_policy.filters #=> Array
713
+ # resp.trace.guardrail.output_assessments["String"][0].content_policy.filters[0].type #=> String, one of "INSULTS", "HATE", "SEXUAL", "VIOLENCE", "MISCONDUCT", "PROMPT_ATTACK"
714
+ # resp.trace.guardrail.output_assessments["String"][0].content_policy.filters[0].confidence #=> String, one of "NONE", "LOW", "MEDIUM", "HIGH"
715
+ # resp.trace.guardrail.output_assessments["String"][0].content_policy.filters[0].action #=> String, one of "BLOCKED"
716
+ # resp.trace.guardrail.output_assessments["String"][0].word_policy.custom_words #=> Array
717
+ # resp.trace.guardrail.output_assessments["String"][0].word_policy.custom_words[0].match #=> String
718
+ # resp.trace.guardrail.output_assessments["String"][0].word_policy.custom_words[0].action #=> String, one of "BLOCKED"
719
+ # resp.trace.guardrail.output_assessments["String"][0].word_policy.managed_word_lists #=> Array
720
+ # resp.trace.guardrail.output_assessments["String"][0].word_policy.managed_word_lists[0].match #=> String
721
+ # resp.trace.guardrail.output_assessments["String"][0].word_policy.managed_word_lists[0].type #=> String, one of "PROFANITY"
722
+ # resp.trace.guardrail.output_assessments["String"][0].word_policy.managed_word_lists[0].action #=> String, one of "BLOCKED"
723
+ # resp.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.pii_entities #=> Array
724
+ # resp.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.pii_entities[0].match #=> String
725
+ # resp.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.pii_entities[0].type #=> String, one of "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"
726
+ # resp.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.pii_entities[0].action #=> String, one of "ANONYMIZED", "BLOCKED"
727
+ # resp.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.regexes #=> Array
728
+ # resp.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.regexes[0].name #=> String
729
+ # resp.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.regexes[0].match #=> String
730
+ # resp.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.regexes[0].regex #=> String
731
+ # resp.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.regexes[0].action #=> String, one of "ANONYMIZED", "BLOCKED"
631
732
  #
632
733
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/Converse AWS API Documentation
633
734
  #
@@ -643,23 +744,27 @@ module Aws::BedrockRuntime
643
744
  # works with all Amazon Bedrock models that support messages. This
644
745
  # allows you to write code once and use it with different models. Should
645
746
  # a model have unique inference parameters, you can also pass those
646
- # unique parameters to the model. For more information, see [Run
647
- # inference][1] in the Bedrock User Guide.
747
+ # unique parameters to the model.
648
748
  #
649
749
  # To find out if a model supports streaming, call
650
- # [GetFoundationModel][2] and check the `responseStreamingSupported`
750
+ # [GetFoundationModel][1] and check the `responseStreamingSupported`
651
751
  # field in the response.
652
752
  #
653
- # For example code, see *Invoke model with streaming code example* in
654
- # the *Amazon Bedrock User Guide*.
753
+ # For information about the Converse API, see *Use the Converse API* in
754
+ # the *Amazon Bedrock User Guide*. To use a guardrail, see *Use a
755
+ # guardrail with the Converse API* in the *Amazon Bedrock User Guide*.
756
+ # To use a tool with a model, see *Tool use (Function calling)* in the
757
+ # *Amazon Bedrock User Guide*
758
+ #
759
+ # For example code, see *Conversation streaming example* in the *Amazon
760
+ # Bedrock User Guide*.
655
761
  #
656
762
  # This operation requires permission for the
657
763
  # `bedrock:InvokeModelWithResponseStream` action.
658
764
  #
659
765
  #
660
766
  #
661
- # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/api-methods-run.html
662
- # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_GetFoundationModel.html
767
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_GetFoundationModel.html
663
768
  #
664
769
  # @option params [required, String] :model_id
665
770
  # The ID for the model.
@@ -705,6 +810,10 @@ module Aws::BedrockRuntime
705
810
  #
706
811
  # </note>
707
812
  #
813
+ # @option params [Types::GuardrailStreamConfiguration] :guardrail_config
814
+ # Configuration information for a guardrail that you want to use in the
815
+ # request.
816
+ #
708
817
  # @option params [Hash,Array,String,Numeric,Boolean] :additional_model_request_fields
709
818
  # Additional inference parameters that the model supports, beyond the
710
819
  # base set of inference parameters that `ConverseStream` supports in the
@@ -718,7 +827,7 @@ module Aws::BedrockRuntime
718
827
  # @option params [Array<String>] :additional_model_response_field_paths
719
828
  # Additional model parameters field paths to return in the response.
720
829
  # `ConverseStream` returns the requested fields as a JSON Pointer object
721
- # in the `additionalModelResultFields` field. The following is example
830
+ # in the `additionalModelResponseFields` field. The following is example
722
831
  # JSON for `additionalModelResponseFieldPaths`.
723
832
  #
724
833
  # `[ "/stop_sequence" ]`
@@ -919,6 +1028,13 @@ module Aws::BedrockRuntime
919
1028
  # bytes: "data",
920
1029
  # },
921
1030
  # },
1031
+ # document: {
1032
+ # format: "pdf", # required, accepts pdf, csv, doc, docx, xls, xlsx, html, txt, md
1033
+ # name: "DocumentBlockNameString", # required
1034
+ # source: { # required
1035
+ # bytes: "data",
1036
+ # },
1037
+ # },
922
1038
  # tool_use: {
923
1039
  # tool_use_id: "ToolUseId", # required
924
1040
  # name: "ToolName", # required
@@ -938,10 +1054,22 @@ module Aws::BedrockRuntime
938
1054
  # bytes: "data",
939
1055
  # },
940
1056
  # },
1057
+ # document: {
1058
+ # format: "pdf", # required, accepts pdf, csv, doc, docx, xls, xlsx, html, txt, md
1059
+ # name: "DocumentBlockNameString", # required
1060
+ # source: { # required
1061
+ # bytes: "data",
1062
+ # },
1063
+ # },
941
1064
  # },
942
1065
  # ],
943
1066
  # status: "success", # accepts success, error
944
1067
  # },
1068
+ # guard_content: {
1069
+ # text: {
1070
+ # text: "String", # required
1071
+ # },
1072
+ # },
945
1073
  # },
946
1074
  # ],
947
1075
  # },
@@ -949,6 +1077,11 @@ module Aws::BedrockRuntime
949
1077
  # system: [
950
1078
  # {
951
1079
  # text: "NonEmptyString",
1080
+ # guard_content: {
1081
+ # text: {
1082
+ # text: "String", # required
1083
+ # },
1084
+ # },
952
1085
  # },
953
1086
  # ],
954
1087
  # inference_config: {
@@ -980,6 +1113,12 @@ module Aws::BedrockRuntime
980
1113
  # },
981
1114
  # },
982
1115
  # },
1116
+ # guardrail_config: {
1117
+ # guardrail_identifier: "GuardrailIdentifier", # required
1118
+ # guardrail_version: "GuardrailVersion", # required
1119
+ # trace: "enabled", # accepts enabled, disabled
1120
+ # stream_processing_mode: "sync", # accepts sync, async
1121
+ # },
983
1122
  # additional_model_request_fields: {
984
1123
  # },
985
1124
  # additional_model_response_field_paths: ["ConverseStreamRequestAdditionalModelResponseFieldPathsListMemberString"],
@@ -1008,13 +1147,66 @@ module Aws::BedrockRuntime
1008
1147
  # event.content_block_index #=> Integer
1009
1148
  #
1010
1149
  # For :message_stop event available at #on_message_stop_event callback and response eventstream enumerator:
1011
- # event.stop_reason #=> String, one of "end_turn", "tool_use", "max_tokens", "stop_sequence", "content_filtered"
1150
+ # event.stop_reason #=> String, one of "end_turn", "tool_use", "max_tokens", "stop_sequence", "guardrail_intervened", "content_filtered"
1012
1151
  #
1013
1152
  # For :metadata event available at #on_metadata_event callback and response eventstream enumerator:
1014
1153
  # event.usage.input_tokens #=> Integer
1015
1154
  # event.usage.output_tokens #=> Integer
1016
1155
  # event.usage.total_tokens #=> Integer
1017
1156
  # event.metrics.latency_ms #=> Integer
1157
+ # event.trace.guardrail.model_output #=> Array
1158
+ # event.trace.guardrail.model_output[0] #=> String
1159
+ # event.trace.guardrail.input_assessment #=> Hash
1160
+ # event.trace.guardrail.input_assessment["String"].topic_policy.topics #=> Array
1161
+ # event.trace.guardrail.input_assessment["String"].topic_policy.topics[0].name #=> String
1162
+ # event.trace.guardrail.input_assessment["String"].topic_policy.topics[0].type #=> String, one of "DENY"
1163
+ # event.trace.guardrail.input_assessment["String"].topic_policy.topics[0].action #=> String, one of "BLOCKED"
1164
+ # event.trace.guardrail.input_assessment["String"].content_policy.filters #=> Array
1165
+ # event.trace.guardrail.input_assessment["String"].content_policy.filters[0].type #=> String, one of "INSULTS", "HATE", "SEXUAL", "VIOLENCE", "MISCONDUCT", "PROMPT_ATTACK"
1166
+ # event.trace.guardrail.input_assessment["String"].content_policy.filters[0].confidence #=> String, one of "NONE", "LOW", "MEDIUM", "HIGH"
1167
+ # event.trace.guardrail.input_assessment["String"].content_policy.filters[0].action #=> String, one of "BLOCKED"
1168
+ # event.trace.guardrail.input_assessment["String"].word_policy.custom_words #=> Array
1169
+ # event.trace.guardrail.input_assessment["String"].word_policy.custom_words[0].match #=> String
1170
+ # event.trace.guardrail.input_assessment["String"].word_policy.custom_words[0].action #=> String, one of "BLOCKED"
1171
+ # event.trace.guardrail.input_assessment["String"].word_policy.managed_word_lists #=> Array
1172
+ # event.trace.guardrail.input_assessment["String"].word_policy.managed_word_lists[0].match #=> String
1173
+ # event.trace.guardrail.input_assessment["String"].word_policy.managed_word_lists[0].type #=> String, one of "PROFANITY"
1174
+ # event.trace.guardrail.input_assessment["String"].word_policy.managed_word_lists[0].action #=> String, one of "BLOCKED"
1175
+ # event.trace.guardrail.input_assessment["String"].sensitive_information_policy.pii_entities #=> Array
1176
+ # event.trace.guardrail.input_assessment["String"].sensitive_information_policy.pii_entities[0].match #=> String
1177
+ # event.trace.guardrail.input_assessment["String"].sensitive_information_policy.pii_entities[0].type #=> String, one of "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"
1178
+ # event.trace.guardrail.input_assessment["String"].sensitive_information_policy.pii_entities[0].action #=> String, one of "ANONYMIZED", "BLOCKED"
1179
+ # event.trace.guardrail.input_assessment["String"].sensitive_information_policy.regexes #=> Array
1180
+ # event.trace.guardrail.input_assessment["String"].sensitive_information_policy.regexes[0].name #=> String
1181
+ # event.trace.guardrail.input_assessment["String"].sensitive_information_policy.regexes[0].match #=> String
1182
+ # event.trace.guardrail.input_assessment["String"].sensitive_information_policy.regexes[0].regex #=> String
1183
+ # event.trace.guardrail.input_assessment["String"].sensitive_information_policy.regexes[0].action #=> String, one of "ANONYMIZED", "BLOCKED"
1184
+ # event.trace.guardrail.output_assessments #=> Hash
1185
+ # event.trace.guardrail.output_assessments["String"] #=> Array
1186
+ # event.trace.guardrail.output_assessments["String"][0].topic_policy.topics #=> Array
1187
+ # event.trace.guardrail.output_assessments["String"][0].topic_policy.topics[0].name #=> String
1188
+ # event.trace.guardrail.output_assessments["String"][0].topic_policy.topics[0].type #=> String, one of "DENY"
1189
+ # event.trace.guardrail.output_assessments["String"][0].topic_policy.topics[0].action #=> String, one of "BLOCKED"
1190
+ # event.trace.guardrail.output_assessments["String"][0].content_policy.filters #=> Array
1191
+ # event.trace.guardrail.output_assessments["String"][0].content_policy.filters[0].type #=> String, one of "INSULTS", "HATE", "SEXUAL", "VIOLENCE", "MISCONDUCT", "PROMPT_ATTACK"
1192
+ # event.trace.guardrail.output_assessments["String"][0].content_policy.filters[0].confidence #=> String, one of "NONE", "LOW", "MEDIUM", "HIGH"
1193
+ # event.trace.guardrail.output_assessments["String"][0].content_policy.filters[0].action #=> String, one of "BLOCKED"
1194
+ # event.trace.guardrail.output_assessments["String"][0].word_policy.custom_words #=> Array
1195
+ # event.trace.guardrail.output_assessments["String"][0].word_policy.custom_words[0].match #=> String
1196
+ # event.trace.guardrail.output_assessments["String"][0].word_policy.custom_words[0].action #=> String, one of "BLOCKED"
1197
+ # event.trace.guardrail.output_assessments["String"][0].word_policy.managed_word_lists #=> Array
1198
+ # event.trace.guardrail.output_assessments["String"][0].word_policy.managed_word_lists[0].match #=> String
1199
+ # event.trace.guardrail.output_assessments["String"][0].word_policy.managed_word_lists[0].type #=> String, one of "PROFANITY"
1200
+ # event.trace.guardrail.output_assessments["String"][0].word_policy.managed_word_lists[0].action #=> String, one of "BLOCKED"
1201
+ # event.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.pii_entities #=> Array
1202
+ # event.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.pii_entities[0].match #=> String
1203
+ # event.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.pii_entities[0].type #=> String, one of "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"
1204
+ # event.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.pii_entities[0].action #=> String, one of "ANONYMIZED", "BLOCKED"
1205
+ # event.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.regexes #=> Array
1206
+ # event.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.regexes[0].name #=> String
1207
+ # event.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.regexes[0].match #=> String
1208
+ # event.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.regexes[0].regex #=> String
1209
+ # event.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.regexes[0].action #=> String, one of "ANONYMIZED", "BLOCKED"
1018
1210
  #
1019
1211
  # For :internal_server_exception event available at #on_internal_server_exception_event callback and response eventstream enumerator:
1020
1212
  # event.message #=> String
@@ -1069,10 +1261,10 @@ module Aws::BedrockRuntime
1069
1261
  #
1070
1262
  # @option params [required, String, StringIO, File] :body
1071
1263
  # The prompt and inference parameters in the format specified in the
1072
- # `contentType` in the header. To see the format and content of the
1073
- # request and response bodies for different models, refer to [Inference
1074
- # parameters][1]. For more information, see [Run inference][2] in the
1075
- # Bedrock User Guide.
1264
+ # `contentType` in the header. You must provide the body in JSON format.
1265
+ # To see the format and content of the request and response bodies for
1266
+ # different models, refer to [Inference parameters][1]. For more
1267
+ # information, see [Run inference][2] in the Bedrock User Guide.
1076
1268
  #
1077
1269
  #
1078
1270
  #
@@ -1080,7 +1272,7 @@ module Aws::BedrockRuntime
1080
1272
  # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/api-methods-run.html
1081
1273
  #
1082
1274
  # @option params [String] :content_type
1083
- # The MIME type of the input data in the request. The default value is
1275
+ # The MIME type of the input data in the request. You must specify
1084
1276
  # `application/json`.
1085
1277
  #
1086
1278
  # @option params [String] :accept
@@ -1187,10 +1379,10 @@ module Aws::BedrockRuntime
1187
1379
  #
1188
1380
  # @option params [required, String, StringIO, File] :body
1189
1381
  # The prompt and inference parameters in the format specified in the
1190
- # `contentType` in the header. To see the format and content of the
1191
- # request and response bodies for different models, refer to [Inference
1192
- # parameters][1]. For more information, see [Run inference][2] in the
1193
- # Bedrock User Guide.
1382
+ # `contentType` in the header. You must provide the body in JSON format.
1383
+ # To see the format and content of the request and response bodies for
1384
+ # different models, refer to [Inference parameters][1]. For more
1385
+ # information, see [Run inference][2] in the Bedrock User Guide.
1194
1386
  #
1195
1387
  #
1196
1388
  #
@@ -1198,7 +1390,7 @@ module Aws::BedrockRuntime
1198
1390
  # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/api-methods-run.html
1199
1391
  #
1200
1392
  # @option params [String] :content_type
1201
- # The MIME type of the input data in the request. The default value is
1393
+ # The MIME type of the input data in the request. You must specify
1202
1394
  # `application/json`.
1203
1395
  #
1204
1396
  # @option params [String] :accept
@@ -1464,7 +1656,7 @@ module Aws::BedrockRuntime
1464
1656
  params: params,
1465
1657
  config: config)
1466
1658
  context[:gem_name] = 'aws-sdk-bedrockruntime'
1467
- context[:gem_version] = '1.10.0'
1659
+ context[:gem_version] = '1.14.0'
1468
1660
  Seahorse::Client::Request.new(handlers, context)
1469
1661
  end
1470
1662