@aws-sdk/client-bedrock-runtime 3.686.0 → 3.691.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.
@@ -40,7 +40,7 @@ export interface GuardrailTextBlock {
40
40
  * <p>The qualifiers describing the text block.</p>
41
41
  * @public
42
42
  */
43
- qualifiers?: GuardrailContentQualifier[];
43
+ qualifiers?: GuardrailContentQualifier[] | undefined;
44
44
  }
45
45
  /**
46
46
  * <p>The content block to be evaluated by the guardrail.</p>
@@ -195,7 +195,7 @@ export interface GuardrailContentFilter {
195
195
  * <p>The filter strength setting for the guardrail content filter.</p>
196
196
  * @public
197
197
  */
198
- filterStrength?: GuardrailContentFilterStrength;
198
+ filterStrength?: GuardrailContentFilterStrength | undefined;
199
199
  /**
200
200
  * <p>The guardrail action.</p>
201
201
  * @public
@@ -272,7 +272,7 @@ export interface GuardrailContextualGroundingPolicyAssessment {
272
272
  * <p>The filter details for the guardrails contextual grounding filter.</p>
273
273
  * @public
274
274
  */
275
- filters?: GuardrailContextualGroundingFilter[];
275
+ filters?: GuardrailContextualGroundingFilter[] | undefined;
276
276
  }
277
277
  /**
278
278
  * <p>The guardrail coverage for the text characters.</p>
@@ -283,12 +283,12 @@ export interface GuardrailTextCharactersCoverage {
283
283
  * <p>The text characters that were guarded by the guardrail coverage.</p>
284
284
  * @public
285
285
  */
286
- guarded?: number;
286
+ guarded?: number | undefined;
287
287
  /**
288
288
  * <p>The total text characters by the guardrail coverage.</p>
289
289
  * @public
290
290
  */
291
- total?: number;
291
+ total?: number | undefined;
292
292
  }
293
293
  /**
294
294
  * <p>The action of the guardrail coverage details.</p>
@@ -299,7 +299,7 @@ export interface GuardrailCoverage {
299
299
  * <p>The text characters of the guardrail coverage details.</p>
300
300
  * @public
301
301
  */
302
- textCharacters?: GuardrailTextCharactersCoverage;
302
+ textCharacters?: GuardrailTextCharactersCoverage | undefined;
303
303
  }
304
304
  /**
305
305
  * <p>The details on the use of the guardrail.</p>
@@ -346,17 +346,17 @@ export interface GuardrailInvocationMetrics {
346
346
  * <p>The processing latency details for the guardrail invocation metrics.</p>
347
347
  * @public
348
348
  */
349
- guardrailProcessingLatency?: number;
349
+ guardrailProcessingLatency?: number | undefined;
350
350
  /**
351
351
  * <p>The usage details for the guardrail invocation metrics.</p>
352
352
  * @public
353
353
  */
354
- usage?: GuardrailUsage;
354
+ usage?: GuardrailUsage | undefined;
355
355
  /**
356
356
  * <p>The coverage details for the guardrail invocation metrics.</p>
357
357
  * @public
358
358
  */
359
- guardrailCoverage?: GuardrailCoverage;
359
+ guardrailCoverage?: GuardrailCoverage | undefined;
360
360
  }
361
361
  /**
362
362
  * @public
@@ -441,17 +441,17 @@ export interface GuardrailRegexFilter {
441
441
  * <p>The regex filter name.</p>
442
442
  * @public
443
443
  */
444
- name?: string;
444
+ name?: string | undefined;
445
445
  /**
446
446
  * <p>The regesx filter match.</p>
447
447
  * @public
448
448
  */
449
- match?: string;
449
+ match?: string | undefined;
450
450
  /**
451
451
  * <p>The regex query.</p>
452
452
  * @public
453
453
  */
454
- regex?: string;
454
+ regex?: string | undefined;
455
455
  /**
456
456
  * <p>The region filter action.</p>
457
457
  * @public
@@ -612,32 +612,32 @@ export interface GuardrailAssessment {
612
612
  * <p>The topic policy.</p>
613
613
  * @public
614
614
  */
615
- topicPolicy?: GuardrailTopicPolicyAssessment;
615
+ topicPolicy?: GuardrailTopicPolicyAssessment | undefined;
616
616
  /**
617
617
  * <p>The content policy.</p>
618
618
  * @public
619
619
  */
620
- contentPolicy?: GuardrailContentPolicyAssessment;
620
+ contentPolicy?: GuardrailContentPolicyAssessment | undefined;
621
621
  /**
622
622
  * <p>The word policy.</p>
623
623
  * @public
624
624
  */
