aws-sdk-bedrockruntime 1.10.0 → 1.11.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -23,7 +23,8 @@ module Aws::BedrockRuntime
23
23
  include Aws::Structure
24
24
  end
25
25
 
26
- # The model must request at least one tool (no text is generated).
26
+ # The model must request at least one tool (no text is generated). For
27
+ # example, `\{"any" : \{\}\}`.
27
28
  #
28
29
  # @api private
29
30
  #
@@ -31,8 +32,8 @@ module Aws::BedrockRuntime
31
32
  #
32
33
  class AnyToolChoice < Aws::EmptyStructure; end
33
34
 
34
- # The Model automatically decides if a tool should be called or to
35
- # whether to generate text instead.
35
+ # The Model automatically decides if a tool should be called or whether
36
+ # to generate text instead. For example, `\{"auto" : \{\}\}`.
36
37
  #
37
38
  # @api private
38
39
  #
@@ -40,7 +41,8 @@ module Aws::BedrockRuntime
40
41
  #
41
42
  class AutoToolChoice < Aws::EmptyStructure; end
42
43
 
43
- # A block of content for a message.
44
+ # A block of content for a message that you pass to, or receive from, a
45
+ # model with the Converse API (Converse and ConverseStream).
44
46
  #
45
47
  # @note ContentBlock is a union - when making an API calls you must set exactly one of the members.
46
48
  #
@@ -66,6 +68,15 @@ module Aws::BedrockRuntime
66
68
  # The result for a tool request that a model makes.
67
69
  # @return [Types::ToolResultBlock]
68
70
  #
71
+ # @!attribute [rw] guard_content
72
+ # Contains the content to assess with the guardrail. If you don't
73
+ # specify `guardContent` in a call to the Converse API, the guardrail
74
+ # (if passed in the Converse API) assesses the entire message.
75
+ #
76
+ # For more information, see *Use a guardrail with the Converse API* in
77
+ # the *Amazon Bedrock User Guide*. </p>
78
+ # @return [Types::GuardrailConverseContentBlock]
79
+ #
69
80
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ContentBlock AWS API Documentation
70
81
  #
71
82
  class ContentBlock < Struct.new(
@@ -73,6 +84,7 @@ module Aws::BedrockRuntime
73
84
  :image,
74
85
  :tool_use,
75
86
  :tool_result,
87
+ :guard_content,
76
88
  :unknown)
77
89
  SENSITIVE = []
78
90
  include Aws::Structure
@@ -82,6 +94,7 @@ module Aws::BedrockRuntime
82
94
  class Image < ContentBlock; end
83
95
  class ToolUse < ContentBlock; end
84
96
  class ToolResult < ContentBlock; end
97
+ class GuardContent < ContentBlock; end
85
98
  class Unknown < ContentBlock; end
86
99
  end
87
100
 
@@ -281,6 +294,11 @@ module Aws::BedrockRuntime
281
294
  # </note>
282
295
  # @return [Types::ToolConfiguration]
283
296
  #
297
+ # @!attribute [rw] guardrail_config
298
+ # Configuration information for a guardrail that you want to use in
299
+ # the request.
300
+ # @return [Types::GuardrailConfiguration]
301
+ #
284
302
  # @!attribute [rw] additional_model_request_fields
285
303
  # Additional inference parameters that the model supports, beyond the
286
304
  # base set of inference parameters that `Converse` supports in the
@@ -295,7 +313,7 @@ module Aws::BedrockRuntime
295
313
  # @!attribute [rw] additional_model_response_field_paths
296
314
  # Additional model parameters field paths to return in the response.
297
315
  # `Converse` returns the requested fields as a JSON Pointer object in
298
- # the `additionalModelResultFields` field. The following is example
316
+ # the `additionalModelResponseFields` field. The following is example
299
317
  # JSON for `additionalModelResponseFieldPaths`.
300
318
  #
301
319
  # `[ "/stop_sequence" ]`
@@ -321,6 +339,7 @@ module Aws::BedrockRuntime
321
339
  :system,
322
340
  :inference_config,
323
341
  :tool_config,
342
+ :guardrail_config,
324
343
  :additional_model_request_fields,
325
344
  :additional_model_response_field_paths)
