aws-sdk-bedrockruntime 1.10.0 → 1.12.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: f590891a9fca80d3c4d905c4f212fb714fd8955351f7a4c7c0960117fcb28753
4
+ data.tar.gz: 66a18b65f050fb8b108420e7975b8a75589b42700867b5a7a7fe88d940054fa3
5
5
  SHA512:
6
- metadata.gz: c78778047928bc6fec7f83e47fb6e23016e760d1da29ea312d5a36dcb88612e69c878d6bedf5ed27f1ece1a6295f60114161e277c1b2552db09fae535b7ccc07
7
- data.tar.gz: f8ae819ac4a3205c105e66b2195867a45e600ac7001f878f3730662c15536080fe52ba2affe3d06340b5352f31780efcd9d969ee73148f4aceefa297eb00a0dd
6
+ metadata.gz: e38f14601aeb0fe29fd426d7bc39c7225576cd965d9e12c3223fdfcfa390983e5f424b481c05a54c53d5abd69ea0afb768ad227911200ba3d6a611ffb8af4f83
7
+ data.tar.gz: 79ac35dda4056de19937e014f057940d6d24f735830a32e8a7715dc1aa6db6f3917bbd98e15a3078fa68c5c27fb6d4453ee8d2ce961ee1cd764017c9e91da9ed
data/CHANGELOG.md CHANGED
@@ -1,6 +1,16 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.12.0 (2024-06-20)
5
+ ------------------
6
+
7
+ * Feature - This release adds document support to Converse and ConverseStream APIs
8
+
9
+ 1.11.0 (2024-06-18)
10
+ ------------------
11
+
12
+ * Feature - This release adds support for using Guardrails with the Converse and ConverseStream APIs.
13
+
4
14
  1.10.0 (2024-06-05)
5
15
  ------------------
6
16
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.10.0
1
+ 1.12.0
@@ -428,15 +428,19 @@ module Aws::BedrockRuntime
428
428
  # provides a consistent interface that works with all models that
429
429
  # support messages. This allows you to write code once and use it with
430
430
  # 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.
433
- #
434
- # This operation requires permission for the `bedrock:InvokeModel`
435
- # action.
431
+ # can also pass those unique parameters to the model.
436
432
  #
433
+ # For information about the Converse API, see *Use the Converse API* in
434
+ # the *Amazon Bedrock User Guide*. To use a guardrail, see *Use a
435
+ # guardrail with the Converse API* in the *Amazon Bedrock User Guide*.
436
+ # To use a tool with a model, see *Tool use (Function calling)* in the
437
+ # *Amazon Bedrock User Guide*
437
438
  #
439
+ # For example code, see *Converse API examples* in the *Amazon Bedrock
440
+ # User Guide*.
438
441
  #
439
- # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/api-methods-run.html
442
+ # This operation requires permission for the `bedrock:InvokeModel`
443
+ # action.
440
444
  #
441
445
  # @option params [required, String] :model_id
442
446
  # The identifier for the model that you want to call.
@@ -483,6 +487,10 @@ module Aws::BedrockRuntime
483
487
  #
484
488
  # </note>
485
489
  #
490
+ # @option params [Types::GuardrailConfiguration] :guardrail_config
491
+ # Configuration information for a guardrail that you want to use in the
492
+ # request.
493
+ #
486
494
  # @option params [Hash,Array,String,Numeric,Boolean] :additional_model_request_fields
487
495
  # Additional inference parameters that the model supports, beyond the
488
496
  # base set of inference parameters that `Converse` supports in the
@@ -501,8 +509,8 @@ module Aws::BedrockRuntime
501
509
  # @option params [Array<String>] :additional_model_response_field_paths
502
510
  # Additional model parameters field paths to return in the response.
503
511
  # `Converse` returns the requested fields as a JSON Pointer object in
504
- # the `additionalModelResultFields` field. The following is example JSON
505
- # for `additionalModelResponseFieldPaths`.
512
+ # the `additionalModelResponseFields` field. The following is example
513
+ # JSON for `additionalModelResponseFieldPaths`.
506
514
  #
507
515
  # `[ "/stop_sequence" ]`
508
516
  #