625
- wordPolicy?: GuardrailWordPolicyAssessment;
625
+ wordPolicy?: GuardrailWordPolicyAssessment | undefined;
626
626
  /**
627
627
  * <p>The sensitive information policy.</p>
628
628
  * @public
629
629
  */
630
- sensitiveInformationPolicy?: GuardrailSensitiveInformationPolicyAssessment;
630
+ sensitiveInformationPolicy?: GuardrailSensitiveInformationPolicyAssessment | undefined;
631
631
  /**
632
632
  * <p>The contextual grounding policy used for the guardrail assessment.</p>
633
633
  * @public
634
634
  */
635
- contextualGroundingPolicy?: GuardrailContextualGroundingPolicyAssessment;
635
+ contextualGroundingPolicy?: GuardrailContextualGroundingPolicyAssessment | undefined;
636
636
  /**
637
637
  * <p>The invocation metrics for the guardrail assessment.</p>
638
638
  * @public
639
639
  */
640
- invocationMetrics?: GuardrailInvocationMetrics;
640
+ invocationMetrics?: GuardrailInvocationMetrics | undefined;
641
641
  }
642
642
  /**
643
643
  * <p>The output content produced by the guardrail.</p>
@@ -648,7 +648,7 @@ export interface GuardrailOutputContent {
648
648
  * <p>The specific text for the output content produced by the guardrail.</p>
649
649
  * @public
650
650
  */
651
- text?: string;
651
+ text?: string | undefined;
652
652
  }
653
653
  /**
654
654
  * @public
@@ -678,7 +678,7 @@ export interface ApplyGuardrailResponse {
678
678
  * <p>The guardrail coverage details in the apply guardrail response.</p>
679
679
  * @public
680
680
  */
681
- guardrailCoverage?: GuardrailCoverage;
681
+ guardrailCoverage?: GuardrailCoverage | undefined;
682
682
  }
683
683
  /**
684
684
  * <p>An internal server error occurred. Retry your request.</p>
@@ -771,7 +771,7 @@ export interface GuardrailConfiguration {
771
771
  * <p>The trace behavior for the guardrail.</p>
772
772
  * @public
773
773
  */
774
- trace?: GuardrailTrace;
774
+ trace?: GuardrailTrace | undefined;
775
775
  }
776
776
  /**
777
777
  * <p>Base inference parameters to pass to a model in a call to <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html">Converse</a> or <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html">ConverseStream</a>. For more information,
@@ -789,7 +789,7 @@ export interface InferenceConfiguration {
789
789
  * <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html">Inference parameters for foundation models</a>. </p>
790
790
  * @public
791
791
  */
792
- maxTokens?: number;
792
+ maxTokens?: number | undefined;
793
793
  /**
794
794
  * <p>The likelihood of the model selecting higher-probability options while generating a
795
795
  * response. A lower value makes the model more likely to choose higher-probability options,
@@ -800,7 +800,7 @@ export interface InferenceConfiguration {
800
800
  * models</a>. </p>
801
801
  * @public
802
802
  */
803
- temperature?: number;
803
+ temperature?: number | undefined;
804
804
  /**
805
805
  * <p>The percentage of most-likely candidates that the model considers for the next token. For
806
806
  * example, if you choose a value of 0.8 for <code>topP</code>, the model selects from the top 80% of the
@@ -809,13 +809,13 @@ export interface InferenceConfiguration {
809
809
  * <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html">Inference parameters for foundation models</a>. </p>
810
810
  * @public
811
811
  */
812
- topP?: number;
812
+ topP?: number | undefined;
813
813
  /**
814
814
  * <p>A list of stop sequences. A stop sequence is a sequence of characters that causes the
815
815
  * model to stop generating the response. </p>
816
816
  * @public
817
817
  */
818
- stopSequences?: string[];
818
+ stopSequences?: string[] | undefined;
819
819
  }
820
820
  /**
821
821
  * @public
@@ -934,7 +934,7 @@ export interface GuardrailConverseTextBlock {
934
934
  * <p>The qualifier details for the guardrails contextual grounding filter.</p>
935
935
  * @public
936
936
  */
937
- qualifiers?: GuardrailConverseContentQualifier[];
937
+ qualifiers?: GuardrailConverseContentQualifier[] | undefined;
938
938
  }
939
939
  /**
940
940
  * <p/>
@@ -1138,7 +1138,7 @@ export interface ToolResultBlock {
1138
1138
  * </note>
1139
1139
  * @public
1140
1140
  */