326
345
  SENSITIVE = []
@@ -349,6 +368,11 @@ module Aws::BedrockRuntime
349
368
  # Additional fields in the response that are unique to the model.
350
369
  # @return [Hash,Array,String,Numeric,Boolean]
351
370
  #
371
+ # @!attribute [rw] trace
372
+ # A trace object that contains information about the Guardrail
373
+ # behavior.
374
+ # @return [Types::ConverseTrace]
375
+ #
352
376
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ConverseResponse AWS API Documentation
353
377
  #
354
378
  class ConverseResponse < Struct.new(
@@ -356,7 +380,8 @@ module Aws::BedrockRuntime
356
380
  :stop_reason,
357
381
  :usage,
358
382
  :metrics,
359
- :additional_model_response_fields)
383
+ :additional_model_response_fields,
384
+ :trace)
360
385
  SENSITIVE = []
361
386
  include Aws::Structure
362
387
  end
@@ -371,11 +396,17 @@ module Aws::BedrockRuntime
371
396
  # The metrics for the conversation stream metadata event.
372
397
  # @return [Types::ConverseStreamMetrics]
373
398
  #
399
+ # @!attribute [rw] trace
400
+ # The trace object in the response from ConverseStream that contains
401
+ # information about the guardrail behavior.
402
+ # @return [Types::ConverseStreamTrace]
403
+ #
374
404
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ConverseStreamMetadataEvent AWS API Documentation
375
405
  #
376
406
  class ConverseStreamMetadataEvent < Struct.new(
377
407
  :usage,
378
408
  :metrics,
409
+ :trace,
379
410
  :event_type)
380
411
  SENSITIVE = []
381
412
  include Aws::Structure
@@ -444,6 +475,11 @@ module Aws::BedrockRuntime
444
475
  # </note>
445
476
  # @return [Types::ToolConfiguration]
446
477
  #
478
+ # @!attribute [rw] guardrail_config
479
+ # Configuration information for a guardrail that you want to use in
480
+ # the request.
481
+ # @return [Types::GuardrailStreamConfiguration]
482
+ #
447
483
  # @!attribute [rw] additional_model_request_fields
448
484
  # Additional inference parameters that the model supports, beyond the
449
485
  # base set of inference parameters that `ConverseStream` supports in
@@ -453,8 +489,8 @@ module Aws::BedrockRuntime
453
489
  # @!attribute [rw] additional_model_response_field_paths
454
490
  # Additional model parameters field paths to return in the response.
455
491
  # `ConverseStream` returns the requested fields as a JSON Pointer
456
- # object in the `additionalModelResultFields` field. The following is
457
- # example JSON for `additionalModelResponseFieldPaths`.
492
+ # object in the `additionalModelResponseFields` field. The following
493
+ # is example JSON for `additionalModelResponseFieldPaths`.
458
494
  #
459
495
  # `[ "/stop_sequence" ]`
460
496
  #
@@ -479,6 +515,7 @@ module Aws::BedrockRuntime
479
515
  :system,
480
516
  :inference_config,
481
517
  :tool_config,
518
+ :guardrail_config,
482
519
  :additional_model_request_fields,
483
520
  :additional_model_response_field_paths)
484
521
  SENSITIVE = []
@@ -497,6 +534,400 @@ module Aws::BedrockRuntime
497
534
  include Aws::Structure
498
535
  end
499
536
 
