aws-sdk-bedrockruntime 1.54.0 → 1.56.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 +4 -4
- data/CHANGELOG.md +10 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-bedrockruntime/async_client.rb +1 -1
- data/lib/aws-sdk-bedrockruntime/client.rb +822 -1
- data/lib/aws-sdk-bedrockruntime/client_api.rb +171 -0
- data/lib/aws-sdk-bedrockruntime/types.rb +551 -1
- data/lib/aws-sdk-bedrockruntime.rb +1 -1
- data/sig/client.rbs +202 -0
- data/sig/types.rbs +158 -0
- metadata +1 -1
@@ -1168,6 +1168,32 @@ module Aws::BedrockRuntime
|
|
1168
1168
|
include Aws::Structure
|
1169
1169
|
end
|
1170
1170
|
|
1171
|
+
# The inputs from a `Converse` API request for token counting.
|
1172
|
+
#
|
1173
|
+
# This structure mirrors the input format for the `Converse` operation,
|
1174
|
+
# allowing you to count tokens for conversation-based inference
|
1175
|
+
# requests.
|
1176
|
+
#
|
1177
|
+
# @!attribute [rw] messages
|
1178
|
+
# An array of messages to count tokens for.
|
1179
|
+
# @return [Array<Types::Message>]
|
1180
|
+
#
|
1181
|
+
# @!attribute [rw] system
|
1182
|
+
# The system content blocks to count tokens for. System content
|
1183
|
+
# provides instructions or context to the model about how it should
|
1184
|
+
# behave or respond. The token count will include any system content
|
1185
|
+
# provided.
|
1186
|
+
# @return [Array<Types::SystemContentBlock>]
|
1187
|
+
#
|
1188
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ConverseTokensRequest AWS API Documentation
|
1189
|
+
#
|
1190
|
+
class ConverseTokensRequest < Struct.new(
|
1191
|
+
:messages,
|
1192
|
+
:system)
|
1193
|
+
SENSITIVE = []
|
1194
|
+
include Aws::Structure
|
1195
|
+
end
|
1196
|
+
|
1171
1197
|
# The trace object in a response from [Converse][1]. Currently, you can
|
1172
1198
|
# only trace guardrails.
|
1173
1199
|
#
|
@@ -1192,6 +1218,85 @@ module Aws::BedrockRuntime
|
|
1192
1218
|
include Aws::Structure
|
1193
1219
|
end
|
1194
1220
|
|
1221
|
+
# The input value for token counting. The value should be either an
|
1222
|
+
# `InvokeModel` or `Converse` request body.
|
1223
|
+
#
|
1224
|
+
# @note CountTokensInput is a union - when making an API calls you must set exactly one of the members.
|
1225
|
+
#
|
1226
|
+
# @!attribute [rw] invoke_model
|
1227
|
+
# An `InvokeModel` request for which to count tokens. Use this field
|
1228
|
+
# when you want to count tokens for a raw text input that would be
|
1229
|
+
# sent to the `InvokeModel` operation.
|
1230
|
+
# @return [Types::InvokeModelTokensRequest]
|
1231
|
+
#
|
1232
|
+
# @!attribute [rw] converse
|
1233
|
+
# A `Converse` request for which to count tokens. Use this field when
|
1234
|
+
# you want to count tokens for a conversation-based input that would
|
1235
|
+
# be sent to the `Converse` operation.
|
1236
|
+
# @return [Types::ConverseTokensRequest]
|
1237
|
+
#
|
1238
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/CountTokensInput AWS API Documentation
|
1239
|
+
#
|
1240
|
+
class CountTokensInput < Struct.new(
|
1241
|
+
:invoke_model,
|
1242
|
+
:converse,
|
1243
|
+
:unknown)
|
1244
|
+
SENSITIVE = []
|
1245
|
+
include Aws::Structure
|
1246
|
+
include Aws::Structure::Union
|
1247
|
+
|
1248
|
+
class InvokeModel < CountTokensInput; end
|
1249
|
+
class Converse < CountTokensInput; end
|
1250
|
+
class Unknown < CountTokensInput; end
|
1251
|
+
end
|
1252
|
+
|
1253
|
+
# @!attribute [rw] model_id
|
1254
|
+
# The unique identifier or ARN of the foundation model to use for
|
1255
|
+
# token counting. Each model processes tokens differently, so the
|
1256
|
+
# token count is specific to the model you specify.
|
1257
|
+
# @return [String]
|
1258
|
+
#
|
1259
|
+
# @!attribute [rw] input
|
1260
|
+
# The input for which to count tokens. The structure of this parameter
|
1261
|
+
# depends on whether you're counting tokens for an `InvokeModel` or
|
1262
|
+
# `Converse` request:
|
1263
|
+
#
|
1264
|
+
# * For `InvokeModel` requests, provide the request body in the
|
1265
|
+
# `invokeModel` field
|
1266
|
+
#
|
1267
|
+
# * For `Converse` requests, provide the messages and system content
|
1268
|
+
# in the `converse` field
|
1269
|
+
#
|
1270
|
+
# The input format must be compatible with the model specified in the
|
1271
|
+
# `modelId` parameter.
|
1272
|
+
# @return [Types::CountTokensInput]
|
1273
|
+
#
|
1274
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/CountTokensRequest AWS API Documentation
|
1275
|
+
#
|
1276
|
+
class CountTokensRequest < Struct.new(
|
1277
|
+
:model_id,
|
1278
|
+
:input)
|
1279
|
+
SENSITIVE = []
|
1280
|
+
include Aws::Structure
|
1281
|
+
end
|
1282
|
+
|
1283
|
+
# @!attribute [rw] input_tokens
|
1284
|
+
# The number of tokens in the provided input according to the
|
1285
|
+
# specified model's tokenization rules. This count represents the
|
1286
|
+
# number of input tokens that would be processed if the same input
|
1287
|
+
# were sent to the model in an inference request. Use this value to
|
1288
|
+
# estimate costs and ensure your inputs stay within model token
|
1289
|
+
# limits.
|
1290
|
+
# @return [Integer]
|
1291
|
+
#
|
1292
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/CountTokensResponse AWS API Documentation
|
1293
|
+
#
|
1294
|
+
class CountTokensResponse < Struct.new(
|
1295
|
+
:input_tokens)
|
1296
|
+
SENSITIVE = []
|
1297
|
+
include Aws::Structure
|
1298
|
+
end
|
1299
|
+
|
1195
1300
|
# A document to include in a message.
|
1196
1301
|
#
|
1197
1302
|
# @!attribute [rw] format
|
@@ -1490,6 +1595,11 @@ module Aws::BedrockRuntime
|
|
1490
1595
|
# The contextual grounding policy used for the guardrail assessment.
|
1491
1596
|
# @return [Types::GuardrailContextualGroundingPolicyAssessment]
|
1492
1597
|
#
|
1598
|
+
# @!attribute [rw] automated_reasoning_policy
|
1599
|
+
# The automated reasoning policy assessment results, including logical
|
1600
|
+
# validation findings for the input content.
|
1601
|
+
# @return [Types::GuardrailAutomatedReasoningPolicyAssessment]
|
1602
|
+
#
|
1493
1603
|
# @!attribute [rw] invocation_metrics
|
1494
1604
|
# The invocation metrics for the guardrail assessment.
|
1495
1605
|
# @return [Types::GuardrailInvocationMetrics]
|
@@ -1502,11 +1612,417 @@ module Aws::BedrockRuntime
|
|
1502
1612
|
:word_policy,
|
1503
1613
|
:sensitive_information_policy,
|
1504
1614
|
:contextual_grounding_policy,
|
1615
|
+
:automated_reasoning_policy,
|
1505
1616
|
:invocation_metrics)
|
1506
1617
|
SENSITIVE = []
|
1507
1618
|
include Aws::Structure
|
1508
1619
|
end
|
1509
1620
|
|
1621
|
+
# Represents a logical validation result from automated reasoning policy
|
1622
|
+
# evaluation. The finding indicates whether claims in the input are
|
1623
|
+
# logically valid, invalid, satisfiable, impossible, or have other
|
1624
|
+
# logical issues.
|
1625
|
+
#
|
1626
|
+
# @note GuardrailAutomatedReasoningFinding is a union - when returned from an API call exactly one value will be set and the returned type will be a subclass of GuardrailAutomatedReasoningFinding corresponding to the set member.
|
1627
|
+
#
|
1628
|
+
# @!attribute [rw] valid
|
1629
|
+
# Contains the result when the automated reasoning evaluation
|
1630
|
+
# determines that the claims in the input are logically valid and
|
1631
|
+
# definitively true based on the provided premises and policy rules.
|
1632
|
+
# @return [Types::GuardrailAutomatedReasoningValidFinding]
|
1633
|
+
#
|
1634
|
+
# @!attribute [rw] invalid
|
1635
|
+
# Contains the result when the automated reasoning evaluation
|
1636
|
+
# determines that the claims in the input are logically invalid and
|
1637
|
+
# contradict the established premises or policy rules.
|
1638
|
+
# @return [Types::GuardrailAutomatedReasoningInvalidFinding]
|
1639
|
+
#
|
1640
|
+
# @!attribute [rw] satisfiable
|
1641
|
+
# Contains the result when the automated reasoning evaluation
|
1642
|
+
# determines that the claims in the input could be either true or
|
1643
|
+
# false depending on additional assumptions not provided in the input
|
1644
|
+
# context.
|
1645
|
+
# @return [Types::GuardrailAutomatedReasoningSatisfiableFinding]
|
1646
|
+
#
|
1647
|
+
# @!attribute [rw] impossible
|
1648
|
+
# Contains the result when the automated reasoning evaluation
|
1649
|
+
# determines that no valid logical conclusions can be drawn due to
|
1650
|
+
# contradictions in the premises or policy rules themselves.
|
1651
|
+
# @return [Types::GuardrailAutomatedReasoningImpossibleFinding]
|
1652
|
+
#
|
1653
|
+
# @!attribute [rw] translation_ambiguous
|
1654
|
+
# Contains the result when the automated reasoning evaluation detects
|
1655
|
+
# that the input has multiple valid logical interpretations, requiring
|
1656
|
+
# additional context or clarification to proceed with validation.
|
1657
|
+
# @return [Types::GuardrailAutomatedReasoningTranslationAmbiguousFinding]
|
1658
|
+
#
|
1659
|
+
# @!attribute [rw] too_complex
|
1660
|
+
# Contains the result when the automated reasoning evaluation cannot
|
1661
|
+
# process the input due to its complexity or volume exceeding the
|
1662
|
+
# system's processing capacity for logical analysis.
|
1663
|
+
# @return [Types::GuardrailAutomatedReasoningTooComplexFinding]
|
1664
|
+
#
|
1665
|
+
# @!attribute [rw] no_translations
|
1666
|
+
# Contains the result when the automated reasoning evaluation cannot
|
1667
|
+
# extract any relevant logical information from the input that can be
|
1668
|
+
# validated against the policy rules.
|
1669
|
+
# @return [Types::GuardrailAutomatedReasoningNoTranslationsFinding]
|
1670
|
+
#
|
1671
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailAutomatedReasoningFinding AWS API Documentation
|
1672
|
+
#
|
1673
|
+
class GuardrailAutomatedReasoningFinding < Struct.new(
|
1674
|
+
:valid,
|
1675
|
+
:invalid,
|
1676
|
+
:satisfiable,
|
1677
|
+
:impossible,
|
1678
|
+
:translation_ambiguous,
|
1679
|
+
:too_complex,
|
1680
|
+
:no_translations,
|
1681
|
+
:unknown)
|
1682
|
+
SENSITIVE = []
|
1683
|
+
include Aws::Structure
|
1684
|
+
include Aws::Structure::Union
|
1685
|
+
|
1686
|
+
class Valid < GuardrailAutomatedReasoningFinding; end
|
1687
|
+
class Invalid < GuardrailAutomatedReasoningFinding; end
|
1688
|
+
class Satisfiable < GuardrailAutomatedReasoningFinding; end
|
1689
|
+
class Impossible < GuardrailAutomatedReasoningFinding; end
|
1690
|
+
class TranslationAmbiguous < GuardrailAutomatedReasoningFinding; end
|
1691
|
+
class TooComplex < GuardrailAutomatedReasoningFinding; end
|
1692
|
+
class NoTranslations < GuardrailAutomatedReasoningFinding; end
|
1693
|
+
class Unknown < GuardrailAutomatedReasoningFinding; end
|
1694
|
+
end
|
1695
|
+
|
1696
|
+
# Indicates that no valid claims can be made due to logical
|
1697
|
+
# contradictions in the premises or rules.
|
1698
|
+
#
|
1699
|
+
# @!attribute [rw] translation
|
1700
|
+
# The logical translation of the input that this finding evaluates.
|
1701
|
+
# @return [Types::GuardrailAutomatedReasoningTranslation]
|
1702
|
+
#
|
1703
|
+
# @!attribute [rw] contradicting_rules
|
1704
|
+
# The automated reasoning policy rules that contradict the claims
|
1705
|
+
# and/or premises in the input.
|
1706
|
+
# @return [Array<Types::GuardrailAutomatedReasoningRule>]
|
1707
|
+
#
|
1708
|
+
# @!attribute [rw] logic_warning
|
1709
|
+
# Indication of a logic issue with the translation without needing to
|
1710
|
+
# consider the automated reasoning policy rules.
|
1711
|
+
# @return [Types::GuardrailAutomatedReasoningLogicWarning]
|
1712
|
+
#
|
1713
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailAutomatedReasoningImpossibleFinding AWS API Documentation
|
1714
|
+
#
|
1715
|
+
class GuardrailAutomatedReasoningImpossibleFinding < Struct.new(
|
1716
|
+
:translation,
|
1717
|
+
:contradicting_rules,
|
1718
|
+
:logic_warning)
|
1719
|
+
SENSITIVE = []
|
1720
|
+
include Aws::Structure
|
1721
|
+
end
|
1722
|
+
|
1723
|
+
# References a portion of the original input text that corresponds to
|
1724
|
+
# logical elements.
|
1725
|
+
#
|
1726
|
+
# @!attribute [rw] text
|
1727
|
+
# The specific text from the original input that this reference points
|
1728
|
+
# to.
|
1729
|
+
# @return [String]
|
1730
|
+
#
|
1731
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailAutomatedReasoningInputTextReference AWS API Documentation
|
1732
|
+
#
|
1733
|
+
class GuardrailAutomatedReasoningInputTextReference < Struct.new(
|
1734
|
+
:text)
|
1735
|
+
SENSITIVE = [:text]
|
1736
|
+
include Aws::Structure
|
1737
|
+
end
|
1738
|
+
|
1739
|
+
# Indicates that the claims are logically false and contradictory to the
|
1740
|
+
# established rules or premises.
|
1741
|
+
#
|
1742
|
+
# @!attribute [rw] translation
|
1743
|
+
# The logical translation of the input that this finding invalidates.
|
1744
|
+
# @return [Types::GuardrailAutomatedReasoningTranslation]
|
1745
|
+
#
|
1746
|
+
# @!attribute [rw] contradicting_rules
|
1747
|
+
# The automated reasoning policy rules that contradict the claims in
|
1748
|
+
# the input.
|
1749
|
+
# @return [Array<Types::GuardrailAutomatedReasoningRule>]
|
1750
|
+
#
|
1751
|
+
# @!attribute [rw] logic_warning
|
1752
|
+
# Indication of a logic issue with the translation without needing to
|
1753
|
+
# consider the automated reasoning policy rules.
|
1754
|
+
# @return [Types::GuardrailAutomatedReasoningLogicWarning]
|
1755
|
+
#
|
1756
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailAutomatedReasoningInvalidFinding AWS API Documentation
|
1757
|
+
#
|
1758
|
+
class GuardrailAutomatedReasoningInvalidFinding < Struct.new(
|
1759
|
+
:translation,
|
1760
|
+
:contradicting_rules,
|
1761
|
+
:logic_warning)
|
1762
|
+
SENSITIVE = []
|
1763
|
+
include Aws::Structure
|
1764
|
+
end
|
1765
|
+
|
1766
|
+
# Identifies logical issues in the translated statements that exist
|
1767
|
+
# independent of any policy rules, such as statements that are always
|
1768
|
+
# true or always false.
|
1769
|
+
#
|
1770
|
+
# @!attribute [rw] type
|
1771
|
+
# The category of the detected logical issue, such as statements that
|
1772
|
+
# are always true or always false.
|
1773
|
+
# @return [String]
|
1774
|
+
#
|
1775
|
+
# @!attribute [rw] premises
|
1776
|
+
# The logical statements that serve as premises under which the claims
|
1777
|
+
# are validated.
|
1778
|
+
# @return [Array<Types::GuardrailAutomatedReasoningStatement>]
|
1779
|
+
#
|
1780
|
+
# @!attribute [rw] claims
|
1781
|
+
# The logical statements that are validated while assuming the policy
|
1782
|
+
# and premises.
|
1783
|
+
# @return [Array<Types::GuardrailAutomatedReasoningStatement>]
|
1784
|
+
#
|
1785
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailAutomatedReasoningLogicWarning AWS API Documentation
|
1786
|
+
#
|
1787
|
+
class GuardrailAutomatedReasoningLogicWarning < Struct.new(
|
1788
|
+
:type,
|
1789
|
+
:premises,
|
1790
|
+
:claims)
|
1791
|
+
SENSITIVE = []
|
1792
|
+
include Aws::Structure
|
1793
|
+
end
|
1794
|
+
|
1795
|
+
# Indicates that no relevant logical information could be extracted from
|
1796
|
+
# the input for validation.
|
1797
|
+
#
|
1798
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailAutomatedReasoningNoTranslationsFinding AWS API Documentation
|
1799
|
+
#
|
1800
|
+
class GuardrailAutomatedReasoningNoTranslationsFinding < Aws::EmptyStructure; end
|
1801
|
+
|
1802
|
+
# Contains the results of automated reasoning policy evaluation,
|
1803
|
+
# including logical findings about the validity of claims made in the
|
1804
|
+
# input content.
|
1805
|
+
#
|
1806
|
+
# @!attribute [rw] findings
|
1807
|
+
# List of logical validation results produced by evaluating the input
|
1808
|
+
# content against automated reasoning policies.
|
1809
|
+
# @return [Array<Types::GuardrailAutomatedReasoningFinding>]
|
1810
|
+
#
|
1811
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailAutomatedReasoningPolicyAssessment AWS API Documentation
|
1812
|
+
#
|
1813
|
+
class GuardrailAutomatedReasoningPolicyAssessment < Struct.new(
|
1814
|
+
:findings)
|
1815
|
+
SENSITIVE = []
|
1816
|
+
include Aws::Structure
|
1817
|
+
end
|
1818
|
+
|
1819
|
+
# References a specific automated reasoning policy rule that was applied
|
1820
|
+
# during evaluation.
|
1821
|
+
#
|
1822
|
+
# @!attribute [rw] identifier
|
1823
|
+
# The unique identifier of the automated reasoning rule.
|
1824
|
+
# @return [String]
|
1825
|
+
#
|
1826
|
+
# @!attribute [rw] policy_version_arn
|
1827
|
+
# The ARN of the automated reasoning policy version that contains this
|
1828
|
+
# rule.
|
1829
|
+
# @return [String]
|
1830
|
+
#
|
1831
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailAutomatedReasoningRule AWS API Documentation
|
1832
|
+
#
|
1833
|
+
class GuardrailAutomatedReasoningRule < Struct.new(
|
1834
|
+
:identifier,
|
1835
|
+
:policy_version_arn)
|
1836
|
+
SENSITIVE = []
|
1837
|
+
include Aws::Structure
|
1838
|
+
end
|
1839
|
+
|
1840
|
+
# Indicates that the claims could be either true or false depending on
|
1841
|
+
# additional assumptions not provided in the input.
|
1842
|
+
#
|
1843
|
+
# @!attribute [rw] translation
|
1844
|
+
# The logical translation of the input that this finding evaluates.
|
1845
|
+
# @return [Types::GuardrailAutomatedReasoningTranslation]
|
1846
|
+
#
|
1847
|
+
# @!attribute [rw] claims_true_scenario
|
1848
|
+
# An example scenario demonstrating how the claims could be logically
|
1849
|
+
# true.
|
1850
|
+
# @return [Types::GuardrailAutomatedReasoningScenario]
|
1851
|
+
#
|
1852
|
+
# @!attribute [rw] claims_false_scenario
|
1853
|
+
# An example scenario demonstrating how the claims could be logically
|
1854
|
+
# false.
|
1855
|
+
# @return [Types::GuardrailAutomatedReasoningScenario]
|
1856
|
+
#
|
1857
|
+
# @!attribute [rw] logic_warning
|
1858
|
+
# Indication of a logic issue with the translation without needing to
|
1859
|
+
# consider the automated reasoning policy rules.
|
1860
|
+
# @return [Types::GuardrailAutomatedReasoningLogicWarning]
|
1861
|
+
#
|
1862
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailAutomatedReasoningSatisfiableFinding AWS API Documentation
|
1863
|
+
#
|
1864
|
+
class GuardrailAutomatedReasoningSatisfiableFinding < Struct.new(
|
1865
|
+
:translation,
|
1866
|
+
:claims_true_scenario,
|
1867
|
+
:claims_false_scenario,
|
1868
|
+
:logic_warning)
|
1869
|
+
SENSITIVE = []
|
1870
|
+
include Aws::Structure
|
1871
|
+
end
|
1872
|
+
|
1873
|
+
# Represents a logical scenario where claims can be evaluated as true or
|
1874
|
+
# false, containing specific logical assignments.
|
1875
|
+
#
|
1876
|
+
# @!attribute [rw] statements
|
1877
|
+
# List of logical assignments and statements that define this
|
1878
|
+
# scenario.
|
1879
|
+
# @return [Array<Types::GuardrailAutomatedReasoningStatement>]
|
1880
|
+
#
|
1881
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailAutomatedReasoningScenario AWS API Documentation
|
1882
|
+
#
|
1883
|
+
class GuardrailAutomatedReasoningScenario < Struct.new(
|
1884
|
+
:statements)
|
1885
|
+
SENSITIVE = []
|
1886
|
+
include Aws::Structure
|
1887
|
+
end
|
1888
|
+
|
1889
|
+
# A logical statement that includes both formal logic representation and
|
1890
|
+
# natural language explanation.
|
1891
|
+
#
|
1892
|
+
# @!attribute [rw] logic
|
1893
|
+
# The formal logical representation of the statement.
|
1894
|
+
# @return [String]
|
1895
|
+
#
|
1896
|
+
# @!attribute [rw] natural_language
|
1897
|
+
# The natural language explanation of the logical statement.
|
1898
|
+
# @return [String]
|
1899
|
+
#
|
1900
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailAutomatedReasoningStatement AWS API Documentation
|
1901
|
+
#
|
1902
|
+
class GuardrailAutomatedReasoningStatement < Struct.new(
|
1903
|
+
:logic,
|
1904
|
+
:natural_language)
|
1905
|
+
SENSITIVE = [:logic, :natural_language]
|
1906
|
+
include Aws::Structure
|
1907
|
+
end
|
1908
|
+
|
1909
|
+
# Indicates that the input exceeds the processing capacity due to the
|
1910
|
+
# volume or complexity of the logical information.
|
1911
|
+
#
|
1912
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailAutomatedReasoningTooComplexFinding AWS API Documentation
|
1913
|
+
#
|
1914
|
+
class GuardrailAutomatedReasoningTooComplexFinding < Aws::EmptyStructure; end
|
1915
|
+
|
1916
|
+
# Contains the logical translation of natural language input into formal
|
1917
|
+
# logical statements, including premises, claims, and confidence scores.
|
1918
|
+
#
|
1919
|
+
# @!attribute [rw] premises
|
1920
|
+
# The logical statements that serve as the foundation or assumptions
|
1921
|
+
# for the claims.
|
1922
|
+
# @return [Array<Types::GuardrailAutomatedReasoningStatement>]
|
1923
|
+
#
|
1924
|
+
# @!attribute [rw] claims
|
1925
|
+
# The logical statements that are being validated against the premises
|
1926
|
+
# and policy rules.
|
1927
|
+
# @return [Array<Types::GuardrailAutomatedReasoningStatement>]
|
1928
|
+
#
|
1929
|
+
# @!attribute [rw] untranslated_premises
|
1930
|
+
# References to portions of the original input text that correspond to
|
1931
|
+
# the premises but could not be fully translated.
|
1932
|
+
# @return [Array<Types::GuardrailAutomatedReasoningInputTextReference>]
|
1933
|
+
#
|
1934
|
+
# @!attribute [rw] untranslated_claims
|
1935
|
+
# References to portions of the original input text that correspond to
|
1936
|
+
# the claims but could not be fully translated.
|
1937
|
+
# @return [Array<Types::GuardrailAutomatedReasoningInputTextReference>]
|
1938
|
+
#
|
1939
|
+
# @!attribute [rw] confidence
|
1940
|
+
# A confidence score between 0 and 1 indicating how certain the system
|
1941
|
+
# is about the logical translation.
|
1942
|
+
# @return [Float]
|
1943
|
+
#
|
1944
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailAutomatedReasoningTranslation AWS API Documentation
|
1945
|
+
#
|
1946
|
+
class GuardrailAutomatedReasoningTranslation < Struct.new(
|
1947
|
+
:premises,
|
1948
|
+
:claims,
|
1949
|
+
:untranslated_premises,
|
1950
|
+
:untranslated_claims,
|
1951
|
+
:confidence)
|
1952
|
+
SENSITIVE = []
|
1953
|
+
include Aws::Structure
|
1954
|
+
end
|
1955
|
+
|
1956
|
+
# Indicates that the input has multiple valid logical interpretations,
|
1957
|
+
# requiring additional context or clarification.
|
1958
|
+
#
|
1959
|
+
# @!attribute [rw] options
|
1960
|
+
# Different logical interpretations that were detected during
|
1961
|
+
# translation of the input.
|
1962
|
+
# @return [Array<Types::GuardrailAutomatedReasoningTranslationOption>]
|
1963
|
+
#
|
1964
|
+
# @!attribute [rw] difference_scenarios
|
1965
|
+
# Scenarios showing how the different translation options differ in
|
1966
|
+
# meaning.
|
1967
|
+
# @return [Array<Types::GuardrailAutomatedReasoningScenario>]
|
1968
|
+
#
|
1969
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailAutomatedReasoningTranslationAmbiguousFinding AWS API Documentation
|
1970
|
+
#
|
1971
|
+
class GuardrailAutomatedReasoningTranslationAmbiguousFinding < Struct.new(
|
1972
|
+
:options,
|
1973
|
+
:difference_scenarios)
|
1974
|
+
SENSITIVE = []
|
1975
|
+
include Aws::Structure
|
1976
|
+
end
|
1977
|
+
|
1978
|
+
# Represents one possible logical interpretation of ambiguous input
|
1979
|
+
# content.
|
1980
|
+
#
|
1981
|
+
# @!attribute [rw] translations
|
1982
|
+
# Example translations that provide this possible interpretation of
|
1983
|
+
# the input.
|
1984
|
+
# @return [Array<Types::GuardrailAutomatedReasoningTranslation>]
|
1985
|
+
#
|
1986
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailAutomatedReasoningTranslationOption AWS API Documentation
|
1987
|
+
#
|
1988
|
+
class GuardrailAutomatedReasoningTranslationOption < Struct.new(
|
1989
|
+
:translations)
|
1990
|
+
SENSITIVE = []
|
1991
|
+
include Aws::Structure
|
1992
|
+
end
|
1993
|
+
|
1994
|
+
# Indicates that the claims are definitively true and logically implied
|
1995
|
+
# by the premises, with no possible alternative interpretations.
|
1996
|
+
#
|
1997
|
+
# @!attribute [rw] translation
|
1998
|
+
# The logical translation of the input that this finding validates.
|
1999
|
+
# @return [Types::GuardrailAutomatedReasoningTranslation]
|
2000
|
+
#
|
2001
|
+
# @!attribute [rw] claims_true_scenario
|
2002
|
+
# An example scenario demonstrating how the claims are logically true.
|
2003
|
+
# @return [Types::GuardrailAutomatedReasoningScenario]
|
2004
|
+
#
|
2005
|
+
# @!attribute [rw] supporting_rules
|
2006
|
+
# The automated reasoning policy rules that support why this result is
|
2007
|
+
# considered valid.
|
2008
|
+
# @return [Array<Types::GuardrailAutomatedReasoningRule>]
|
2009
|
+
#
|
2010
|
+
# @!attribute [rw] logic_warning
|
2011
|
+
# Indication of a logic issue with the translation without needing to
|
2012
|
+
# consider the automated reasoning policy rules.
|
2013
|
+
# @return [Types::GuardrailAutomatedReasoningLogicWarning]
|
2014
|
+
#
|
2015
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailAutomatedReasoningValidFinding AWS API Documentation
|
2016
|
+
#
|
2017
|
+
class GuardrailAutomatedReasoningValidFinding < Struct.new(
|
2018
|
+
:translation,
|
2019
|
+
:claims_true_scenario,
|
2020
|
+
:supporting_rules,
|
2021
|
+
:logic_warning)
|
2022
|
+
SENSITIVE = []
|
2023
|
+
include Aws::Structure
|
2024
|
+
end
|
2025
|
+
|
1510
2026
|
# Configuration information for a guardrail that you use with the
|
1511
2027
|
# [Converse][1] operation.
|
1512
2028
|
#
|
@@ -2208,6 +2724,16 @@ module Aws::BedrockRuntime
|
|
2208
2724
|
# The content policy image units processed by the guardrail.
|
2209
2725
|
# @return [Integer]
|
2210
2726
|
#
|
2727
|
+
# @!attribute [rw] automated_reasoning_policy_units
|
2728
|
+
# The number of text units processed by the automated reasoning
|
2729
|
+
# policy.
|
2730
|
+
# @return [Integer]
|
2731
|
+
#
|
2732
|
+
# @!attribute [rw] automated_reasoning_policies
|
2733
|
+
# The number of automated reasoning policies that were processed
|
2734
|
+
# during the guardrail evaluation.
|
2735
|
+
# @return [Integer]
|
2736
|
+
#
|
2211
2737
|
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailUsage AWS API Documentation
|
2212
2738
|
#
|
2213
2739
|
class GuardrailUsage < Struct.new(
|
@@ -2217,7 +2743,9 @@ module Aws::BedrockRuntime
|
|
2217
2743
|
:sensitive_information_policy_units,
|
2218
2744
|
:sensitive_information_policy_free_units,
|
2219
2745
|
:contextual_grounding_policy_units,
|
2220
|
-
:content_policy_image_units
|
2746
|
+
:content_policy_image_units,
|
2747
|
+
:automated_reasoning_policy_units,
|
2748
|
+
:automated_reasoning_policies)
|
2221
2749
|
SENSITIVE = []
|
2222
2750
|
include Aws::Structure
|
2223
2751
|
end
|
@@ -2523,6 +3051,28 @@ module Aws::BedrockRuntime
|
|
2523
3051
|
include Aws::Structure
|
2524
3052
|
end
|
2525
3053
|
|
3054
|
+
# The body of an `InvokeModel` API request for token counting. This
|
3055
|
+
# structure mirrors the input format for the `InvokeModel` operation,
|
3056
|
+
# allowing you to count tokens for raw text inference requests.
|
3057
|
+
#
|
3058
|
+
# @!attribute [rw] body
|
3059
|
+
# The request body to count tokens for, formatted according to the
|
3060
|
+
# model's expected input format. To learn about the input format for
|
3061
|
+
# different models, see [Model inference parameters and responses][1].
|
3062
|
+
#
|
3063
|
+
#
|
3064
|
+
#
|
3065
|
+
# [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html
|
3066
|
+
# @return [String]
|
3067
|
+
#
|
3068
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/InvokeModelTokensRequest AWS API Documentation
|
3069
|
+
#
|
3070
|
+
class InvokeModelTokensRequest < Struct.new(
|
3071
|
+
:body)
|
3072
|
+
SENSITIVE = [:body]
|
3073
|
+
include Aws::Structure
|
3074
|
+
end
|
3075
|
+
|
2526
3076
|
# @!attribute [rw] model_id
|
2527
3077
|
# The model ID or ARN of the model ID to use. Currently, only
|
2528
3078
|
# `amazon.nova-sonic-v1:0` is supported.
|