1141
- status?: ToolResultStatus;
1141
+ status?: ToolResultStatus | undefined;
1142
1142
  }
1143
1143
  /**
1144
1144
  * <p>A tool use content block. Contains information about a tool that the model
@@ -1322,6 +1322,36 @@ export interface Message {
1322
1322
  */
1323
1323
  content: ContentBlock[] | undefined;
1324
1324
  }
1325
+ /**
1326
+ * <p>Contains a map of variables in a prompt from Prompt management to an object containing the values to fill in for them when running model invocation. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management-how.html">How Prompt management works</a>.</p>
1327
+ * @public
1328
+ */
1329
+ export type PromptVariableValues = PromptVariableValues.TextMember | PromptVariableValues.$UnknownMember;
1330
+ /**
1331
+ * @public
1332
+ */
1333
+ export declare namespace PromptVariableValues {
1334
+ /**
1335
+ * <p>The text value that the variable maps to.</p>
1336
+ * @public
1337
+ */
1338
+ interface TextMember {
1339
+ text: string;
1340
+ $unknown?: never;
1341
+ }
1342
+ /**
1343
+ * @public
1344
+ */
1345
+ interface $UnknownMember {
1346
+ text?: never;
1347
+ $unknown: [string, any];
1348
+ }
1349
+ interface Visitor<T> {
1350
+ text: (value: string) => T;
1351
+ _: (name: string, value: any) => T;
1352
+ }
1353
+ const visit: <T>(value: PromptVariableValues, visitor: Visitor<T>) => T;
1354
+ }
1325
1355
  /**
1326
1356
  * <p>A system content block.</p>
1327
1357
  * @public
@@ -1495,7 +1525,7 @@ export interface ToolSpecification {
1495
1525
  * <p>The description for the tool.</p>
1496
1526
  * @public
1497
1527
  */
1498
- description?: string;
1528
+ description?: string | undefined;
1499
1529
  /**
1500
1530
  * <p>The input schema for the tool in JSON format.</p>
1501
1531
  * @public
@@ -1549,15 +1579,14 @@ export interface ToolConfiguration {
1549
1579
  * <p>If supported by model, forces the model to request a tool.</p>
1550
1580
  * @public
1551
1581
  */
1552
- toolChoice?: ToolChoice;
1582
+ toolChoice?: ToolChoice | undefined;
1553
1583
  }
1554
1584
  /**
1555
1585
  * @public
1556
1586
  */