537
+ # The trace object in a response from ConverseStream. Currently, you can
538
+ # only trace guardrails.
539
+ #
540
+ # @!attribute [rw] guardrail
541
+ # The guardrail trace object.
542
+ # @return [Types::GuardrailTraceAssessment]
543
+ #
544
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ConverseStreamTrace AWS API Documentation
545
+ #
546
+ class ConverseStreamTrace < Struct.new(
547
+ :guardrail)
548
+ SENSITIVE = []
549
+ include Aws::Structure
550
+ end
551
+
552
+ # The trace object in a response from Converse. Currently, you can only
553
+ # trace guardrails.
554
+ #
555
+ # @!attribute [rw] guardrail
556
+ # The guardrail trace object.
557
+ # @return [Types::GuardrailTraceAssessment]
558
+ #
559
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ConverseTrace AWS API Documentation
560
+ #
561
+ class ConverseTrace < Struct.new(
562
+ :guardrail)
563
+ SENSITIVE = []
564
+ include Aws::Structure
565
+ end
566
+
567
+ # A behavior assessment of the guardrail policies used in a call to the
568
+ # Converse API.
569
+ #
570
+ # @!attribute [rw] topic_policy
571
+ # The topic policy.
572
+ # @return [Types::GuardrailTopicPolicyAssessment]
573
+ #
574
+ # @!attribute [rw] content_policy
575
+ # The content policy.
576
+ # @return [Types::GuardrailContentPolicyAssessment]
577
+ #
578
+ # @!attribute [rw] word_policy
579
+ # The word policy.
580
+ # @return [Types::GuardrailWordPolicyAssessment]
581
+ #
582
+ # @!attribute [rw] sensitive_information_policy
583
+ # The sensitive information policy.
584
+ # @return [Types::GuardrailSensitiveInformationPolicyAssessment]
585
+ #
586
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailAssessment AWS API Documentation
587
+ #
588
+ class GuardrailAssessment < Struct.new(
589
+ :topic_policy,
590
+ :content_policy,
591
+ :word_policy,
592
+ :sensitive_information_policy)
593
+ SENSITIVE = []
594
+ include Aws::Structure
595
+ end
596
+
597
+ # Configuration information for a guardrail that you use with the
598
+ # Converse action.
599
+ #
600
+ # @!attribute [rw] guardrail_identifier
601
+ # The identifier for the guardrail.
602
+ # @return [String]
603
+ #
604
+ # @!attribute [rw] guardrail_version
605
+ # The version of the guardrail.
606
+ # @return [String]
607
+ #
608
+ # @!attribute [rw] trace
609
+ # The trace behavior for the guardrail.
610
+ # @return [String]
611
+ #
612
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailConfiguration AWS API Documentation
613
+ #
614
+ class GuardrailConfiguration < Struct.new(
615
+ :guardrail_identifier,
616
+ :guardrail_version,
617
+ :trace)
618
+ SENSITIVE = []
619
+ include Aws::Structure
620
+ end
621
+
622
+ # The content filter for a guardrail.
623
+ #
624
+ # @!attribute [rw] type
625
+ # The guardrail type.
626
+ # @return [String]
627
+ #
628
+ # @!attribute [rw] confidence
629
+ # The guardrail confidence.
630
+ # @return [String]
631
+ #
632
+ # @!attribute [rw] action
633
+ # The guardrail action.
634
+ # @return [String]
635
+ #
636
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailContentFilter AWS API Documentation
637
+ #
638
+ class GuardrailContentFilter < Struct.new(
639
+ :type,
640
+ :confidence,
641
+ :action)
642
+ SENSITIVE = []
643
+ include Aws::Structure
644
+ end
645
+
646
+ # An assessment of a content policy for a guardrail.
647
+ #
648
+ # @!attribute [rw] filters
649
+ # The content policy filters.
650
+ # @return [Array<Types::GuardrailContentFilter>]
651
+ #
652
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailContentPolicyAssessment AWS API Documentation
653
+ #
654
+ class GuardrailContentPolicyAssessment < Struct.new(
655
+ :filters)
656
+ SENSITIVE = []
657
+ include Aws::Structure
658
+ end
659
+
660
+ # A content block for selective guarding with the Converse API (Converse
661
+ # and ConverseStream).
662
+ #
663
+ # @note GuardrailConverseContentBlock is a union - when making an API calls you must set exactly one of the members.
664
+ #
665
+ # @note GuardrailConverseContentBlock is a union - when returned from an API call exactly one value will be set and the returned type will be a subclass of GuardrailConverseContentBlock corresponding to the set member.
666
+ #
667
+ # @!attribute [rw] text
668
+ # The text to guard.
669
+ # @return [Types::GuardrailConverseTextBlock]
670
+ #
671
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailConverseContentBlock AWS API Documentation
672
+ #
673
+ class GuardrailConverseContentBlock < Struct.new(
674
+ :text,
675
+ :unknown)
676
+ SENSITIVE = []
677
+ include Aws::Structure
678
+ include Aws::Structure::Union
679
+
680
+ class Text < GuardrailConverseContentBlock; end
681
+ class Unknown < GuardrailConverseContentBlock; end
682
+ end
683
+
684
+ # A text block that contains text that you want to assess with a
685
+ # guardrail. For more information, see GuardrailConverseContentBlock.
686
+ #
687
+ # @!attribute [rw] text
688
+ # The text that you want to guard.
689
+ # @return [String]
690
+ #
691
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailConverseTextBlock AWS API Documentation
692
+ #
693
+ class GuardrailConverseTextBlock < Struct.new(
694
+ :text)
695
+ SENSITIVE = []
696
+ include Aws::Structure
697
+ end
698
+
699
+ # A custom word configured in a guardrail.
700
+ #
701
+ # @!attribute [rw] match
702
+ # The match for the custom word.
703
+ # @return [String]
704
+ #
705
+ # @!attribute [rw] action
706
+ # The action for the custom word.
707
+ # @return [String]
708
+ #
709
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailCustomWord AWS API Documentation
710
+ #
711
+ class GuardrailCustomWord < Struct.new(
712
+ :match,
713
+ :action)
714
+ SENSITIVE = []
715
+ include Aws::Structure
716
+ end
717
+
718
+ # A managed word configured in a guardrail.
719
+ #
720
+ # @!attribute [rw] match
721
+ # The match for the managed word.
722
+ # @return [String]
723
+ #
724
+ # @!attribute [rw] type
725
+ # The type for the managed word.
726
+ # @return [String]
727
+ #
728
+ # @!attribute [rw] action
729
+ # The action for the managed word.
730
+ # @return [String]
731
+ #
732
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailManagedWord AWS API Documentation
733
+ #
734
+ class GuardrailManagedWord < Struct.new(
735
+ :match,
736
+ :type,
737
+ :action)
738
+ SENSITIVE = []
739
+ include Aws::Structure
740
+ end
741
+
742
+ # A Personally Identifiable Information (PII) entity configured in a
743
+ # guardrail.
744
+ #
745
+ # @!attribute [rw] match
746
+ # The PII entity filter match.
747
+ # @return [String]
748
+ #
749
+ # @!attribute [rw] type
750
+ # The PII entity filter type.
751
+ # @return [String]
752
+ #
753
+ # @!attribute [rw] action
754
+ # The PII entity filter action.
755
+ # @return [String]
756
+ #
757
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailPiiEntityFilter AWS API Documentation
758
+ #
759
+ class GuardrailPiiEntityFilter < Struct.new(
760
+ :match,
761
+ :type,
762
+ :action)
763
+ SENSITIVE = []
764
+ include Aws::Structure
765
+ end
766
+
767
+ # A Regex filter configured in a guardrail.
768
+ #
769
+ # @!attribute [rw] name
770
+ # The regex filter name.
771
+ # @return [String]
772
+ #
773
+ # @!attribute [rw] match
774
+ # The regesx filter match.
775
+ # @return [String]
776
+ #
777
+ # @!attribute [rw] regex
778
+ # The regex query.
779
+ # @return [String]
780
+ #
781
+ # @!attribute [rw] action
782
+ # The region filter action.
783
+ # @return [String]
784
+ #
785
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailRegexFilter AWS API Documentation
786
+ #
787
+ class GuardrailRegexFilter < Struct.new(
788
+ :name,
789
+ :match,
790
+ :regex,
791
+ :action)
792
+ SENSITIVE = []
793
+ include Aws::Structure
794
+ end
795
+
796
+ # The assessment for aPersonally Identifiable Information (PII) policy.
797
+ #
798
+ # @!attribute [rw] pii_entities
799
+ # The PII entities in the assessment.
800
+ # @return [Array<Types::GuardrailPiiEntityFilter>]
801
+ #
802
+ # @!attribute [rw] regexes
803
+ # The regex queries in the assessment.
804
+ # @return [Array<Types::GuardrailRegexFilter>]
805
+ #
806
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailSensitiveInformationPolicyAssessment AWS API Documentation
807
+ #
808
+ class GuardrailSensitiveInformationPolicyAssessment < Struct.new(
809
+ :pii_entities,
810
+ :regexes)
811
+ SENSITIVE = []
812
+ include Aws::Structure
813
+ end
814
+
815
+ # Configuration information for a guardrail that you use with the
816
+ # ConverseStream action.
817
+ #
818
+ # @!attribute [rw] guardrail_identifier
819
+ # The identifier for the guardrail.
820
+ # @return [String]
821
+ #
822
+ # @!attribute [rw] guardrail_version
823
+ # The version of the guardrail.
824
+ # @return [String]
825
+ #
826
+ # @!attribute [rw] trace
827
+ # The trace behavior for the guardrail.
828
+ # @return [String]
829
+ #
830
+ # @!attribute [rw] stream_processing_mode
831
+ # The processing mode.
832
+ #
833
+ # The processing mode. For more information, see *Configure streaming
834
+ # response behavior* in the *Amazon Bedrock User Guide*.
835
+ # @return [String]
836
+ #
837
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailStreamConfiguration AWS API Documentation
838
+ #
839
+ class GuardrailStreamConfiguration < Struct.new(
840
+ :guardrail_identifier,
841
+ :guardrail_version,
842
+ :trace,
843
+ :stream_processing_mode)
844
+ SENSITIVE = []
845
+ include Aws::Structure
846
+ end
847
+
848
+ # Information about a topic guardrail.
849
+ #
850
+ # @!attribute [rw] name
851
+ # The name for the guardrail.
852
+ # @return [String]
853
+ #
854
+ # @!attribute [rw] type
855
+ # The type behavior that the guardrail should perform when the model
856
+ # detects the topic.
857
+ # @return [String]
858
+ #
859
+ # @!attribute [rw] action
860
+ # The action the guardrail should take when it intervenes on a topic.
861
+ # @return [String]
862
+ #
863
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailTopic AWS API Documentation
864
+ #
865
+ class GuardrailTopic < Struct.new(
866
+ :name,
867
+ :type,
868
+ :action)
869
+ SENSITIVE = []
870
+ include Aws::Structure
871
+ end
872
+
873
+ # A behavior assessment of a topic policy.
874
+ #
875
+ # @!attribute [rw] topics
876
+ # The topics in the assessment.
877
+ # @return [Array<Types::GuardrailTopic>]
878
+ #
879
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailTopicPolicyAssessment AWS API Documentation
880
+ #
881
+ class GuardrailTopicPolicyAssessment < Struct.new(
882
+ :topics)
883
+ SENSITIVE = []
884
+ include Aws::Structure
885
+ end
886
+
887
+ # A Top level guardrail trace object. For more information, see
888
+ # ConverseTrace.
889
+ #
890
+ # @!attribute [rw] model_output
891
+ # The output from the model.
892
+ # @return [Array<String>]
893
+ #
894
+ # @!attribute [rw] input_assessment
895
+ # The input assessment.
896
+ # @return [Hash<String,Types::GuardrailAssessment>]
897
+ #
898
+ # @!attribute [rw] output_assessments
899
+ # the output assessments.
900
+ # @return [Hash<String,Array<Types::GuardrailAssessment>>]
901
+ #
902
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailTraceAssessment AWS API Documentation
903
+ #
904
+ class GuardrailTraceAssessment < Struct.new(
905
+ :model_output,
906
+ :input_assessment,
907
+ :output_assessments)
908
+ SENSITIVE = []
909
+ include Aws::Structure
910
+ end
911
+
912
+ # The word policy assessment.
913
+ #
914
+ # @!attribute [rw] custom_words
915
+ # Custom words in the assessment.
916
+ # @return [Array<Types::GuardrailCustomWord>]
917
+ #
918
+ # @!attribute [rw] managed_word_lists
919
+ # Managed word lists in the assessment.
920
+ # @return [Array<Types::GuardrailManagedWord>]
921
+ #
922
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailWordPolicyAssessment AWS API Documentation
923
+ #
924
+ class GuardrailWordPolicyAssessment < Struct.new(
925
+ :custom_words,
926
+ :managed_word_lists)
927
+ SENSITIVE = []
928
+ include Aws::Structure
929
+ end
930
+
500
931
  # Image content for a message.