@@ -525,6 +533,7 @@ module Aws::BedrockRuntime
525
533
  # * {Types::ConverseResponse#usage #usage} => Types::TokenUsage
526
534
  # * {Types::ConverseResponse#metrics #metrics} => Types::ConverseMetrics
527
535
  # * {Types::ConverseResponse#additional_model_response_fields #additional_model_response_fields} => Hash,Array,String,Numeric,Boolean
536
+ # * {Types::ConverseResponse#trace #trace} => Types::ConverseTrace
528
537
  #
529
538
  # @example Request syntax with placeholder values
530
539
  #
@@ -542,6 +551,13 @@ module Aws::BedrockRuntime
542
551
  # bytes: "data",
543
552
  # },
544
553
  # },
554
+ # document: {
555
+ # format: "pdf", # required, accepts pdf, csv, doc, docx, xls, xlsx, html, txt, md
556
+ # name: "DocumentBlockNameString", # required
557
+ # source: { # required
558
+ # bytes: "data",
559
+ # },
560
+ # },
545
561
  # tool_use: {
546
562
  # tool_use_id: "ToolUseId", # required
547
563
  # name: "ToolName", # required
@@ -561,10 +577,22 @@ module Aws::BedrockRuntime
561
577
  # bytes: "data",
562
578
  # },
563
579
  # },
580
+ # document: {
581
+ # format: "pdf", # required, accepts pdf, csv, doc, docx, xls, xlsx, html, txt, md
582
+ # name: "DocumentBlockNameString", # required
583
+ # source: { # required
584
+ # bytes: "data",
585
+ # },
586
+ # },
564
587
  # },
565
588
  # ],
566
589
  # status: "success", # accepts success, error
567
590
  # },
591
+ # guard_content: {
592
+ # text: {
593
+ # text: "String", # required
594
+ # },
595
+ # },
568
596
  # },
569
597
  # ],
570
598
  # },
@@ -572,6 +600,11 @@ module Aws::BedrockRuntime
572
600
  # system: [
573
601
  # {
574
602
  # text: "NonEmptyString",
603
+ # guard_content: {
604
+ # text: {
605
+ # text: "String", # required
606
+ # },
607
+ # },
575
608
  # },
576
609
  # ],
577
610
  # inference_config: {
@@ -603,6 +636,11 @@ module Aws::BedrockRuntime
603
636
  # },
604
637
  # },
605
638
  # },
639
+ # guardrail_config: {
640
+ # guardrail_identifier: "GuardrailIdentifier", # required
641
+ # guardrail_version: "GuardrailVersion", # required
642
+ # trace: "enabled", # accepts enabled, disabled
643
+ # },
606
644
  # additional_model_request_fields: {
607
645
  # },
608
646
  # additional_model_response_field_paths: ["ConverseRequestAdditionalModelResponseFieldPathsListMemberString"],
@@ -615,6 +653,9 @@ module Aws::BedrockRuntime
615
653
  # resp.output.message.content[0].text #=> String
616
654
  # resp.output.message.content[0].image.format #=> String, one of "png", "jpeg", "gif", "webp"
617
655
  # resp.output.message.content[0].image.source.bytes #=> String
656
+ # resp.output.message.content[0].document.format #=> String, one of "pdf", "csv", "doc", "docx", "xls", "xlsx", "html", "txt", "md"
657
+ # resp.output.message.content[0].document.name #=> String
658
+ # resp.output.message.content[0].document.source.bytes #=> String
618
659
  # resp.output.message.content[0].tool_use.tool_use_id #=> String
619
660
  # resp.output.message.content[0].tool_use.name #=> String
620
661
  # resp.output.message.content[0].tool_result.tool_use_id #=> String
@@ -622,12 +663,69 @@ module Aws::BedrockRuntime
622
663
  # resp.output.message.content[0].tool_result.content[0].text #=> String
623
664
  # resp.output.message.content[0].tool_result.content[0].image.format #=> String, one of "png", "jpeg", "gif", "webp"
624
665
  # resp.output.message.content[0].tool_result.content[0].image.source.bytes #=> String
666
+ # resp.output.message.content[0].tool_result.content[0].document.format #=> String, one of "pdf", "csv", "doc", "docx", "xls", "xlsx", "html", "txt", "md"
667
+ # resp.output.message.content[0].tool_result.content[0].document.name #=> String
668
+ # resp.output.message.content[0].tool_result.content[0].document.source.bytes #=> String
625
669
  # 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"