1557
1587
  export interface ConverseRequest {
1558
1588
  /**
1559
- * <p>The identifier for the model that you want to call.</p>
1560
- * <p>The <code>modelId</code> to provide depends on the type of model or throughput that you use:</p>
1589
+ * <p>Specifies the model or throughput with which to run inference, or the prompt resource to use in inference. The value depends on the resource that you use:</p>
1561
1590
  * <ul>
1562
1591
  * <li>
1563
1592
  * <p>If you use a base model, specify the model ID or its ARN. For a list of model IDs for base models, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns">Amazon Bedrock base model IDs (on-demand throughput)</a> in the Amazon Bedrock User Guide.</p>
@@ -1571,6 +1600,9 @@ export interface ConverseRequest {
1571
1600
  * <li>
1572
1601
  * <p>If you use a custom model, first purchase Provisioned Throughput for it. Then specify the ARN of the resulting provisioned model. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html">Use a custom model in Amazon Bedrock</a> in the Amazon Bedrock User Guide.</p>
1573
1602
  * </li>
1603
+ * <li>
1604
+ * <p>To include a prompt that was defined in Prompt management, specify the ARN of the prompt version to use.</p>
1605
+ * </li>
1574
1606
  * </ul>
1575
1607
  * <p>The Converse API doesn't support <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html">imported models</a>.</p>
1576
1608
  * @public
@@ -1580,19 +1612,19 @@ export interface ConverseRequest {
1580
1612
  * <p>The messages that you want to send to the model.</p>
1581
1613
  * @public
1582
1614
  */
1583
- messages: Message[] | undefined;
1615
+ messages?: Message[] | undefined;
1584
1616
  /**
1585
- * <p>A system prompt to pass to the model.</p>
1617
+ * <p>A prompt that provides instructions or context to the model about the task it should perform, or the persona it should adopt during the conversation.</p>
1586
1618
  * @public
1587
1619
  */
1588
- system?: SystemContentBlock[];
1620
+ system?: SystemContentBlock[] | undefined;
1589
1621
  /**
1590
- * <p>Inference parameters to pass to the model. <code>Converse</code> supports a base
1622
+ * <p>Inference parameters to pass to the model. <code>Converse</code> and <code>ConverseStream</code> support a base
1591
1623
  * set of inference parameters. If you need to pass additional parameters that the model
1592
1624
  * supports, use the <code>additionalModelRequestFields</code> request field.</p>
1593
1625
  * @public
1594
1626
  */
1595
- inferenceConfig?: InferenceConfiguration;
1627
+ inferenceConfig?: InferenceConfiguration | undefined;
1596
1628
  /**
1597
1629
  * <p>Configuration information for the tools that the model can use when generating a response. </p>
1598
1630
  * <note>
@@ -1600,22 +1632,27 @@ export interface ConverseRequest {
1600
1632
  * </note>
1601
1633
  * @public
1602
1634
  */
1603
- toolConfig?: ToolConfiguration;
1635
+ toolConfig?: ToolConfiguration | undefined;
1604
1636
  /**
1605
- * <p>Configuration information for a guardrail that you want to use in the request. </p>
1637
+ * <p>Configuration information for a guardrail that you want to use in the request. If you include <code>guardContent</code> blocks in the <code>content</code> field in the <code>messages</code> field, the guardrail operates only on those messages. If you include no <code>guardContent</code> blocks, the guardrail operates on all messages in the request body and in any included prompt resource.</p>
1606
1638
  * @public
1607
1639
  */
1608
- guardrailConfig?: GuardrailConfiguration;
1640
+ guardrailConfig?: GuardrailConfiguration | undefined;
1609
1641
  /**
1610
1642
  * <p>Additional inference parameters that the model supports, beyond the
1611
- * base set of inference parameters that <code>Converse</code> supports in the <code>inferenceConfig</code>
1643
+ * base set of inference parameters that <code>Converse</code> and <code>ConverseStream</code> support in the <code>inferenceConfig</code>
1612
1644
  * field. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html">Model parameters</a>.</p>
1613
1645
  * @public
1614
1646
  */
1615
- additionalModelRequestFields?: __DocumentType;
1647
+ additionalModelRequestFields?: __DocumentType | undefined;
1648
+ /**
1649
+ * <p>Contains a map of variables in a prompt from Prompt management to objects containing the values to fill in for them when running model invocation. This field is ignored if you don't specify a prompt resource in the <code>modelId</code> field.</p>
1650
+ * @public
1651
+ */
1652
+ promptVariables?: Record<string, PromptVariableValues> | undefined;
1616
1653
  /**
1617
1654
  * <p>Additional model parameters field paths to return in the
1618
- * response. <code>Converse</code> returns the requested fields as a JSON Pointer object in the
1655
+ * response. <code>Converse</code> and <code>ConverseStream</code> return the requested fields as a JSON Pointer object in the
1619
1656
  * <code>additionalModelResponseFields</code> field. The following is example JSON for <code>additionalModelResponseFieldPaths</code>.</p>
1620
1657
  * <p>
1621
1658
  * <code>[
@@ -1623,14 +1660,14 @@ export interface ConverseRequest {
1623
1660
  * ]</code>
1624
1661
  * </p>
1625
1662
  * <p>For information about the JSON Pointer syntax, see the
1626
- * <a href="https://datatracker.ietf.org/doc/html/rfc6901">Internet Engineering Task Force (IETF)</a> documentation.</p>
1663
+ * <a href="https://datatracker.ietf.org/doc/html/rfc6901">Internet Engineering Task Force (IETF)</a> documentation.</p>
1627
1664
  * <p>
1628
- * <code>Converse</code> rejects an empty JSON Pointer or incorrectly structured
1665
+ * <code>Converse</code> and <code>ConverseStream</code> reject an empty JSON Pointer or incorrectly structured
1629
1666
  * JSON Pointer with a <code>400</code> error code. if the JSON Pointer is valid, but the requested
1630
1667
  * field is not in the model response, it is ignored by <code>Converse</code>.</p>
1631
1668
  * @public
1632
1669
  */
1633
- additionalModelResponseFieldPaths?: string[];
1670
+ additionalModelResponseFieldPaths?: string[] | undefined;
1634
1671
  }
1635
1672
  /**
1636
1673
  * <p>Metrics for a call to <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html">Converse</a>.</p>
@@ -1699,17 +1736,17 @@ export interface GuardrailTraceAssessment {
1699
1736
  * <p>The output from the model.</p>
1700
1737
  * @public
1701
1738
  */
1702
- modelOutput?: string[];
1739
+ modelOutput?: string[] | undefined;
1703
1740
  /**
1704
1741
  * <p>The input assessment.</p>
1705
1742
  * @public
1706
1743
  */