501
932
  #
502
933
  # @!attribute [rw] format
@@ -559,25 +990,7 @@ module Aws::BedrockRuntime
559
990
  # The maximum number of tokens to allow in the generated response. The
560
991
  # default value is the maximum allowed value for the model that you
561
992
  # are using. For more information, see [Inference parameters for
562
- # foundatio\\\{ "messages": \[ \\\{ "role": "user", "content":
563
- # \[ \\\{ "text": "what's the weather in Queens, NY and Austin,
564
- # TX?" \\} \] \\}, \\\{ "role": "assistant", "content": \[ \\\{
565
- # "toolUse": \\\{ "toolUseId": "1", "name": "get\_weather",
566
- # "input": \\\{ "city": "Queens", "state": "NY" \\} \\} \\},
567
- # \\\{ "toolUse": \\\{ "toolUseId": "2", "name":
568
- # "get\_weather", "input": \\\{ "city": "Austin", "state":
569
- # "TX" \\} \\} \\} \] \\}, \\\{ "role": "user", "content": \[
570
- # \\\{ "toolResult": \\\{ "toolUseId": "2", "content": \[ \\\{
571
- # "json": \\\{ "weather": "40" \\} \\} \] \\} \\}, \\\{
572
- # "text": "..." \\}, \\\{ "toolResult": \\\{ "toolUseId":
573
- # "1", "content": \[ \\\{ "text": "result text" \\} \] \\} \\}
574
- # \] \\} \], "toolConfig": \\\{ "tools": \[ \\\{ "name":
575
- # "get\_weather", "description": "Get weather", "inputSchema":
576
- # \\\{ "type": "object", "properties": \\\{ "city": \\\{
577
- # "type": "string", "description": "City of location" \\},
578
- # "state": \\\{ "type": "string", "description": "State of
579
- # location" \\} \\}, "required": \["city", "state"\] \\} \\} \]
580
- # \\} \\} n models][1].
993
+ # foundation models][1].
581
994
  #