670
+ # resp.output.message.content[0].guard_content.text.text #=> String
671
+ # resp.stop_reason #=> String, one of "end_turn", "tool_use", "max_tokens", "stop_sequence", "guardrail_intervened", "content_filtered"
627
672
  # resp.usage.input_tokens #=> Integer
628
673
  # resp.usage.output_tokens #=> Integer
629
674
  # resp.usage.total_tokens #=> Integer
630
675
  # resp.metrics.latency_ms #=> Integer
676
+ # resp.trace.guardrail.model_output #=> Array
677
+ # resp.trace.guardrail.model_output[0] #=> String
678
+ # resp.trace.guardrail.input_assessment #=> Hash
679
+ # resp.trace.guardrail.input_assessment["String"].topic_policy.topics #=> Array
680
+ # resp.trace.guardrail.input_assessment["String"].topic_policy.topics[0].name #=> String
681
+ # resp.trace.guardrail.input_assessment["String"].topic_policy.topics[0].type #=> String, one of "DENY"
682
+ # resp.trace.guardrail.input_assessment["String"].topic_policy.topics[0].action #=> String, one of "BLOCKED"
683
+ # resp.trace.guardrail.input_assessment["String"].content_policy.filters #=> Array
684
+ # resp.trace.guardrail.input_assessment["String"].content_policy.filters[0].type #=> String, one of "INSULTS", "HATE", "SEXUAL", "VIOLENCE", "MISCONDUCT", "PROMPT_ATTACK"
685
+ # resp.trace.guardrail.input_assessment["String"].content_policy.filters[0].confidence #=> String, one of "NONE", "LOW", "MEDIUM", "HIGH"
686
+ # resp.trace.guardrail.input_assessment["String"].content_policy.filters[0].action #=> String, one of "BLOCKED"
687
+ # resp.trace.guardrail.input_assessment["String"].word_policy.custom_words #=> Array
688
+ # resp.trace.guardrail.input_assessment["String"].word_policy.custom_words[0].match #=> String
689
+ # resp.trace.guardrail.input_assessment["String"].word_policy.custom_words[0].action #=> String, one of "BLOCKED"
690
+ # resp.trace.guardrail.input_assessment["String"].word_policy.managed_word_lists #=> Array
691
+ # resp.trace.guardrail.input_assessment["String"].word_policy.managed_word_lists[0].match #=> String
692
+ # resp.trace.guardrail.input_assessment["String"].word_policy.managed_word_lists[0].type #=> String, one of "PROFANITY"
693
+ # resp.trace.guardrail.input_assessment["String"].word_policy.managed_word_lists[0].action #=> String, one of "BLOCKED"
694
+ # resp.trace.guardrail.input_assessment["String"].sensitive_information_policy.pii_entities #=> Array
695
+ # resp.trace.guardrail.input_assessment["String"].sensitive_information_policy.pii_entities[0].match #=> String
696
+ # 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"
697
+ # resp.trace.guardrail.input_assessment["String"].sensitive_information_policy.pii_entities[0].action #=> String, one of "ANONYMIZED", "BLOCKED"
698
+ # resp.trace.guardrail.input_assessment["String"].sensitive_information_policy.regexes #=> Array
699
+ # resp.trace.guardrail.input_assessment["String"].sensitive_information_policy.regexes[0].name #=> String
700
+ # resp.trace.guardrail.input_assessment["String"].sensitive_information_policy.regexes[0].match #=> String
701
+ # resp.trace.guardrail.input_assessment["String"].sensitive_information_policy.regexes[0].regex #=> String
702
+ # resp.trace.guardrail.input_assessment["String"].sensitive_information_policy.regexes[0].action #=> String, one of "ANONYMIZED", "BLOCKED"
703
+ # resp.trace.guardrail.output_assessments #=> Hash
704
+ # resp.trace.guardrail.output_assessments["String"] #=> Array
705
+ # resp.trace.guardrail.output_assessments["String"][0].topic_policy.topics #=> Array
706
+ # resp.trace.guardrail.output_assessments["String"][0].topic_policy.topics[0].name #=> String
707
+ # resp.trace.guardrail.output_assessments["String"][0].topic_policy.topics[0].type #=> String, one of "DENY"
708
+ # resp.trace.guardrail.output_assessments["String"][0].topic_policy.topics[0].action #=> String, one of "BLOCKED"
709
+ # resp.trace.guardrail.output_assessments["String"][0].content_policy.filters #=> Array
710
+ # resp.trace.guardrail.output_assessments["String"][0].content_policy.filters[0].type #=> String, one of "INSULTS", "HATE", "SEXUAL", "VIOLENCE", "MISCONDUCT", "PROMPT_ATTACK"
711
+ # resp.trace.guardrail.output_assessments["String"][0].content_policy.filters[0].confidence #=> String, one of "NONE", "LOW", "MEDIUM", "HIGH"
712
+ # resp.trace.guardrail.output_assessments["String"][0].content_policy.filters[0].action #=> String, one of "BLOCKED"
713
+ # resp.trace.guardrail.output_assessments["String"][0].word_policy.custom_words #=> Array
714
+ # resp.trace.guardrail.output_assessments["String"][0].word_policy.custom_words[0].match #=> String
715
+ # resp.trace.guardrail.output_assessments["String"][0].word_policy.custom_words[0].action #=> String, one of "BLOCKED"
716
+ # resp.trace.guardrail.output_assessments["String"][0].word_policy.managed_word_lists #=> Array
717
+ # resp.trace.guardrail.output_assessments["String"][0].word_policy.managed_word_lists[0].match #=> String
718
+ # resp.trace.guardrail.output_assessments["String"][0].word_policy.managed_word_lists[0].type #=> String, one of "PROFANITY"
719
+ # resp.trace.guardrail.output_assessments["String"][0].word_policy.managed_word_lists[0].action #=> String, one of "BLOCKED"
720
+ # resp.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.pii_entities #=> Array
721
+ # resp.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.pii_entities[0].match #=> String
722
+ # 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"
723
+ # resp.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.pii_entities[0].action #=> String, one of "ANONYMIZED", "BLOCKED"
724
+ # resp.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.regexes #=> Array
725
+ # resp.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.regexes[0].name #=> String
726
+ # resp.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.regexes[0].match #=> String
727
+ # resp.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.regexes[0].regex #=> String
728
+ # resp.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.regexes[0].action #=> String, one of "ANONYMIZED", "BLOCKED"
631
729
  #