1707
- inputAssessment?: Record<string, GuardrailAssessment>;
1744
+ inputAssessment?: Record<string, GuardrailAssessment> | undefined;
1708
1745
  /**
1709
1746
  * <p>the output assessments.</p>
1710
1747
  * @public
1711
1748
  */
1712
- outputAssessments?: Record<string, GuardrailAssessment[]>;
1749
+ outputAssessments?: Record<string, GuardrailAssessment[]> | undefined;
1713
1750
  }
1714
1751
  /**
1715
1752
  * <p>The trace object in a response from <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html">Converse</a>. Currently, you can only trace guardrails.</p>
@@ -1720,7 +1757,7 @@ export interface ConverseTrace {
1720
1757
  * <p>The guardrail trace object. </p>
1721
1758
  * @public
1722
1759
  */
1723
- guardrail?: GuardrailTraceAssessment;
1760
+ guardrail?: GuardrailTraceAssessment | undefined;
1724
1761
  }
1725
1762
  /**
1726
1763
  * <p>The tokens used in a message API inference call. </p>
@@ -1772,12 +1809,12 @@ export interface ConverseResponse {
1772
1809
  * <p>Additional fields in the response that are unique to the model. </p>
1773
1810
  * @public
1774
1811
  */
1775
- additionalModelResponseFields?: __DocumentType;
1812
+ additionalModelResponseFields?: __DocumentType | undefined;
1776
1813
  /**
1777
1814
  * <p>A trace object that contains information about the Guardrail behavior.</p>
1778
1815
  * @public
1779
1816
  */
1780
- trace?: ConverseTrace;
1817
+ trace?: ConverseTrace | undefined;
1781
1818
  }
1782
1819
  /**
1783
1820
  * <p>The request failed due to an error while processing the model.</p>
@@ -1790,12 +1827,12 @@ export declare class ModelErrorException extends __BaseException {
1790
1827
  * <p>The original status code.</p>
1791
1828
  * @public
1792
1829
  */
1793
- originalStatusCode?: number;
1830
+ originalStatusCode?: number | undefined;
1794
1831
  /**
1795
1832
  * <p>The resource name.</p>
1796
1833
  * @public
1797
1834
  */
1798
- resourceName?: string;
1835
+ resourceName?: string | undefined;
1799
1836
  /**
1800
1837
  * @internal
1801
1838
  */
@@ -1873,22 +1910,21 @@ export interface GuardrailStreamConfiguration {
1873
1910
  * <p>The trace behavior for the guardrail.</p>
1874
1911
  * @public
1875
1912
  */
1876
- trace?: GuardrailTrace;
1913
+ trace?: GuardrailTrace | undefined;
1877
1914
  /**
1878
1915
  * <p>The processing mode. </p>
1879
1916
  * <p>The processing mode. For more information, see <i>Configure streaming response behavior</i> in the <i>Amazon Bedrock User Guide</i>.
1880
1917
  * </p>
1881
1918
  * @public
1882
1919
  */
1883
- streamProcessingMode?: GuardrailStreamProcessingMode;
1920
+ streamProcessingMode?: GuardrailStreamProcessingMode | undefined;
1884
1921
  }
1885
1922
  /**
1886
1923
  * @public
1887
1924
  */