582
995
  #
583
996
  #
@@ -646,10 +1059,10 @@ module Aws::BedrockRuntime
646
1059
 
647
1060
  # @!attribute [rw] body
648
1061
  # The prompt and inference parameters in the format specified in the
649
- # `contentType` in the header. To see the format and content of the
650
- # request and response bodies for different models, refer to
651
- # [Inference parameters][1]. For more information, see [Run
652
- # inference][2] in the Bedrock User Guide.
1062
+ # `contentType` in the header. You must provide the body in JSON
1063
+ # format. To see the format and content of the request and response
1064
+ # bodies for different models, refer to [Inference parameters][1]. For
1065
+ # more information, see [Run inference][2] in the Bedrock User Guide.
653
1066
  #
654
1067
  #
655
1068
  #
@@ -658,7 +1071,7 @@ module Aws::BedrockRuntime
658
1071
  # @return [String]
659
1072
  #
660
1073
  # @!attribute [rw] content_type
661
- # The MIME type of the input data in the request. The default value is
1074
+ # The MIME type of the input data in the request. You must specify
662
1075
  # `application/json`.
663
1076
  # @return [String]
664
1077
  #
@@ -757,10 +1170,10 @@ module Aws::BedrockRuntime
757
1170
 
758
1171
  # @!attribute [rw] body