632
730
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/Converse AWS API Documentation
633
731
  #
@@ -643,23 +741,27 @@ module Aws::BedrockRuntime
643
741
  # works with all Amazon Bedrock models that support messages. This
644
742
  # allows you to write code once and use it with different models. Should
645
743
  # 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.
744
+ # unique parameters to the model.
648
745
  #
649
746
  # To find out if a model supports streaming, call
650
- # [GetFoundationModel][2] and check the `responseStreamingSupported`
747
+ # [GetFoundationModel][1] and check the `responseStreamingSupported`
651
748
  # field in the response.
652
749
  #
653
- # For example code, see *Invoke model with streaming code example* in
654
- # the *Amazon Bedrock User Guide*.
750
+ # For information about the Converse API, see *Use the Converse API* in
751
+ # the *Amazon Bedrock User Guide*. To use a guardrail, see *Use a
752
+ # guardrail with the Converse API* in the *Amazon Bedrock User Guide*.
753
+ # To use a tool with a model, see *Tool use (Function calling)* in the
754
+ # *Amazon Bedrock User Guide*
755
+ #
756
+ # For example code, see *Conversation streaming example* in the *Amazon
757
+ # Bedrock User Guide*.
655
758
  #
656
759
  # This operation requires permission for the
657
760
  # `bedrock:InvokeModelWithResponseStream` action.
658
761
  #
659
762
  #
660
763
  #
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
764
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_GetFoundationModel.html
663
765
  #
664
766
  # @option params [required, String] :model_id
665
767
  # The ID for the model.
@@ -705,6 +807,10 @@ module Aws::BedrockRuntime
705
807
  #
706
808
  # </note>
707
809
  #