1888
1925
  export interface ConverseStreamRequest {
1889
1926
  /**
1890
- * <p>The ID for the model.</p>
1891
- * <p>The <code>modelId</code> to provide depends on the type of model or throughput that you use:</p>
1927
+ * <p>Specifies the model or throughput with which to run inference, or the prompt resource to use in inference. The value depends on the resource that you use:</p>
1892
1928
  * <ul>
1893
1929
  * <li>
1894
1930
  * <p>If you use a base model, specify the model ID or its ARN. For a list of model IDs for base models, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns">Amazon Bedrock base model IDs (on-demand throughput)</a> in the Amazon Bedrock User Guide.</p>
@@ -1902,6 +1938,9 @@ export interface ConverseStreamRequest {
1902
1938
  * <li>
1903
1939
  * <p>If you use a custom model, first purchase Provisioned Throughput for it. Then specify the ARN of the resulting provisioned model. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html">Use a custom model in Amazon Bedrock</a> in the Amazon Bedrock User Guide.</p>
1904
1940
  * </li>
1941
+ * <li>
1942
+ * <p>To include a prompt that was defined in Prompt management, specify the ARN of the prompt version to use.</p>
1943
+ * </li>
1905
1944
  * </ul>
1906
1945
  * <p>The Converse API doesn't support <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html">imported models</a>.</p>
1907
1946
  * @public
@@ -1911,19 +1950,19 @@ export interface ConverseStreamRequest {
1911
1950
  * <p>The messages that you want to send to the model.</p>
1912
1951
  * @public
1913
1952
  */
1914
- messages: Message[] | undefined;
1953
+ messages?: Message[] | undefined;
1915
1954
  /**
1916
- * <p>A system prompt to send to the model.</p>
1955
+ * <p>A prompt that provides instructions or context to the model about the task it should perform, or the persona it should adopt during the conversation.</p>
1917
1956
  * @public
1918
1957
  */
1919
- system?: SystemContentBlock[];
1958
+ system?: SystemContentBlock[] | undefined;
1920
1959
  /**
1921
- * <p>Inference parameters to pass to the model. <code>ConverseStream</code> supports a base
1960
+ * <p>Inference parameters to pass to the model. <code>Converse</code> and <code>ConverseStream</code> support a base
1922
1961
  * set of inference parameters. If you need to pass additional parameters that the model
1923
1962
  * supports, use the <code>additionalModelRequestFields</code> request field.</p>
1924
1963
  * @public
1925
1964
  */
1926
- inferenceConfig?: InferenceConfiguration;
1965
+ inferenceConfig?: InferenceConfiguration | undefined;
1927
1966
  /**
1928
1967
  * <p>Configuration information for the tools that the model can use when generating a response.</p>
1929
1968
  * <note>
@@ -1931,22 +1970,27 @@ export interface ConverseStreamRequest {
1931
1970
  * </note>
1932
1971
  * @public
1933
1972
  */
1934
- toolConfig?: ToolConfiguration;
1973
+ toolConfig?: ToolConfiguration | undefined;
1935
1974
  /**
1936
- * <p>Configuration information for a guardrail that you want to use in the request. </p>
1975
+ * <p>Configuration information for a guardrail that you want to use in the request. If you include <code>guardContent</code> blocks in the <code>content</code> field in the <code>messages</code> field, the guardrail operates only on those messages. If you include no <code>guardContent</code> blocks, the guardrail operates on all messages in the request body and in any included prompt resource.</p>
1937
1976
  * @public
1938
1977
  */
1939
- guardrailConfig?: GuardrailStreamConfiguration;
1978
+ guardrailConfig?: GuardrailStreamConfiguration | undefined;
1940
1979
  /**
1941
1980
  * <p>Additional inference parameters that the model supports, beyond the
1942
- * base set of inference parameters that <code>ConverseStream</code> supports in the <code>inferenceConfig</code>
1943
- * field.</p>
1981
+ * base set of inference parameters that <code>Converse</code> and <code>ConverseStream</code> support in the <code>inferenceConfig</code>
1982
+ * field. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html">Model parameters</a>.</p>
1983
+ * @public
1984
+ */
1985
+ additionalModelRequestFields?: __DocumentType | undefined;
1986
+ /**
1987
+ * <p>Contains a map of variables in a prompt from Prompt management to objects containing the values to fill in for them when running model invocation. This field is ignored if you don't specify a prompt resource in the <code>modelId</code> field.</p>
1944
1988
  * @public
1945
1989
  */
1946
- additionalModelRequestFields?: __DocumentType;
1990
+ promptVariables?: Record<string, PromptVariableValues> | undefined;
1947
1991
  /**
1948
1992
  * <p>Additional model parameters field paths to return in the
1949
- * response. <code>ConverseStream</code> returns the requested fields as a JSON Pointer object in the
1993
+ * response. <code>Converse</code> and <code>ConverseStream</code> return the requested fields as a JSON Pointer object in the
1950
1994
  * <code>additionalModelResponseFields</code> field. The following is example JSON for <code>additionalModelResponseFieldPaths</code>.</p>
1951
1995
  * <p>
1952
1996
  * <code>[
@@ -1954,14 +1998,14 @@ export interface ConverseStreamRequest {
1954
1998
  * ]</code>
1955
1999
  * </p>
1956
2000
  * <p>For information about the JSON Pointer syntax, see the
1957
- * <a href="https://datatracker.ietf.org/doc/html/rfc6901">Internet Engineering Task Force (IETF)</a> documentation.</p>
2001
+ * <a href="https://datatracker.ietf.org/doc/html/rfc6901">Internet Engineering Task Force (IETF)</a> documentation.</p>
1958
2002
  * <p>
1959
- * <code>ConverseStream</code> rejects an empty JSON Pointer or incorrectly structured
2003
+ * <code>Converse</code> and <code>ConverseStream</code> reject an empty JSON Pointer or incorrectly structured
1960
2004
  * JSON Pointer with a <code>400</code> error code. if the JSON Pointer is valid, but the requested
1961
- * field is not in the model response, it is ignored by <code>ConverseStream</code>.</p>
2005
+ * field is not in the model response, it is ignored by <code>Converse</code>.</p>
1962
2006
  * @public
1963
2007
  */
1964
- additionalModelResponseFieldPaths?: string[];
2008
+ additionalModelResponseFieldPaths?: string[] | undefined;
1965
2009
  }
