@aws-sdk/client-bedrock-runtime 3.687.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
|
|
@@ -1525,7 +1525,7 @@ export interface ToolSpecification {
|
|
|
1525
1525
|
* <p>The description for the tool.</p>
|
|
1526
1526
|
* @public
|
|
1527
1527
|
*/
|
|
1528
|
-
description?: string;
|
|
1528
|
+
description?: string | undefined;
|
|
1529
1529
|
/**
|
|
1530
1530
|
* <p>The input schema for the tool in JSON format.</p>
|
|
1531
1531
|
* @public
|
|
@@ -1579,7 +1579,7 @@ export interface ToolConfiguration {
|
|
|
1579
1579
|
* <p>If supported by model, forces the model to request a tool.</p>
|
|
1580
1580
|
* @public
|
|
1581
1581
|
*/
|
|
1582
|
-
toolChoice?: ToolChoice;
|
|
1582
|
+
toolChoice?: ToolChoice | undefined;
|
|
1583
1583
|
}
|
|
1584
1584
|
/**
|
|
1585
1585
|
* @public
|
|
@@ -1612,19 +1612,19 @@ export interface ConverseRequest {
|
|
|
1612
1612
|
* <p>The messages that you want to send to the model.</p>
|
|
1613
1613
|
* @public
|
|
1614
1614
|
*/
|
|
1615
|
-
messages?: Message[];
|
|
1615
|
+
messages?: Message[] | undefined;
|
|
1616
1616
|
/**
|
|
1617
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>
|
|
1618
1618
|
* @public
|
|
1619
1619
|
*/
|
|
1620
|
-
system?: SystemContentBlock[];
|
|
1620
|
+
system?: SystemContentBlock[] | undefined;
|
|
1621
1621
|
/**
|
|
1622
1622
|
* <p>Inference parameters to pass to the model. <code>Converse</code> and <code>ConverseStream</code> support a base
|
|
1623
1623
|
* set of inference parameters. If you need to pass additional parameters that the model
|
|
1624
1624
|
* supports, use the <code>additionalModelRequestFields</code> request field.</p>
|
|
1625
1625
|
* @public
|
|
1626
1626
|
*/
|
|
1627
|
-
inferenceConfig?: InferenceConfiguration;
|
|
1627
|
+
inferenceConfig?: InferenceConfiguration | undefined;
|
|
1628
1628
|
/**
|
|
1629
1629
|
* <p>Configuration information for the tools that the model can use when generating a response. </p>
|
|
1630
1630
|
* <note>
|
|
@@ -1632,24 +1632,24 @@ export interface ConverseRequest {
|
|
|
1632
1632
|
* </note>
|
|
1633
1633
|
* @public
|
|
1634
1634
|
*/
|
|
1635
|
-
toolConfig?: ToolConfiguration;
|
|
1635
|
+
toolConfig?: ToolConfiguration | undefined;
|
|
1636
1636
|
/**
|
|
1637
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>
|
|
1638
1638
|
* @public
|
|
1639
1639
|
*/
|
|
1640
|
-
guardrailConfig?: GuardrailConfiguration;
|
|
1640
|
+
guardrailConfig?: GuardrailConfiguration | undefined;
|
|
1641
1641
|
/**
|
|
1642
1642
|
* <p>Additional inference parameters that the model supports, beyond the
|
|
1643
1643
|
* base set of inference parameters that <code>Converse</code> and <code>ConverseStream</code> support in the <code>inferenceConfig</code>
|
|
1644
1644
|
* field. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html">Model parameters</a>.</p>
|
|
1645
1645
|
* @public
|
|
1646
1646
|
*/
|
|
1647
|
-
additionalModelRequestFields?: __DocumentType;
|
|
1647
|
+
additionalModelRequestFields?: __DocumentType | undefined;
|
|
1648
1648
|
/**
|
|
1649
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
1650
|
* @public
|
|
1651
1651
|
*/
|
|
1652
|
-
promptVariables?: Record<string, PromptVariableValues
|
|
1652
|
+
promptVariables?: Record<string, PromptVariableValues> | undefined;
|
|
1653
1653
|
/**
|
|
1654
1654
|
* <p>Additional model parameters field paths to return in the
|
|
1655
1655
|
* response. <code>Converse</code> and <code>ConverseStream</code> return the requested fields as a JSON Pointer object in the
|
|
@@ -1667,7 +1667,7 @@ export interface ConverseRequest {
|
|
|
1667
1667
|
* field is not in the model response, it is ignored by <code>Converse</code>.</p>
|
|
1668
1668
|
* @public
|
|
1669
1669
|
*/
|
|
1670
|
-
additionalModelResponseFieldPaths?: string[];
|
|
1670
|
+
additionalModelResponseFieldPaths?: string[] | undefined;
|
|
1671
1671
|
}
|
|
1672
1672
|
/**
|
|
1673
1673
|
* <p>Metrics for a call to <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html">Converse</a>.</p>
|
|
@@ -1736,17 +1736,17 @@ export interface GuardrailTraceAssessment {
|
|
|
1736
1736
|
* <p>The output from the model.</p>
|
|
1737
1737
|
* @public
|
|
1738
1738
|
*/
|
|
1739
|
-
modelOutput?: string[];
|
|
1739
|
+
modelOutput?: string[] | undefined;
|
|
1740
1740
|
/**
|
|
1741
1741
|
* <p>The input assessment.</p>
|
|
1742
1742
|
* @public
|
|
1743
1743
|
*/
|
|
1744
|
-
inputAssessment?: Record<string, GuardrailAssessment
|
|
1744
|
+
inputAssessment?: Record<string, GuardrailAssessment> | undefined;
|
|
1745
1745
|
/**
|
|
1746
1746
|
* <p>the output assessments.</p>
|
|
1747
1747
|
* @public
|
|
1748
1748
|
*/
|
|
1749
|
-
outputAssessments?: Record<string, GuardrailAssessment[]
|
|
1749
|
+
outputAssessments?: Record<string, GuardrailAssessment[]> | undefined;
|
|
1750
1750
|
}
|
|
1751
1751
|
/**
|
|
1752
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>
|
|
@@ -1757,7 +1757,7 @@ export interface ConverseTrace {
|
|
|
1757
1757
|
* <p>The guardrail trace object. </p>
|
|
1758
1758
|
* @public
|
|
1759
1759
|
*/
|
|
1760
|
-
guardrail?: GuardrailTraceAssessment;
|
|
1760
|
+
guardrail?: GuardrailTraceAssessment | undefined;
|
|
1761
1761
|
}
|
|
1762
1762
|
/**
|
|
1763
1763
|
* <p>The tokens used in a message API inference call. </p>
|
|
@@ -1809,12 +1809,12 @@ export interface ConverseResponse {
|
|
|
1809
1809
|
* <p>Additional fields in the response that are unique to the model. </p>
|
|
1810
1810
|
* @public
|
|
1811
1811
|
*/
|
|
1812
|
-
additionalModelResponseFields?: __DocumentType;
|
|
1812
|
+
additionalModelResponseFields?: __DocumentType | undefined;
|
|
1813
1813
|
/**
|
|
1814
1814
|
* <p>A trace object that contains information about the Guardrail behavior.</p>
|
|
1815
1815
|
* @public
|
|
1816
1816
|
*/
|
|
1817
|
-
trace?: ConverseTrace;
|
|
1817
|
+
trace?: ConverseTrace | undefined;
|
|
1818
1818
|
}
|
|
1819
1819
|
/**
|
|
1820
1820
|
* <p>The request failed due to an error while processing the model.</p>
|
|
@@ -1827,12 +1827,12 @@ export declare class ModelErrorException extends __BaseException {
|
|
|
1827
1827
|
* <p>The original status code.</p>
|
|
1828
1828
|
* @public
|
|
1829
1829
|
*/
|
|
1830
|
-
originalStatusCode?: number;
|
|
1830
|
+
originalStatusCode?: number | undefined;
|
|
1831
1831
|
/**
|
|
1832
1832
|
* <p>The resource name.</p>
|
|
1833
1833
|
* @public
|
|
1834
1834
|
*/
|
|
1835
|
-
resourceName?: string;
|
|
1835
|
+
resourceName?: string | undefined;
|
|
1836
1836
|
/**
|
|
1837
1837
|
* @internal
|
|
1838
1838
|
*/
|
|
@@ -1910,14 +1910,14 @@ export interface GuardrailStreamConfiguration {
|
|
|
1910
1910
|
* <p>The trace behavior for the guardrail.</p>
|
|
1911
1911
|
* @public
|
|
1912
1912
|
*/
|
|
1913
|
-
trace?: GuardrailTrace;
|
|
1913
|
+
trace?: GuardrailTrace | undefined;
|
|
1914
1914
|
/**
|
|
1915
1915
|
* <p>The processing mode. </p>
|
|
1916
1916
|
* <p>The processing mode. For more information, see <i>Configure streaming response behavior</i> in the <i>Amazon Bedrock User Guide</i>.
|
|
1917
1917
|
* </p>
|
|
1918
1918
|
* @public
|
|
1919
1919
|
*/
|
|
1920
|
-
streamProcessingMode?: GuardrailStreamProcessingMode;
|
|
1920
|
+
streamProcessingMode?: GuardrailStreamProcessingMode | undefined;
|
|
1921
1921
|
}
|
|
1922
1922
|
/**
|
|
1923
1923
|
* @public
|
|
@@ -1950,19 +1950,19 @@ export interface ConverseStreamRequest {
|
|
|
1950
1950
|
* <p>The messages that you want to send to the model.</p>
|
|
1951
1951
|
* @public
|
|
1952
1952
|
*/
|
|
1953
|
-
messages?: Message[];
|
|
1953
|
+
messages?: Message[] | undefined;
|
|
1954
1954
|
/**
|
|
1955
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>
|
|
1956
1956
|
* @public
|
|
1957
1957
|
*/
|
|
1958
|
-
system?: SystemContentBlock[];
|
|
1958
|
+
system?: SystemContentBlock[] | undefined;
|
|
1959
1959
|
/**
|
|
1960
1960
|
* <p>Inference parameters to pass to the model. <code>Converse</code> and <code>ConverseStream</code> support a base
|
|
1961
1961
|
* set of inference parameters. If you need to pass additional parameters that the model
|
|
1962
1962
|
* supports, use the <code>additionalModelRequestFields</code> request field.</p>
|
|
1963
1963
|
* @public
|
|
1964
1964
|
*/
|
|
1965
|
-
inferenceConfig?: InferenceConfiguration;
|
|
1965
|
+
inferenceConfig?: InferenceConfiguration | undefined;
|
|
1966
1966
|
/**
|
|
1967
1967
|
* <p>Configuration information for the tools that the model can use when generating a response.</p>
|
|
1968
1968
|
* <note>
|
|
@@ -1970,24 +1970,24 @@ export interface ConverseStreamRequest {
|
|
|
1970
1970
|
* </note>
|
|
1971
1971
|
* @public
|
|
1972
1972
|
*/
|
|
1973
|
-
toolConfig?: ToolConfiguration;
|
|
1973
|
+
toolConfig?: ToolConfiguration | undefined;
|
|
1974
1974
|
/**
|
|
1975
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>
|
|
1976
1976
|
* @public
|
|
1977
1977
|
*/
|
|
1978
|
-
guardrailConfig?: GuardrailStreamConfiguration;
|
|
1978
|
+
guardrailConfig?: GuardrailStreamConfiguration | undefined;
|
|
1979
1979
|
/**
|
|
1980
1980
|
* <p>Additional inference parameters that the model supports, beyond the
|
|
1981
1981
|
* base set of inference parameters that <code>Converse</code> and <code>ConverseStream</code> support in the <code>inferenceConfig</code>
|
|
1982
1982
|
* field. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html">Model parameters</a>.</p>
|
|
1983
1983
|
* @public
|
|
1984
1984
|
*/
|
|
1985
|
-
additionalModelRequestFields?: __DocumentType;
|
|
1985
|
+
additionalModelRequestFields?: __DocumentType | undefined;
|
|
1986
1986
|
/**
|
|
1987
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>
|
|
1988
1988
|
* @public
|
|
1989
1989
|
*/
|
|
1990
|
-
promptVariables?: Record<string, PromptVariableValues
|
|
1990
|
+
promptVariables?: Record<string, PromptVariableValues> | undefined;
|
|
1991
1991
|
/**
|
|
1992
1992
|
* <p>Additional model parameters field paths to return in the
|
|
1993
1993
|
* response. <code>Converse</code> and <code>ConverseStream</code> return the requested fields as a JSON Pointer object in the
|
|
@@ -2005,7 +2005,7 @@ export interface ConverseStreamRequest {
|
|
|
2005
2005
|
* field is not in the model response, it is ignored by <code>Converse</code>.</p>
|
|
2006
2006
|
* @public
|
|
2007
2007
|
*/
|
|
2008
|
-
additionalModelResponseFieldPaths?: string[];
|
|
2008
|
+
additionalModelResponseFieldPaths?: string[] | undefined;
|
|
2009
2009
|
}
|
|
2010
2010
|
/**
|
|
2011
2011
|
* <p>The delta for a tool use block.</p>
|
|
@@ -2174,7 +2174,7 @@ export interface MessageStopEvent {
|
|
|
2174
2174
|
* <p>The additional model response fields.</p>
|
|
2175
2175
|
* @public
|
|
2176
2176
|
*/
|
|
2177
|
-
additionalModelResponseFields?: __DocumentType;
|
|
2177
|
+
additionalModelResponseFields?: __DocumentType | undefined;
|
|
2178
2178
|
}
|
|
2179
2179
|
/**
|
|
2180
2180
|
* <p>Metrics for the stream.</p>
|
|
@@ -2196,7 +2196,7 @@ export interface ConverseStreamTrace {
|
|
|
2196
2196
|
* <p>The guardrail trace object. </p>
|
|
2197
2197
|
* @public
|
|
2198
2198
|
*/
|
|
2199
|
-
guardrail?: GuardrailTraceAssessment;
|
|
2199
|
+
guardrail?: GuardrailTraceAssessment | undefined;
|
|
2200
2200
|
}
|
|
2201
2201
|
/**
|
|
2202
2202
|
* <p>A conversation stream metadata event.</p>
|
|
@@ -2217,7 +2217,7 @@ export interface ConverseStreamMetadataEvent {
|
|
|
2217
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>
|
|
2218
2218
|
* @public
|
|
2219
2219
|
*/
|
|
2220
|
-
trace?: ConverseStreamTrace;
|
|
2220
|
+
trace?: ConverseStreamTrace | undefined;
|
|
2221
2221
|
}
|
|
2222
2222
|
/**
|
|
2223
2223
|
* <p>An error occurred while streaming the response. Retry your request.</p>
|
|
@@ -2230,12 +2230,12 @@ export declare class ModelStreamErrorException extends __BaseException {
|
|
|
2230
2230
|
* <p>The original status code.</p>
|
|
2231
2231
|
* @public
|
|
2232
2232
|
*/
|
|
2233
|
-
originalStatusCode?: number;
|
|
2233
|
+
originalStatusCode?: number | undefined;
|
|
2234
2234
|
/**
|
|
2235
2235
|
* <p>The original message.</p>
|
|
2236
2236
|
* @public
|
|
2237
2237
|
*/
|
|
2238
|
-
originalMessage?: string;
|
|
2238
|
+
originalMessage?: string | undefined;
|
|
2239
2239
|
/**
|
|
2240
2240
|
* @internal
|
|
2241
2241
|
*/
|
|
@@ -2489,7 +2489,7 @@ export interface ConverseStreamResponse {
|
|
|
2489
2489
|
* <p>The output stream that the model generated.</p>
|
|
2490
2490
|
* @public
|
|
2491
2491
|
*/
|
|
2492
|
-
stream?: AsyncIterable<ConverseStreamOutput
|
|
2492
|
+
stream?: AsyncIterable<ConverseStreamOutput> | undefined;
|
|
2493
2493
|
}
|
|
2494
2494
|
/**
|
|
2495
2495
|
* @public
|
|
@@ -2511,18 +2511,18 @@ export interface InvokeModelRequest {
|
|
|
2511
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>
|
|
2512
2512
|
* @public
|
|
2513
2513
|
*/
|
|
2514
|
-
body?: Uint8Array;
|
|
2514
|
+
body?: Uint8Array | undefined;
|
|
2515
2515
|
/**
|
|
2516
2516
|
* <p>The MIME type of the input data in the request. You must specify
|
|
2517
2517
|
* <code>application/json</code>.</p>
|
|
2518
2518
|
* @public
|
|
2519
2519
|
*/
|
|
2520
|
-
contentType?: string;
|
|
2520
|
+
contentType?: string | undefined;
|
|
2521
2521
|
/**
|
|
2522
2522
|
* <p>The desired MIME type of the inference body in the response. The default value is <code>application/json</code>.</p>
|
|
2523
2523
|
* @public
|
|
2524
2524
|
*/
|
|
2525
|
-
accept?: string;
|
|
2525
|
+
accept?: string | undefined;
|
|
2526
2526
|
/**
|
|
2527
2527
|
* <p>The unique identifier of the model to invoke to run inference.</p>
|
|
2528
2528
|
* <p>The <code>modelId</code> to provide depends on the type of model that you use:</p>
|
|
@@ -2547,7 +2547,7 @@ export interface InvokeModelRequest {
|
|
|
2547
2547
|
* <p>Specifies whether to enable or disable the Bedrock trace. If enabled, you can see the full Bedrock trace.</p>
|
|
2548
2548
|
* @public
|
|
2549
2549
|
*/
|
|
2550
|
-
trace?: Trace;
|
|
2550
|
+
trace?: Trace | undefined;
|
|
2551
2551
|
/**
|
|
2552
2552
|
* <p>The unique identifier of the guardrail that you want to use. If you don't provide a value, no guardrail is applied
|
|
2553
2553
|
* to the invocation.</p>
|
|
@@ -2565,12 +2565,12 @@ export interface InvokeModelRequest {
|
|
|
2565
2565
|
* </ul>
|
|
2566
2566
|
* @public
|
|
2567
2567
|
*/
|
|
2568
|
-
guardrailIdentifier?: string;
|
|
2568
|
+
guardrailIdentifier?: string | undefined;
|
|
2569
2569
|
/**
|
|
2570
2570
|
* <p>The version number for the guardrail. The value can also be <code>DRAFT</code>.</p>
|
|
2571
2571
|
* @public
|
|
2572
2572
|
*/
|
|
2573
|
-
guardrailVersion?: string;
|
|
2573
|
+
guardrailVersion?: string | undefined;
|
|
2574
2574
|
}
|
|
2575
2575
|
/**
|
|
2576
2576
|
* @public
|
|
@@ -2595,19 +2595,19 @@ export interface InvokeModelWithResponseStreamRequest {
|
|
|
2595
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>
|
|
2596
2596
|
* @public
|
|
2597
2597
|
*/
|
|
2598
|
-
body?: Uint8Array;
|
|
2598
|
+
body?: Uint8Array | undefined;
|
|
2599
2599
|
/**
|
|
2600
2600
|
* <p>The MIME type of the input data in the request. You must specify
|
|
2601
2601
|
* <code>application/json</code>.</p>
|
|
2602
2602
|
* @public
|
|
2603
2603
|
*/
|
|
2604
|
-
contentType?: string;
|
|
2604
|
+
contentType?: string | undefined;
|
|
2605
2605
|
/**
|
|
2606
2606
|
* <p>The desired MIME type of the inference body in the response. The default value is
|
|
2607
2607
|
* <code>application/json</code>.</p>
|
|
2608
2608
|
* @public
|
|
2609
2609
|
*/
|
|
2610
|
-
accept?: string;
|
|
2610
|
+
accept?: string | undefined;
|
|
2611
2611
|
/**
|
|
2612
2612
|
* <p>The unique identifier of the model to invoke to run inference.</p>
|
|
2613
2613
|
* <p>The <code>modelId</code> to provide depends on the type of model that you use:</p>
|
|
@@ -2632,7 +2632,7 @@ export interface InvokeModelWithResponseStreamRequest {
|
|
|
2632
2632
|
* <p>Specifies whether to enable or disable the Bedrock trace. If enabled, you can see the full Bedrock trace.</p>
|
|
2633
2633
|
* @public
|
|
2634
2634
|
*/
|
|
2635
|
-
trace?: Trace;
|
|
2635
|
+
trace?: Trace | undefined;
|
|
2636
2636
|
/**
|
|
2637
2637
|
* <p>The unique identifier of the guardrail that you want to use. If you don't provide a value, no guardrail is applied
|
|
2638
2638
|
* to the invocation.</p>
|
|
@@ -2650,12 +2650,12 @@ export interface InvokeModelWithResponseStreamRequest {
|
|
|
2650
2650
|
* </ul>
|
|
2651
2651
|
* @public
|
|
2652
2652
|
*/
|
|
2653
|
-
guardrailIdentifier?: string;
|
|
2653
|
+
guardrailIdentifier?: string | undefined;
|
|
2654
2654
|
/**
|
|
2655
2655
|
* <p>The version number for the guardrail. The value can also be <code>DRAFT</code>.</p>
|
|
2656
2656
|
* @public
|
|
2657
2657
|
*/
|
|
2658
|
-
guardrailVersion?: string;
|
|
2658
|
+
guardrailVersion?: string | undefined;
|
|
2659
2659
|
}
|
|
2660
2660
|
/**
|
|
2661
2661
|
* <p>Payload content included in the response.</p>
|
|
@@ -2666,7 +2666,7 @@ export interface PayloadPart {
|
|
|
2666
2666
|
* <p>Base64-encoded bytes of payload data.</p>
|
|
2667
2667
|
* @public
|
|
2668
2668
|
*/
|
|
2669
|
-
bytes?: Uint8Array;
|
|
2669
|
+
bytes?: Uint8Array | undefined;
|
|
2670
2670
|
}
|
|
2671
2671
|
/**
|
|
2672
2672
|
* <p>Definition of content in the response stream.</p>
|
|
@@ -17,7 +17,7 @@ export type GuardrailContentQualifier =
|
|
|
17
17
|
(typeof GuardrailContentQualifier)[keyof typeof GuardrailContentQualifier];
|
|
18
18
|
export interface GuardrailTextBlock {
|
|
19
19
|
text: string | undefined;
|
|
20
|
-
qualifiers?: GuardrailContentQualifier[];
|
|
20
|
+
qualifiers?: GuardrailContentQualifier[] | undefined;
|
|
21
21
|
}
|
|
22
22
|
export type GuardrailContentBlock =
|
|
23
23
|
| GuardrailContentBlock.TextMember
|
|
@@ -89,7 +89,7 @@ export type GuardrailContentFilterType =
|
|
|
89
89
|
export interface GuardrailContentFilter {
|
|
90
90
|
type: GuardrailContentFilterType | undefined;
|
|
91
91
|
confidence: GuardrailContentFilterConfidence | undefined;
|
|
92
|
-
filterStrength?: GuardrailContentFilterStrength;
|
|
92
|
+
filterStrength?: GuardrailContentFilterStrength | undefined;
|
|
93
93
|
action: GuardrailContentPolicyAction | undefined;
|
|
94
94
|
}
|
|
95
95
|
export interface GuardrailContentPolicyAssessment {
|
|
@@ -114,14 +114,14 @@ export interface GuardrailContextualGroundingFilter {
|
|
|
114
114
|
action: GuardrailContextualGroundingPolicyAction | undefined;
|
|
115
115
|
}
|
|
116
116
|
export interface GuardrailContextualGroundingPolicyAssessment {
|
|
117
|
-
filters?: GuardrailContextualGroundingFilter[];
|
|
117
|
+
filters?: GuardrailContextualGroundingFilter[] | undefined;
|
|
118
118
|
}
|
|
119
119
|
export interface GuardrailTextCharactersCoverage {
|
|
120
|
-
guarded?: number;
|
|
121
|
-
total?: number;
|
|
120
|
+
guarded?: number | undefined;
|
|
121
|
+
total?: number | undefined;
|
|
122
122
|
}
|
|
123
123
|
export interface GuardrailCoverage {
|
|
124
|
-
textCharacters?: GuardrailTextCharactersCoverage;
|
|
124
|
+
textCharacters?: GuardrailTextCharactersCoverage | undefined;
|
|
125
125
|
}
|
|
126
126
|
export interface GuardrailUsage {
|
|
127
127
|
topicPolicyUnits: number | undefined;
|
|
@@ -132,9 +132,9 @@ export interface GuardrailUsage {
|
|
|
132
132
|
contextualGroundingPolicyUnits: number | undefined;
|
|
133
133
|
}
|
|
134
134
|
export interface GuardrailInvocationMetrics {
|
|
135
|
-
guardrailProcessingLatency?: number;
|
|
136
|
-
usage?: GuardrailUsage;
|
|
137
|
-
guardrailCoverage?: GuardrailCoverage;
|
|
135
|
+
guardrailProcessingLatency?: number | undefined;
|
|
136
|
+
usage?: GuardrailUsage | undefined;
|
|
137
|
+
guardrailCoverage?: GuardrailCoverage | undefined;
|
|
138
138
|
}
|
|
139
139
|
export declare const GuardrailSensitiveInformationPolicyAction: {
|
|
140
140
|
readonly ANONYMIZED: "ANONYMIZED";
|
|
@@ -183,9 +183,9 @@ export interface GuardrailPiiEntityFilter {
|
|
|
183
183
|
action: GuardrailSensitiveInformationPolicyAction | undefined;
|
|
184
184
|
}
|
|
185
185
|
export interface GuardrailRegexFilter {
|
|
186
|
-
name?: string;
|
|
187
|
-
match?: string;
|
|
188
|
-
regex?: string;
|
|
186
|
+
name?: string | undefined;
|
|
187
|
+
match?: string | undefined;
|
|
188
|
+
regex?: string | undefined;
|
|
189
189
|
action: GuardrailSensitiveInformationPolicyAction | undefined;
|
|
190
190
|
}
|
|
191
191
|
export interface GuardrailSensitiveInformationPolicyAssessment {
|
|
@@ -234,22 +234,26 @@ export interface GuardrailWordPolicyAssessment {
|
|
|
234
234
|
managedWordLists: GuardrailManagedWord[] | undefined;
|
|
235
235
|
}
|
|
236
236
|
export interface GuardrailAssessment {
|
|
237
|
-
topicPolicy?: GuardrailTopicPolicyAssessment;
|
|
238
|
-
contentPolicy?: GuardrailContentPolicyAssessment;
|
|
239
|
-
wordPolicy?: GuardrailWordPolicyAssessment;
|
|
240
|
-
sensitiveInformationPolicy?:
|
|
241
|
-
|
|
242
|
-
|
|
237
|
+
topicPolicy?: GuardrailTopicPolicyAssessment | undefined;
|
|
238
|
+
contentPolicy?: GuardrailContentPolicyAssessment | undefined;
|
|
239
|
+
wordPolicy?: GuardrailWordPolicyAssessment | undefined;
|
|
240
|
+
sensitiveInformationPolicy?:
|
|
241
|
+
| GuardrailSensitiveInformationPolicyAssessment
|
|
242
|
+
| undefined;
|
|
243
|
+
contextualGroundingPolicy?:
|
|
244
|
+
| GuardrailContextualGroundingPolicyAssessment
|
|
245
|
+
| undefined;
|
|
246
|
+
invocationMetrics?: GuardrailInvocationMetrics | undefined;
|
|
243
247
|
}
|
|
244
248
|
export interface GuardrailOutputContent {
|
|
245
|
-
text?: string;
|
|
249
|
+
text?: string | undefined;
|
|
246
250
|
}
|
|
247
251
|
export interface ApplyGuardrailResponse {
|
|
248
252
|
usage: GuardrailUsage | undefined;
|
|
249
253
|
action: GuardrailAction | undefined;
|
|
250
254
|
outputs: GuardrailOutputContent[] | undefined;
|
|
251
255
|
assessments: GuardrailAssessment[] | undefined;
|
|
252
|
-
guardrailCoverage?: GuardrailCoverage;
|
|
256
|
+
guardrailCoverage?: GuardrailCoverage | undefined;
|
|
253
257
|
}
|
|
254
258
|
export declare class InternalServerException extends __BaseException {
|
|
255
259
|
readonly name: "InternalServerException";
|
|
@@ -295,13 +299,13 @@ export type GuardrailTrace =
|
|
|
295
299
|
export interface GuardrailConfiguration {
|
|
296
300
|
guardrailIdentifier: string | undefined;
|
|
297
301
|
guardrailVersion: string | undefined;
|
|
298
|
-
trace?: GuardrailTrace;
|
|
302
|
+
trace?: GuardrailTrace | undefined;
|
|
299
303
|
}
|
|
300
304
|
export interface InferenceConfiguration {
|
|
301
|
-
maxTokens?: number;
|
|
302
|
-
temperature?: number;
|
|
303
|
-
topP?: number;
|
|
304
|
-
stopSequences?: string[];
|
|
305
|
+
maxTokens?: number | undefined;
|
|
306
|
+
temperature?: number | undefined;
|
|
307
|
+
topP?: number | undefined;
|
|
308
|
+
stopSequences?: string[] | undefined;
|
|
305
309
|
}
|
|
306
310
|
export declare const DocumentFormat: {
|
|
307
311
|
readonly CSV: "csv";
|
|
@@ -348,7 +352,7 @@ export type GuardrailConverseContentQualifier =
|
|
|
348
352
|
(typeof GuardrailConverseContentQualifier)[keyof typeof GuardrailConverseContentQualifier];
|
|
349
353
|
export interface GuardrailConverseTextBlock {
|
|
350
354
|
text: string | undefined;
|
|
351
|
-
qualifiers?: GuardrailConverseContentQualifier[];
|
|
355
|
+
qualifiers?: GuardrailConverseContentQualifier[] | undefined;
|
|
352
356
|
}
|
|
353
357
|
export type GuardrailConverseContentBlock =
|
|
354
358
|
| GuardrailConverseContentBlock.TextMember
|
|
@@ -458,7 +462,7 @@ export type ToolResultStatus =
|
|
|
458
462
|
export interface ToolResultBlock {
|
|
459
463
|
toolUseId: string | undefined;
|
|
460
464
|
content: ToolResultContentBlock[] | undefined;
|
|
461
|
-
status?: ToolResultStatus;
|
|
465
|
+
status?: ToolResultStatus | undefined;
|
|
462
466
|
}
|
|
463
467
|
export interface ToolUseBlock {
|
|
464
468
|
toolUseId: string | undefined;
|
|
@@ -666,7 +670,7 @@ export declare namespace ToolInputSchema {
|
|
|
666
670
|
}
|
|
667
671
|
export interface ToolSpecification {
|
|
668
672
|
name: string | undefined;
|
|
669
|
-
description?: string;
|
|
673
|
+
description?: string | undefined;
|
|
670
674
|
inputSchema: ToolInputSchema | undefined;
|
|
671
675
|
}
|
|
672
676
|
export type Tool = Tool.ToolSpecMember | Tool.$UnknownMember;
|
|
@@ -687,18 +691,18 @@ export declare namespace Tool {
|
|
|
687
691
|
}
|
|
688
692
|
export interface ToolConfiguration {
|
|
689
693
|
tools: Tool[] | undefined;
|
|
690
|
-
toolChoice?: ToolChoice;
|
|
694
|
+
toolChoice?: ToolChoice | undefined;
|
|
691
695
|
}
|
|
692
696
|
export interface ConverseRequest {
|
|
693
697
|
modelId: string | undefined;
|
|
694
|
-
messages?: Message[];
|
|
695
|
-
system?: SystemContentBlock[];
|
|
696
|
-
inferenceConfig?: InferenceConfiguration;
|
|
697
|
-
toolConfig?: ToolConfiguration;
|
|
698
|
-
guardrailConfig?: GuardrailConfiguration;
|
|
699
|
-
additionalModelRequestFields?: __DocumentType;
|
|
700
|
-
promptVariables?: Record<string, PromptVariableValues
|
|
701
|
-
additionalModelResponseFieldPaths?: string[];
|
|
698
|
+
messages?: Message[] | undefined;
|
|
699
|
+
system?: SystemContentBlock[] | undefined;
|
|
700
|
+
inferenceConfig?: InferenceConfiguration | undefined;
|
|
701
|
+
toolConfig?: ToolConfiguration | undefined;
|
|
702
|
+
guardrailConfig?: GuardrailConfiguration | undefined;
|
|
703
|
+
additionalModelRequestFields?: __DocumentType | undefined;
|
|
704
|
+
promptVariables?: Record<string, PromptVariableValues> | undefined;
|
|
705
|
+
additionalModelResponseFieldPaths?: string[] | undefined;
|
|
702
706
|
}
|
|
703
707
|
export interface ConverseMetrics {
|
|
704
708
|
latencyMs: number | undefined;
|
|
@@ -731,12 +735,12 @@ export declare const StopReason: {
|
|
|
731
735
|
};
|
|
732
736
|
export type StopReason = (typeof StopReason)[keyof typeof StopReason];
|
|
733
737
|
export interface GuardrailTraceAssessment {
|
|
734
|
-
modelOutput?: string[];
|
|
735
|
-
inputAssessment?: Record<string, GuardrailAssessment
|
|
736
|
-
outputAssessments?: Record<string, GuardrailAssessment[]
|
|
738
|
+
modelOutput?: string[] | undefined;
|
|
739
|
+
inputAssessment?: Record<string, GuardrailAssessment> | undefined;
|
|
740
|
+
outputAssessments?: Record<string, GuardrailAssessment[]> | undefined;
|
|
737
741
|
}
|
|
738
742
|
export interface ConverseTrace {
|
|
739
|
-
guardrail?: GuardrailTraceAssessment;
|
|
743
|
+
guardrail?: GuardrailTraceAssessment | undefined;
|
|
740
744
|
}
|
|
741
745
|
export interface TokenUsage {
|
|
742
746
|
inputTokens: number | undefined;
|
|
@@ -748,14 +752,14 @@ export interface ConverseResponse {
|
|
|
748
752
|
stopReason: StopReason | undefined;
|
|
749
753
|
usage: TokenUsage | undefined;
|
|
750
754
|
metrics: ConverseMetrics | undefined;
|
|
751
|
-
additionalModelResponseFields?: __DocumentType;
|
|
752
|
-
trace?: ConverseTrace;
|
|
755
|
+
additionalModelResponseFields?: __DocumentType | undefined;
|
|
756
|
+
trace?: ConverseTrace | undefined;
|
|
753
757
|
}
|
|
754
758
|
export declare class ModelErrorException extends __BaseException {
|
|
755
759
|
readonly name: "ModelErrorException";
|
|
756
760
|
readonly $fault: "client";
|
|
757
|
-
originalStatusCode?: number;
|
|
758
|
-
resourceName?: string;
|
|
761
|
+
originalStatusCode?: number | undefined;
|
|
762
|
+
resourceName?: string | undefined;
|
|
759
763
|
constructor(
|
|
760
764
|
opts: __ExceptionOptionType<ModelErrorException, __BaseException>
|
|
761
765
|
);
|
|
@@ -791,19 +795,19 @@ export type GuardrailStreamProcessingMode =
|
|
|
791
795
|
export interface GuardrailStreamConfiguration {
|
|
792
796
|
guardrailIdentifier: string | undefined;
|
|
793
797
|
guardrailVersion: string | undefined;
|
|
794
|
-
trace?: GuardrailTrace;
|
|
795
|
-
streamProcessingMode?: GuardrailStreamProcessingMode;
|
|
798
|
+
trace?: GuardrailTrace | undefined;
|
|
799
|
+
streamProcessingMode?: GuardrailStreamProcessingMode | undefined;
|
|
796
800
|
}
|
|
797
801
|
export interface ConverseStreamRequest {
|
|
798
802
|
modelId: string | undefined;
|
|
799
|
-
messages?: Message[];
|
|
800
|
-
system?: SystemContentBlock[];
|
|
801
|
-
inferenceConfig?: InferenceConfiguration;
|
|
802
|
-
toolConfig?: ToolConfiguration;
|
|
803
|
-
guardrailConfig?: GuardrailStreamConfiguration;
|
|
804
|
-
additionalModelRequestFields?: __DocumentType;
|
|
805
|
-
promptVariables?: Record<string, PromptVariableValues
|
|
806
|
-
additionalModelResponseFieldPaths?: string[];
|
|
803
|
+
messages?: Message[] | undefined;
|
|
804
|
+
system?: SystemContentBlock[] | undefined;
|
|
805
|
+
inferenceConfig?: InferenceConfiguration | undefined;
|
|
806
|
+
toolConfig?: ToolConfiguration | undefined;
|
|
807
|
+
guardrailConfig?: GuardrailStreamConfiguration | undefined;
|
|
808
|
+
additionalModelRequestFields?: __DocumentType | undefined;
|
|
809
|
+
promptVariables?: Record<string, PromptVariableValues> | undefined;
|
|
810
|
+
additionalModelResponseFieldPaths?: string[] | undefined;
|
|
807
811
|
}
|
|
808
812
|
export interface ToolUseBlockDelta {
|
|
809
813
|
input: string | undefined;
|
|
@@ -873,24 +877,24 @@ export interface MessageStartEvent {
|
|
|
873
877
|
}
|
|
874
878
|
export interface MessageStopEvent {
|
|
875
879
|
stopReason: StopReason | undefined;
|
|
876
|
-
additionalModelResponseFields?: __DocumentType;
|
|
880
|
+
additionalModelResponseFields?: __DocumentType | undefined;
|
|
877
881
|
}
|
|
878
882
|
export interface ConverseStreamMetrics {
|
|
879
883
|
latencyMs: number | undefined;
|
|
880
884
|
}
|
|
881
885
|
export interface ConverseStreamTrace {
|
|
882
|
-
guardrail?: GuardrailTraceAssessment;
|
|
886
|
+
guardrail?: GuardrailTraceAssessment | undefined;
|
|
883
887
|
}
|
|
884
888
|
export interface ConverseStreamMetadataEvent {
|
|
885
889
|
usage: TokenUsage | undefined;
|
|
886
890
|
metrics: ConverseStreamMetrics | undefined;
|
|
887
|
-
trace?: ConverseStreamTrace;
|
|
891
|
+
trace?: ConverseStreamTrace | undefined;
|
|
888
892
|
}
|
|
889
893
|
export declare class ModelStreamErrorException extends __BaseException {
|
|
890
894
|
readonly name: "ModelStreamErrorException";
|
|
891
895
|
readonly $fault: "client";
|
|
892
|
-
originalStatusCode?: number;
|
|
893
|
-
originalMessage?: string;
|
|
896
|
+
originalStatusCode?: number | undefined;
|
|
897
|
+
originalMessage?: string | undefined;
|
|
894
898
|
constructor(
|
|
895
899
|
opts: __ExceptionOptionType<ModelStreamErrorException, __BaseException>
|
|
896
900
|
);
|
|
@@ -1094,7 +1098,7 @@ export declare namespace ConverseStreamOutput {
|
|
|
1094
1098
|
const visit: <T>(value: ConverseStreamOutput, visitor: Visitor<T>) => T;
|
|
1095
1099
|
}
|
|
1096
1100
|
export interface ConverseStreamResponse {
|
|
1097
|
-
stream?: AsyncIterable<ConverseStreamOutput
|
|
1101
|
+
stream?: AsyncIterable<ConverseStreamOutput> | undefined;
|
|
1098
1102
|
}
|
|
1099
1103
|
export declare const Trace: {
|
|
1100
1104
|
readonly DISABLED: "DISABLED";
|
|
@@ -1102,29 +1106,29 @@ export declare const Trace: {
|
|
|
1102
1106
|
};
|
|
1103
1107
|
export type Trace = (typeof Trace)[keyof typeof Trace];
|
|
1104
1108
|
export interface InvokeModelRequest {
|
|
1105
|
-
body?: Uint8Array;
|
|
1106
|
-
contentType?: string;
|
|
1107
|
-
accept?: string;
|
|
1109
|
+
body?: Uint8Array | undefined;
|
|
1110
|
+
contentType?: string | undefined;
|
|
1111
|
+
accept?: string | undefined;
|
|
1108
1112
|
modelId: string | undefined;
|
|
1109
|
-
trace?: Trace;
|
|
1110
|
-
guardrailIdentifier?: string;
|
|
1111
|
-
guardrailVersion?: string;
|
|
1113
|
+
trace?: Trace | undefined;
|
|
1114
|
+
guardrailIdentifier?: string | undefined;
|
|
1115
|
+
guardrailVersion?: string | undefined;
|
|
1112
1116
|
}
|
|
1113
1117
|
export interface InvokeModelResponse {
|
|
1114
1118
|
body: Uint8Array | undefined;
|
|
1115
1119
|
contentType: string | undefined;
|
|
1116
1120
|
}
|
|
1117
1121
|
export interface InvokeModelWithResponseStreamRequest {
|
|
1118
|
-
body?: Uint8Array;
|
|
1119
|
-
contentType?: string;
|
|
1120
|
-
accept?: string;
|
|
1122
|
+
body?: Uint8Array | undefined;
|
|
1123
|
+
contentType?: string | undefined;
|
|
1124
|
+
accept?: string | undefined;
|
|
1121
1125
|
modelId: string | undefined;
|
|
1122
|
-
trace?: Trace;
|
|
1123
|
-
guardrailIdentifier?: string;
|
|
1124
|
-
guardrailVersion?: string;
|
|
1126
|
+
trace?: Trace | undefined;
|
|
1127
|
+
guardrailIdentifier?: string | undefined;
|
|
1128
|
+
guardrailVersion?: string | undefined;
|
|
1125
1129
|
}
|
|
1126
1130
|
export interface PayloadPart {
|
|
1127
|
-
bytes?: Uint8Array;
|
|
1131
|
+
bytes?: Uint8Array | undefined;
|
|
1128
1132
|
}
|
|
1129
1133
|
export type ResponseStream =
|
|
1130
1134
|
| ResponseStream.ChunkMember
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-bedrock-runtime",
|
|
3
3
|
"description": "AWS SDK for JavaScript Bedrock Runtime Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.691.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline client-bedrock-runtime",
|
|
@@ -20,19 +20,19 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
22
22
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
23
|
-
"@aws-sdk/client-sso-oidc": "3.
|
|
24
|
-
"@aws-sdk/client-sts": "3.
|
|
25
|
-
"@aws-sdk/core": "3.
|
|
26
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
23
|
+
"@aws-sdk/client-sso-oidc": "3.691.0",
|
|
24
|
+
"@aws-sdk/client-sts": "3.691.0",
|
|
25
|
+
"@aws-sdk/core": "3.691.0",
|
|
26
|
+
"@aws-sdk/credential-provider-node": "3.691.0",
|
|
27
27
|
"@aws-sdk/middleware-host-header": "3.686.0",
|
|
28
28
|
"@aws-sdk/middleware-logger": "3.686.0",
|
|
29
29
|
"@aws-sdk/middleware-recursion-detection": "3.686.0",
|
|
30
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
30
|
+
"@aws-sdk/middleware-user-agent": "3.691.0",
|
|
31
31
|
"@aws-sdk/region-config-resolver": "3.686.0",
|
|
32
32
|
"@aws-sdk/types": "3.686.0",
|
|
33
33
|
"@aws-sdk/util-endpoints": "3.686.0",
|
|
34
34
|
"@aws-sdk/util-user-agent-browser": "3.686.0",
|
|
35
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
35
|
+
"@aws-sdk/util-user-agent-node": "3.691.0",
|
|
36
36
|
"@smithy/config-resolver": "^3.0.10",
|
|
37
37
|
"@smithy/core": "^2.5.1",
|
|
38
38
|
"@smithy/eventstream-serde-browser": "^3.0.11",
|