810
+ # @option params [Types::GuardrailStreamConfiguration] :guardrail_config
811
+ # Configuration information for a guardrail that you want to use in the
812
+ # request.
813
+ #
708
814
  # @option params [Hash,Array,String,Numeric,Boolean] :additional_model_request_fields
709
815
  # Additional inference parameters that the model supports, beyond the
710
816
  # base set of inference parameters that `ConverseStream` supports in the
@@ -718,7 +824,7 @@ module Aws::BedrockRuntime
718
824
  # @option params [Array<String>] :additional_model_response_field_paths
719
825
  # Additional model parameters field paths to return in the response.
720
826
  # `ConverseStream` returns the requested fields as a JSON Pointer object
721
- # in the `additionalModelResultFields` field. The following is example
827
+ # in the `additionalModelResponseFields` field. The following is example
722
828
  # JSON for `additionalModelResponseFieldPaths`.
723
829
  #
724
830
  # `[ "/stop_sequence" ]`
@@ -919,6 +1025,13 @@ module Aws::BedrockRuntime
919
1025
  # bytes: "data",
920
1026
  # },
921
1027
  # },
1028
+ # document: {
1029
+ # format: "pdf", # required, accepts pdf, csv, doc, docx, xls, xlsx, html, txt, md
1030
+ # name: "DocumentBlockNameString", # required
1031
+ # source: { # required
1032
+ # bytes: "data",
1033
+ # },
1034
+ # },
922
1035
  # tool_use: {
923
1036
  # tool_use_id: "ToolUseId", # required
924
1037
  # name: "ToolName", # required
@@ -938,10 +1051,22 @@ module Aws::BedrockRuntime
938
1051
  # bytes: "data",
939
1052
  # },
940
1053
  # },
1054
+ # document: {
1055
+ # format: "pdf", # required, accepts pdf, csv, doc, docx, xls, xlsx, html, txt, md
1056
+ # name: "DocumentBlockNameString", # required
1057
+ # source: { # required
1058
+ # bytes: "data",
1059
+ # },
1060
+ # },
941
1061
  # },
942
1062
  # ],
943
1063
  # status: "success", # accepts success, error
944
1064
  # },
1065
+ # guard_content: {
1066
+ # text: {
1067
+ # text: "String", # required
1068
+ # },
1069
+ # },
945
1070
  # },
946
1071
  # ],
947
1072
  # },
@@ -949,6 +1074,11 @@ module Aws::BedrockRuntime
949
1074
  # system: [
950
1075
  # {
951
1076
  # text: "NonEmptyString",
1077
+ # guard_content: {
1078
+ # text: {
1079
+ # text: "String", # required
1080
+ # },
1081
+ # },
952
1082
  # },
953
1083
  # ],
954
1084
  # inference_config: {
@@ -980,6 +1110,12 @@ module Aws::BedrockRuntime
980
1110
  # },
981
1111
  # },
982
1112
  # },
1113
+ # guardrail_config: {
1114
+ # guardrail_identifier: "GuardrailIdentifier", # required
1115
+ # guardrail_version: "GuardrailVersion", # required
1116
+ # trace: "enabled", # accepts enabled, disabled
1117
+ # stream_processing_mode: "sync", # accepts sync, async
1118
+ # },
983
1119
  # additional_model_request_fields: {
984
1120
  # },
985
1121
  # additional_model_response_field_paths: ["ConverseStreamRequestAdditionalModelResponseFieldPathsListMemberString"],
@@ -1008,13 +1144,66 @@ module Aws::BedrockRuntime
1008
1144
  # event.content_block_index #=> Integer
1009
1145
  #
1010
1146
  # 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"
1147
+ # event.stop_reason #=> String, one of "end_turn", "tool_use", "max_tokens", "stop_sequence", "guardrail_intervened", "content_filtered"
1012
1148
  #
1013
1149
  # For :metadata event available at #on_metadata_event callback and response eventstream enumerator:
1014
1150
  # event.usage.input_tokens #=> Integer
1015
1151
  # event.usage.output_tokens #=> Integer
1016
1152
  # event.usage.total_tokens #=> Integer
1017
1153
  # event.metrics.latency_ms #=> Integer