1966
2010
  /**
1967
2011
  * <p>The delta for a tool use block.</p>
@@ -2130,7 +2174,7 @@ export interface MessageStopEvent {
2130
2174
  * <p>The additional model response fields.</p>
2131
2175
  * @public
2132
2176
  */
2133
- additionalModelResponseFields?: __DocumentType;
2177
+ additionalModelResponseFields?: __DocumentType | undefined;
2134
2178
  }
2135
2179
  /**
2136
2180
  * <p>Metrics for the stream.</p>
@@ -2152,7 +2196,7 @@ export interface ConverseStreamTrace {
2152
2196
  * <p>The guardrail trace object. </p>
2153
2197
  * @public
2154
2198
  */
2155
- guardrail?: GuardrailTraceAssessment;
2199
+ guardrail?: GuardrailTraceAssessment | undefined;
2156
2200
  }
2157
2201
  /**
2158
2202
  * <p>A conversation stream metadata event.</p>
@@ -2173,7 +2217,7 @@ export interface ConverseStreamMetadataEvent {
2173
2217
  * <p>The trace object in the response from <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html">ConverseStream</a> that contains information about the guardrail behavior.</p>
2174
2218
  * @public
2175
2219
  */
2176
- trace?: ConverseStreamTrace;
2220
+ trace?: ConverseStreamTrace | undefined;
2177
2221
  }
2178
2222
  /**
2179
2223
  * <p>An error occurred while streaming the response. Retry your request.</p>
@@ -2186,12 +2230,12 @@ export declare class ModelStreamErrorException extends __BaseException {
2186
2230
  * <p>The original status code.</p>
2187
2231
  * @public
2188
2232
  */
2189
- originalStatusCode?: number;
2233
+ originalStatusCode?: number | undefined;
2190
2234
  /**
2191
2235
  * <p>The original message.</p>
2192
2236
  * @public
2193
2237
  */
2194
- originalMessage?: string;
2238
+ originalMessage?: string | undefined;
2195
2239
  /**
2196
2240
  * @internal
2197
2241
  */
@@ -2445,7 +2489,7 @@ export interface ConverseStreamResponse {
2445
2489
  * <p>The output stream that the model generated.</p>
2446
2490
  * @public
2447
2491
  */
2448
- stream?: AsyncIterable<ConverseStreamOutput>;
2492
+ stream?: AsyncIterable<ConverseStreamOutput> | undefined;
2449
2493
  }
2450
2494
  /**
2451
2495
  * @public
@@ -2467,18 +2511,18 @@ export interface InvokeModelRequest {
2467
2511
  * <p>The prompt and inference parameters in the format specified in the <code>contentType</code> in the header. You must provide the body in JSON format. To see the format and content of the request and response bodies for different models, refer to <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html">Inference parameters</a>. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/api-methods-run.html">Run inference</a> in the Bedrock User Guide.</p>
2468
2512
  * @public
2469
2513
  */
2470
- body: Uint8Array | undefined;
2514
+ body?: Uint8Array | undefined;
2471
2515
  /**
2472
2516
  * <p>The MIME type of the input data in the request. You must specify
2473
2517
  * <code>application/json</code>.</p>
2474
2518
  * @public
2475
2519
  */
2476
- contentType?: string;
2520
+ contentType?: string | undefined;
2477
2521
  /**
2478
2522
  * <p>The desired MIME type of the inference body in the response. The default value is <code>application/json</code>.</p>
2479
2523
  * @public
2480
2524
  */
2481
- accept?: string;
2525
+ accept?: string | undefined;
2482
2526
  /**
2483
2527
  * <p>The unique identifier of the model to invoke to run inference.</p>
2484
2528
  * <p>The <code>modelId</code> to provide depends on the type of model that you use:</p>
@@ -2503,7 +2547,7 @@ export interface InvokeModelRequest {
2503
2547
  * <p>Specifies whether to enable or disable the Bedrock trace. If enabled, you can see the full Bedrock trace.</p>
2504
2548
  * @public
2505
2549
  */