759
1172
  # The prompt and inference parameters in the format specified in the
760
- # `contentType` in the header. To see the format and content of the
761
- # request and response bodies for different models, refer to
762
- # [Inference parameters][1]. For more information, see [Run
763
- # inference][2] in the Bedrock User Guide.
1173
+ # `contentType` in the header. You must provide the body in JSON
1174
+ # format. To see the format and content of the request and response
1175
+ # bodies for different models, refer to [Inference parameters][1]. For
1176
+ # more information, see [Run inference][2] in the Bedrock User Guide.
764
1177
  #
765
1178
  #
766
1179
  #
@@ -769,7 +1182,7 @@ module Aws::BedrockRuntime
769
1182
  # @return [String]
770
1183
  #
771
1184
  # @!attribute [rw] content_type
772
- # The MIME type of the input data in the request. The default value is
1185
+ # The MIME type of the input data in the request. You must specify
773
1186
  # `application/json`.
774
1187
  # @return [String]
775
1188
  #
@@ -865,13 +1278,13 @@ module Aws::BedrockRuntime
865
1278
  include Aws::Structure
866
1279
  end
867
1280
 
868
- # A message in the [Message][1] field. Use to send a message in a call
869
- # to [Converse][2].
1281
+ # A message input, or returned from, a call to [Converse][1] or
1282
+ # [ConverseStream][2].
870
1283
  #