1154
+ # event.trace.guardrail.model_output #=> Array
1155
+ # event.trace.guardrail.model_output[0] #=> String
1156
+ # event.trace.guardrail.input_assessment #=> Hash
1157
+ # event.trace.guardrail.input_assessment["String"].topic_policy.topics #=> Array
1158
+ # event.trace.guardrail.input_assessment["String"].topic_policy.topics[0].name #=> String
1159
+ # event.trace.guardrail.input_assessment["String"].topic_policy.topics[0].type #=> String, one of "DENY"
1160
+ # event.trace.guardrail.input_assessment["String"].topic_policy.topics[0].action #=> String, one of "BLOCKED"
1161
+ # event.trace.guardrail.input_assessment["String"].content_policy.filters #=> Array
1162
+ # event.trace.guardrail.input_assessment["String"].content_policy.filters[0].type #=> String, one of "INSULTS", "HATE", "SEXUAL", "VIOLENCE", "MISCONDUCT", "PROMPT_ATTACK"
1163
+ # event.trace.guardrail.input_assessment["String"].content_policy.filters[0].confidence #=> String, one of "NONE", "LOW", "MEDIUM", "HIGH"
1164
+ # event.trace.guardrail.input_assessment["String"].content_policy.filters[0].action #=> String, one of "BLOCKED"
1165
+ # event.trace.guardrail.input_assessment["String"].word_policy.custom_words #=> Array
1166
+ # event.trace.guardrail.input_assessment["String"].word_policy.custom_words[0].match #=> String
1167
+ # event.trace.guardrail.input_assessment["String"].word_policy.custom_words[0].action #=> String, one of "BLOCKED"
1168
+ # event.trace.guardrail.input_assessment["String"].word_policy.managed_word_lists #=> Array
1169
+ # event.trace.guardrail.input_assessment["String"].word_policy.managed_word_lists[0].match #=> String
1170
+ # event.trace.guardrail.input_assessment["String"].word_policy.managed_word_lists[0].type #=> String, one of "PROFANITY"
1171
+ # event.trace.guardrail.input_assessment["String"].word_policy.managed_word_lists[0].action #=> String, one of "BLOCKED"
1172
+ # event.trace.guardrail.input_assessment["String"].sensitive_information_policy.pii_entities #=> Array
1173
+ # event.trace.guardrail.input_assessment["String"].sensitive_information_policy.pii_entities[0].match #=> String
1174
+ # 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"
1175
+ # event.trace.guardrail.input_assessment["String"].sensitive_information_policy.pii_entities[0].action #=> String, one of "ANONYMIZED", "BLOCKED"
1176
+ # event.trace.guardrail.input_assessment["String"].sensitive_information_policy.regexes #=> Array
1177
+ # event.trace.guardrail.input_assessment["String"].sensitive_information_policy.regexes[0].name #=> String
1178
+ # event.trace.guardrail.input_assessment["String"].sensitive_information_policy.regexes[0].match #=> String
1179
+ # event.trace.guardrail.input_assessment["String"].sensitive_information_policy.regexes[0].regex #=> String
1180
+ # event.trace.guardrail.input_assessment["String"].sensitive_information_policy.regexes[0].action #=> String, one of "ANONYMIZED", "BLOCKED"
1181
+ # event.trace.guardrail.output_assessments #=> Hash
1182
+ # event.trace.guardrail.output_assessments["String"] #=> Array
1183
+ # event.trace.guardrail.output_assessments["String"][0].topic_policy.topics #=> Array
1184
+ # event.trace.guardrail.output_assessments["String"][0].topic_policy.topics[0].name #=> String
1185
+ # event.trace.guardrail.output_assessments["String"][0].topic_policy.topics[0].type #=> String, one of "DENY"
1186
+ # event.trace.guardrail.output_assessments["String"][0].topic_policy.topics[0].action #=> String, one of "BLOCKED"
1187
+ # event.trace.guardrail.output_assessments["String"][0].content_policy.filters #=> Array
1188
+ # event.trace.guardrail.output_assessments["String"][0].content_policy.filters[0].type #=> String, one of "INSULTS", "HATE", "SEXUAL", "VIOLENCE", "MISCONDUCT", "PROMPT_ATTACK"
1189
+ # event.trace.guardrail.output_assessments["String"][0].content_policy.filters[0].confidence #=> String, one of "NONE", "LOW", "MEDIUM", "HIGH"
1190
+ # event.trace.guardrail.output_assessments["String"][0].content_policy.filters[0].action #=> String, one of "BLOCKED"
1191
+ # event.trace.guardrail.output_assessments["String"][0].word_policy.custom_words #=> Array
1192
+ # event.trace.guardrail.output_assessments["String"][0].word_policy.custom_words[0].match #=> String
1193
+ # event.trace.guardrail.output_assessments["String"][0].word_policy.custom_words[0].action #=> String, one of "BLOCKED"
1194
+ # event.trace.guardrail.output_assessments["String"][0].word_policy.managed_word_lists #=> Array
1195
+ # event.trace.guardrail.output_assessments["String"][0].word_policy.managed_word_lists[0].match #=> String
1196
+ # event.trace.guardrail.output_assessments["String"][0].word_policy.managed_word_lists[0].type #=> String, one of "PROFANITY"
1197
+ # event.trace.guardrail.output_assessments["String"][0].word_policy.managed_word_lists[0].action #=> String, one of "BLOCKED"
1198
+ # event.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.pii_entities #=> Array
1199
+ # event.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.pii_entities[0].match #=> String
1200
+ # 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"
1201
+ # event.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.pii_entities[0].action #=> String, one of "ANONYMIZED", "BLOCKED"
1202
+ # event.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.regexes #=> Array
1203
+ # event.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.regexes[0].name #=> String
1204
+ # event.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.regexes[0].match #=> String
1205
+ # event.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.regexes[0].regex #=> String
1206
+ # event.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.regexes[0].action #=> String, one of "ANONYMIZED", "BLOCKED"
1018
1207
  #