2506
- trace?: Trace;
2550
+ trace?: Trace | undefined;
2507
2551
  /**
2508
2552
  * <p>The unique identifier of the guardrail that you want to use. If you don't provide a value, no guardrail is applied
2509
2553
  * to the invocation.</p>
@@ -2521,12 +2565,12 @@ export interface InvokeModelRequest {
2521
2565
  * </ul>
2522
2566
  * @public
2523
2567
  */
2524
- guardrailIdentifier?: string;
2568
+ guardrailIdentifier?: string | undefined;
2525
2569
  /**
2526
2570
  * <p>The version number for the guardrail. The value can also be <code>DRAFT</code>.</p>
2527
2571
  * @public
2528
2572
  */
2529
- guardrailVersion?: string;
2573
+ guardrailVersion?: string | undefined;
2530
2574
  }
2531
2575
  /**
2532
2576
  * @public
@@ -2551,19 +2595,19 @@ export interface InvokeModelWithResponseStreamRequest {
2551
2595
  * <p>The prompt and inference parameters in the format specified in the <code>contentType</code> in the header. You must provide the body in JSON format. To see the format and content of the request and response bodies for different models, refer to <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html">Inference parameters</a>. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/api-methods-run.html">Run inference</a> in the Bedrock User Guide.</p>
2552
2596
  * @public
2553
2597
  */
2554
- body: Uint8Array | undefined;
2598
+ body?: Uint8Array | undefined;
2555
2599
  /**
2556
2600
  * <p>The MIME type of the input data in the request. You must specify
2557
2601
  * <code>application/json</code>.</p>
2558
2602
  * @public
2559
2603
  */
2560
- contentType?: string;
2604
+ contentType?: string | undefined;
2561
2605
  /**
2562
2606
  * <p>The desired MIME type of the inference body in the response. The default value is
2563
2607
  * <code>application/json</code>.</p>
2564
2608
  * @public
2565
2609
  */
2566
- accept?: string;
2610
+ accept?: string | undefined;
2567
2611
  /**
2568
2612
  * <p>The unique identifier of the model to invoke to run inference.</p>
2569
2613
  * <p>The <code>modelId</code> to provide depends on the type of model that you use:</p>
@@ -2588,7 +2632,7 @@ export interface InvokeModelWithResponseStreamRequest {
2588
2632
  * <p>Specifies whether to enable or disable the Bedrock trace. If enabled, you can see the full Bedrock trace.</p>
2589
2633
  * @public
2590
2634
  */
2591
- trace?: Trace;
2635
+ trace?: Trace | undefined;
2592
2636
  /**
2593
2637
  * <p>The unique identifier of the guardrail that you want to use. If you don't provide a value, no guardrail is applied
2594
2638
  * to the invocation.</p>
@@ -2606,12 +2650,12 @@ export interface InvokeModelWithResponseStreamRequest {
2606
2650
  * </ul>
2607
2651
  * @public
2608
2652
  */
2609
- guardrailIdentifier?: string;
2653
+ guardrailIdentifier?: string | undefined;
2610
2654
  /**
2611
2655
  * <p>The version number for the guardrail. The value can also be <code>DRAFT</code>.</p>
2612
2656
  * @public
2613
2657
  */
2614
- guardrailVersion?: string;
2658
+ guardrailVersion?: string | undefined;
2615
2659
  }
2616
2660
  /**
2617
2661
  * <p>Payload content included in the response.</p>
@@ -2622,7 +2666,7 @@ export interface PayloadPart {
2622
2666
  * <p>Base64-encoded bytes of payload data.</p>
2623
2667
  * @public
2624
2668
  */
2625
- bytes?: Uint8Array;
2669
+ bytes?: Uint8Array | undefined;
2626
2670
  }
2627
2671
  /**
2628
2672
  * <p>Definition of content in the response stream.</p>
@@ -2771,6 +2815,14 @@ export interface InvokeModelWithResponseStreamResponse {
2771
2815
  */
2772
2816
  contentType: string | undefined;
2773
2817
  }
2818
+ /**
2819
+ * @internal
2820
+ */
2821
+ export declare const ConverseRequestFilterSensitiveLog: (obj: ConverseRequest) => any;
2822
+ /**
2823
+ * @internal
2824
+ */
2825
+ export declare const ConverseStreamRequestFilterSensitiveLog: (obj: ConverseStreamRequest) => any;
2774
2826
  /**
2775
2827
  * @internal
2776
2828
  */