871
1284
  #
872
1285
  #
873
- # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Message.html
874
- # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html
1286
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html
1287
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html
875
1288
  #
876
1289
  # @!attribute [rw] role
877
1290
  # The role that the message plays in the message.
@@ -1044,7 +1457,8 @@ module Aws::BedrockRuntime
1044
1457
  include Aws::Structure
1045
1458
  end
1046
1459
 
1047
- # The model must request a specific tool.
1460
+ # The model must request a specific tool. For example, `\{"tool" :
1461
+ # \{"name" : "Your tool name"\}\}`.
1048
1462
  #
1049
1463
  # <note markdown="1"> This field is only supported by Anthropic Claude 3 models.
1050
1464
  #
@@ -1062,7 +1476,7 @@ module Aws::BedrockRuntime
1062
1476
  include Aws::Structure
1063
1477
  end
1064
1478
 
1065
- # A system content block
1479
+ # A system content block.
1066
1480
  #
1067
1481
  # @note SystemContentBlock is a union - when making an API calls you must set exactly one of the members.
1068
1482
  #
@@ -1070,16 +1484,26 @@ module Aws::BedrockRuntime
1070
1484
  # A system prompt for the model.
1071
1485
  # @return [String]
1072
1486
  #
1487
+ # @!attribute [rw] guard_content
1488
+ # A content block to assess with the guardrail. Use with the Converse
1489
+ # API (Converse and ConverseStream).
1490
+ #
1491
+ # For more information, see *Use a guardrail with the Converse API* in
1492
+ # the *Amazon Bedrock User Guide*.
1493
+ # @return [Types::GuardrailConverseContentBlock]
1494
+ #
1073
1495
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/SystemContentBlock AWS API Documentation
1074
1496
  #
1075
1497
  class SystemContentBlock < Struct.new(
1076
1498
  :text,
1499
+ :guard_content,
1077
1500
  :unknown)
1078
1501
  SENSITIVE = []
1079
1502
  include Aws::Structure
1080
1503
  include Aws::Structure::Union
1081
1504
 
1082
1505
  class Text < SystemContentBlock; end
1506
+ class GuardContent < SystemContentBlock; end
1083
1507
  class Unknown < SystemContentBlock; end
1084
1508
  end
1085
1509
 
@@ -1142,13 +1566,15 @@ module Aws::BedrockRuntime
1142
1566
  class Unknown < Tool; end
1143
1567
  end
1144
1568
 
1145
- # Forces a model to use a tool.
1569
+ # Determines which tools the model should request in a call to
1570
+ # `Converse` or `ConverseStream`. `ToolChoice` is only supported by
1571
+ # Anthropic Claude 3 models and by Mistral AI Mistral Large.
1146
1572
  #
1147
1573
  # @note ToolChoice is a union - when making an API calls you must set exactly one of the members.
1148
1574
  #
1149
1575
  # @!attribute [rw] auto
1150
- # The Model automatically decides if a tool should be called or to
1151
- # whether to generate text instead.
1576
+ # (Default). The Model automatically decides if a tool should be
1577
+ # called or whether to generate text instead.
1152
1578
  # @return [Types::AutoToolChoice]
1153
1579
  #
1154
1580
  # @!attribute [rw] any
@@ -1156,7 +1582,8 @@ module Aws::BedrockRuntime
1156
1582
  # @return [Types::AnyToolChoice]
1157
1583
  #
1158
1584
  # @!attribute [rw] tool
1159
- # The Model must request the specified tool.
1585
+ # The Model must request the specified tool. Only supported by
1586
+ # Anthropic Claude 3 models.
1160
1587
  # @return [Types::SpecificToolChoice]
1161
1588
  #
1162
1589
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ToolChoice AWS API Documentation