1019
1208
  # For :internal_server_exception event available at #on_internal_server_exception_event callback and response eventstream enumerator:
1020
1209
  # event.message #=> String
@@ -1069,10 +1258,10 @@ module Aws::BedrockRuntime
1069
1258
  #
1070
1259
  # @option params [required, String, StringIO, File] :body
1071
1260
  # 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.
1261
+ # `contentType` in the header. You must provide the body in JSON format.
1262
+ # To see the format and content of the request and response bodies for
1263
+ # different models, refer to [Inference parameters][1]. For more
1264
+ # information, see [Run inference][2] in the Bedrock User Guide.
1076
1265
  #
1077
1266
  #
1078
1267
  #
@@ -1080,7 +1269,7 @@ module Aws::BedrockRuntime
1080
1269
  # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/api-methods-run.html
1081
1270
  #
1082
1271
  # @option params [String] :content_type
1083
- # The MIME type of the input data in the request. The default value is
1272
+ # The MIME type of the input data in the request. You must specify
1084
1273
  # `application/json`.
1085
1274
  #
1086
1275
  # @option params [String] :accept
@@ -1187,10 +1376,10 @@ module Aws::BedrockRuntime
1187
1376
  #
1188
1377
  # @option params [required, String, StringIO, File] :body
1189
1378
  # 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.
1379
+ # `contentType` in the header. You must provide the body in JSON format.
1380
+ # To see the format and content of the request and response bodies for
1381
+ # different models, refer to [Inference parameters][1]. For more
1382
+ # information, see [Run inference][2] in the Bedrock User Guide.
1194
1383
  #
1195
1384
  #
1196
1385
  #
@@ -1198,7 +1387,7 @@ module Aws::BedrockRuntime
1198
1387
  # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/api-methods-run.html
1199
1388
  #
1200
1389
  # @option params [String] :content_type
1201
- # The MIME type of the input data in the request. The default value is
1390
+ # The MIME type of the input data in the request. You must specify
1202
1391
  # `application/json`.
1203
1392
  #
1204
1393
  # @option params [String] :accept
@@ -1464,7 +1653,7 @@ module Aws::BedrockRuntime
1464
1653
  params: params,
1465
1654
  config: config)
1466
1655
  context[:gem_name] = 'aws-sdk-bedrockruntime'
1467
- context[:gem_version] = '1.10.0'
1656
+ context[:gem_version] = '1.12.0'
1468
1657
  Seahorse::Client::Request.new(handlers, context)
1469
1658
  end
1470
1659