@aws-sdk/client-bedrock-runtime 3.918.0 → 3.920.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.
- package/dist-cjs/endpoint/ruleset.js +1 -1
- package/dist-cjs/index.js +32 -0
- package/dist-es/endpoint/ruleset.js +1 -1
- package/dist-es/models/models_0.js +21 -0
- package/dist-es/protocols/Aws_restJson1.js +10 -0
- package/dist-types/commands/ConverseCommand.d.ts +15 -0
- package/dist-types/commands/ConverseStreamCommand.d.ts +24 -0
- package/dist-types/commands/CountTokensCommand.d.ts +6 -0
- package/dist-types/models/models_0.d.ts +199 -35
- package/dist-types/runtimeConfig.d.ts +1 -1
- package/dist-types/ts3.4/models/models_0.d.ts +85 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +1 -3
- package/package.json +16 -16
|
@@ -1391,7 +1391,7 @@ export interface GuardrailRegexFilter {
|
|
|
1391
1391
|
detected?: boolean | undefined;
|
|
1392
1392
|
}
|
|
1393
1393
|
/**
|
|
1394
|
-
* <p>The assessment for
|
|
1394
|
+
* <p>The assessment for a Personally Identifiable Information (PII) policy. </p>
|
|
1395
1395
|
* @public
|
|
1396
1396
|
*/
|
|
1397
1397
|
export interface GuardrailSensitiveInformationPolicyAssessment {
|
|
@@ -1784,20 +1784,48 @@ export interface DocumentPageLocation {
|
|
|
1784
1784
|
*/
|
|
1785
1785
|
end?: number | undefined;
|
|
1786
1786
|
}
|
|
1787
|
+
/**
|
|
1788
|
+
* <p>Provides the URL and domain information for the website that was cited when performing a web search.</p>
|
|
1789
|
+
* @public
|
|
1790
|
+
*/
|
|
1791
|
+
export interface WebLocation {
|
|
1792
|
+
/**
|
|
1793
|
+
* <p>The URL that was cited when performing a web search.</p>
|
|
1794
|
+
* @public
|
|
1795
|
+
*/
|
|
1796
|
+
url?: string | undefined;
|
|
1797
|
+
/**
|
|
1798
|
+
* <p>The domain that was cited when performing a web search.</p>
|
|
1799
|
+
* @public
|
|
1800
|
+
*/
|
|
1801
|
+
domain?: string | undefined;
|
|
1802
|
+
}
|
|
1787
1803
|
/**
|
|
1788
1804
|
* <p>Specifies the precise location within a source document where cited content can be found. This can include character-level positions, page numbers, or document chunks depending on the document type and indexing method.</p>
|
|
1789
1805
|
* @public
|
|
1790
1806
|
*/
|
|
1791
|
-
export type CitationLocation = CitationLocation.DocumentCharMember | CitationLocation.DocumentChunkMember | CitationLocation.DocumentPageMember | CitationLocation.$UnknownMember;
|
|
1807
|
+
export type CitationLocation = CitationLocation.DocumentCharMember | CitationLocation.DocumentChunkMember | CitationLocation.DocumentPageMember | CitationLocation.WebMember | CitationLocation.$UnknownMember;
|
|
1792
1808
|
/**
|
|
1793
1809
|
* @public
|
|
1794
1810
|
*/
|
|
1795
1811
|
export declare namespace CitationLocation {
|
|
1812
|
+
/**
|
|
1813
|
+
* <p>The web URL that was cited for this reference.</p>
|
|
1814
|
+
* @public
|
|
1815
|
+
*/
|
|
1816
|
+
interface WebMember {
|
|
1817
|
+
web: WebLocation;
|
|
1818
|
+
documentChar?: never;
|
|
1819
|
+
documentPage?: never;
|
|
1820
|
+
documentChunk?: never;
|
|
1821
|
+
$unknown?: never;
|
|
1822
|
+
}
|
|
1796
1823
|
/**
|
|
1797
1824
|
* <p>The character-level location within the document where the cited content is found.</p>
|
|
1798
1825
|
* @public
|
|
1799
1826
|
*/
|
|
1800
1827
|
interface DocumentCharMember {
|
|
1828
|
+
web?: never;
|
|
1801
1829
|
documentChar: DocumentCharLocation;
|
|
1802
1830
|
documentPage?: never;
|
|
1803
1831
|
documentChunk?: never;
|
|
@@ -1808,6 +1836,7 @@ export declare namespace CitationLocation {
|
|
|
1808
1836
|
* @public
|
|
1809
1837
|
*/
|
|
1810
1838
|
interface DocumentPageMember {
|
|
1839
|
+
web?: never;
|
|
1811
1840
|
documentChar?: never;
|
|
1812
1841
|
documentPage: DocumentPageLocation;
|
|
1813
1842
|
documentChunk?: never;
|
|
@@ -1818,6 +1847,7 @@ export declare namespace CitationLocation {
|
|
|
1818
1847
|
* @public
|
|
1819
1848
|
*/
|
|
1820
1849
|
interface DocumentChunkMember {
|
|
1850
|
+
web?: never;
|
|
1821
1851
|
documentChar?: never;
|
|
1822
1852
|
documentPage?: never;
|
|
1823
1853
|
documentChunk: DocumentChunkLocation;
|
|
@@ -1827,12 +1857,14 @@ export declare namespace CitationLocation {
|
|
|
1827
1857
|
* @public
|
|
1828
1858
|
*/
|
|
1829
1859
|
interface $UnknownMember {
|
|
1860
|
+
web?: never;
|
|
1830
1861
|
documentChar?: never;
|
|
1831
1862
|
documentPage?: never;
|
|
1832
1863
|
documentChunk?: never;
|
|
1833
1864
|
$unknown: [string, any];
|
|
1834
1865
|
}
|
|
1835
1866
|
interface Visitor<T> {
|
|
1867
|
+
web: (value: WebLocation) => T;
|
|
1836
1868
|
documentChar: (value: DocumentCharLocation) => T;
|
|
1837
1869
|
documentPage: (value: DocumentPageLocation) => T;
|
|
1838
1870
|
documentChunk: (value: DocumentChunkLocation) => T;
|
|
@@ -1943,7 +1975,7 @@ export interface CitationsContentBlock {
|
|
|
1943
1975
|
*/
|
|
1944
1976
|
export interface CitationsConfig {
|
|
1945
1977
|
/**
|
|
1946
|
-
* <p>Specifies whether document
|
|
1978
|
+
* <p>Specifies whether citations from the selected document should be used in the model's response. When set to true, the model can generate citations that reference the source documents used to inform the response.</p>
|
|
1947
1979
|
* @public
|
|
1948
1980
|
*/
|
|
1949
1981
|
enabled: boolean | undefined;
|
|
@@ -2188,7 +2220,7 @@ export declare const GuardrailConverseContentQualifier: {
|
|
|
2188
2220
|
*/
|
|
2189
2221
|
export type GuardrailConverseContentQualifier = (typeof GuardrailConverseContentQualifier)[keyof typeof GuardrailConverseContentQualifier];
|
|
2190
2222
|
/**
|
|
2191
|
-
* <p>A text block that contains text that you want to assess with a guardrail. For more information, see <a>GuardrailConverseContentBlock</a>.</p>
|
|
2223
|
+
* <p>A text block that contains text that you want to assess with a guardrail. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_GuardrailConverseContentBlock.html">GuardrailConverseContentBlock</a>.</p>
|
|
2192
2224
|
* @public
|
|
2193
2225
|
*/
|
|
2194
2226
|
export interface GuardrailConverseTextBlock {
|
|
@@ -2453,7 +2485,7 @@ export interface VideoBlock {
|
|
|
2453
2485
|
source: VideoSource | undefined;
|
|
2454
2486
|
}
|
|
2455
2487
|
/**
|
|
2456
|
-
* <p>The tool result content block.</p>
|
|
2488
|
+
* <p>The tool result content block. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/tool-use.html">Call a tool with the Converse API</a> in the Amazon Bedrock User Guide.</p>
|
|
2457
2489
|
* @public
|
|
2458
2490
|
*/
|
|
2459
2491
|
export type ToolResultContentBlock = ToolResultContentBlock.DocumentMember | ToolResultContentBlock.ImageMember | ToolResultContentBlock.JsonMember | ToolResultContentBlock.TextMember | ToolResultContentBlock.VideoMember | ToolResultContentBlock.$UnknownMember;
|
|
@@ -2462,7 +2494,7 @@ export type ToolResultContentBlock = ToolResultContentBlock.DocumentMember | Too
|
|
|
2462
2494
|
*/
|
|
2463
2495
|
export declare namespace ToolResultContentBlock {
|
|
2464
2496
|
/**
|
|
2465
|
-
* <p>A tool result that is JSON format data
|
|
2497
|
+
* <p>A tool result that is JSON format data. </p>
|
|
2466
2498
|
* @public
|
|
2467
2499
|
*/
|
|
2468
2500
|
interface JsonMember {
|
|
@@ -2474,7 +2506,7 @@ export declare namespace ToolResultContentBlock {
|
|
|
2474
2506
|
$unknown?: never;
|
|
2475
2507
|
}
|
|
2476
2508
|
/**
|
|
2477
|
-
* <p>A tool result that is text
|
|
2509
|
+
* <p>A tool result that is text. </p>
|
|
2478
2510
|
* @public
|
|
2479
2511
|
*/
|
|
2480
2512
|
interface TextMember {
|
|
@@ -2486,7 +2518,7 @@ export declare namespace ToolResultContentBlock {
|
|
|
2486
2518
|
$unknown?: never;
|
|
2487
2519
|
}
|
|
2488
2520
|
/**
|
|
2489
|
-
* <p>A tool result that is an image
|
|
2521
|
+
* <p>A tool result that is an image. </p> <note> <p>This field is only supported by Amazon Nova and Anthropic Claude 3 and 4 models.</p> </note>
|
|
2490
2522
|
* @public
|
|
2491
2523
|
*/
|
|
2492
2524
|
interface ImageMember {
|
|
@@ -2555,12 +2587,12 @@ export declare const ToolResultStatus: {
|
|
|
2555
2587
|
*/
|
|
2556
2588
|
export type ToolResultStatus = (typeof ToolResultStatus)[keyof typeof ToolResultStatus];
|
|
2557
2589
|
/**
|
|
2558
|
-
* <p>A tool result block that contains the results for a tool request that the model previously made.</p>
|
|
2590
|
+
* <p>A tool result block that contains the results for a tool request that the model previously made. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/tool-use.html">Call a tool with the Converse API</a> in the Amazon Bedrock User Guide.</p>
|
|
2559
2591
|
* @public
|
|
2560
2592
|
*/
|
|
2561
2593
|
export interface ToolResultBlock {
|
|
2562
2594
|
/**
|
|
2563
|
-
* <p>The ID of the tool request that this is the result for
|
|
2595
|
+
* <p>The ID of the tool request that this is the result for. </p>
|
|
2564
2596
|
* @public
|
|
2565
2597
|
*/
|
|
2566
2598
|
toolUseId: string | undefined;
|
|
@@ -2570,13 +2602,29 @@ export interface ToolResultBlock {
|
|
|
2570
2602
|
*/
|
|
2571
2603
|
content: ToolResultContentBlock[] | undefined;
|
|
2572
2604
|
/**
|
|
2573
|
-
* <p>The status for the tool result content block.</p> <note> <p>This field is only supported Anthropic Claude 3 models.</p> </note>
|
|
2605
|
+
* <p>The status for the tool result content block.</p> <note> <p>This field is only supported by Amazon Nova and Anthropic Claude 3 and 4 models.</p> </note>
|
|
2574
2606
|
* @public
|
|
2575
2607
|
*/
|
|
2576
2608
|
status?: ToolResultStatus | undefined;
|
|
2609
|
+
/**
|
|
2610
|
+
* <p>The type for the tool result content block.</p>
|
|
2611
|
+
* @public
|
|
2612
|
+
*/
|
|
2613
|
+
type?: string | undefined;
|
|
2577
2614
|
}
|
|
2578
2615
|
/**
|
|
2579
|
-
*
|
|
2616
|
+
* @public
|
|
2617
|
+
* @enum
|
|
2618
|
+
*/
|
|
2619
|
+
export declare const ToolUseType: {
|
|
2620
|
+
readonly SERVER_TOOL_USE: "server_tool_use";
|
|
2621
|
+
};
|
|
2622
|
+
/**
|
|
2623
|
+
* @public
|
|
2624
|
+
*/
|
|
2625
|
+
export type ToolUseType = (typeof ToolUseType)[keyof typeof ToolUseType];
|
|
2626
|
+
/**
|
|
2627
|
+
* <p>A tool use content block. Contains information about a tool that the model is requesting be run., The model uses the result from the tool to generate a response. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/tool-use.html">Call a tool with the Converse API</a> in the Amazon Bedrock User Guide.</p>
|
|
2580
2628
|
* @public
|
|
2581
2629
|
*/
|
|
2582
2630
|
export interface ToolUseBlock {
|
|
@@ -2595,6 +2643,11 @@ export interface ToolUseBlock {
|
|
|
2595
2643
|
* @public
|
|
2596
2644
|
*/
|
|
2597
2645
|
input: __DocumentType | undefined;
|
|
2646
|
+
/**
|
|
2647
|
+
* <p>The type for the tool request.</p>
|
|
2648
|
+
* @public
|
|
2649
|
+
*/
|
|
2650
|
+
type?: ToolUseType | undefined;
|
|
2598
2651
|
}
|
|
2599
2652
|
/**
|
|
2600
2653
|
* <p>A block of content for a message that you pass to, or receive from, a model with the <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> API operations.</p>
|
|
@@ -2708,7 +2761,7 @@ export declare namespace ContentBlock {
|
|
|
2708
2761
|
$unknown?: never;
|
|
2709
2762
|
}
|
|
2710
2763
|
/**
|
|
2711
|
-
* <p>Contains the content to assess with the guardrail. If you don't specify <code>guardContent</code> in a call to the Converse API, the guardrail (if passed in the Converse API) assesses the entire message.</p> <p>For more information, see <i>Use a guardrail with the Converse API</i> in the <i>Amazon Bedrock User Guide</i
|
|
2764
|
+
* <p>Contains the content to assess with the guardrail. If you don't specify <code>guardContent</code> in a call to the Converse API, the guardrail (if passed in the Converse API) assesses the entire message.</p> <p>For more information, see <i>Use a guardrail with the Converse API</i> in the <i>Amazon Bedrock User Guide</i>.</p>
|
|
2712
2765
|
* @public
|
|
2713
2766
|
*/
|
|
2714
2767
|
interface GuardContentMember {
|
|
@@ -2888,7 +2941,7 @@ export declare namespace PromptVariableValues {
|
|
|
2888
2941
|
const visit: <T>(value: PromptVariableValues, visitor: Visitor<T>) => T;
|
|
2889
2942
|
}
|
|
2890
2943
|
/**
|
|
2891
|
-
* <p>
|
|
2944
|
+
* <p>Contains configurations for instructions to provide the model for how to handle input. To learn more, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/conversation-inference-call.html">Using the Converse API</a>.</p>
|
|
2892
2945
|
* @public
|
|
2893
2946
|
*/
|
|
2894
2947
|
export type SystemContentBlock = SystemContentBlock.CachePointMember | SystemContentBlock.GuardContentMember | SystemContentBlock.TextMember | SystemContentBlock.$UnknownMember;
|
|
@@ -2944,19 +2997,19 @@ export declare namespace SystemContentBlock {
|
|
|
2944
2997
|
const visit: <T>(value: SystemContentBlock, visitor: Visitor<T>) => T;
|
|
2945
2998
|
}
|
|
2946
2999
|
/**
|
|
2947
|
-
* <p>The model must request at least one tool (no text is generated). For example, <code>\{"any" : \{\}\}</code
|
|
3000
|
+
* <p>The model must request at least one tool (no text is generated). For example, <code>\{"any" : \{\}\}</code>. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/tool-use.html">Call a tool with the Converse API</a> in the Amazon Bedrock User Guide.</p>
|
|
2948
3001
|
* @public
|
|
2949
3002
|
*/
|
|
2950
3003
|
export interface AnyToolChoice {
|
|
2951
3004
|
}
|
|
2952
3005
|
/**
|
|
2953
|
-
* <p>The Model automatically decides if a tool should be called or whether to generate text instead. For example, <code>\{"auto" : \{\}\}</code
|
|
3006
|
+
* <p>The Model automatically decides if a tool should be called or whether to generate text instead. For example, <code>\{"auto" : \{\}\}</code>. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/tool-use.html">Call a tool with the Converse API</a> in the Amazon Bedrock User Guide</p>
|
|
2954
3007
|
* @public
|
|
2955
3008
|
*/
|
|
2956
3009
|
export interface AutoToolChoice {
|
|
2957
3010
|
}
|
|
2958
3011
|
/**
|
|
2959
|
-
* <p>The model must request a specific tool. For example, <code>\{"tool" : \{"name" : "Your tool name"\}\}</code
|
|
3012
|
+
* <p>The model must request a specific tool. For example, <code>\{"tool" : \{"name" : "Your tool name"\}\}</code>. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/tool-use.html">Call a tool with the Converse API</a> in the Amazon Bedrock User Guide</p> <note> <p>This field is only supported by Anthropic Claude 3 models.</p> </note>
|
|
2960
3013
|
* @public
|
|
2961
3014
|
*/
|
|
2962
3015
|
export interface SpecificToolChoice {
|
|
@@ -2967,7 +3020,7 @@ export interface SpecificToolChoice {
|
|
|
2967
3020
|
name: string | undefined;
|
|
2968
3021
|
}
|
|
2969
3022
|
/**
|
|
2970
|
-
* <p>Determines which tools the model should request in a call to <code>Converse</code> or <code>ConverseStream</code>. <
|
|
3023
|
+
* <p>Determines which tools the model should request in a call to <code>Converse</code> or <code>ConverseStream</code>. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/tool-use.html">Call a tool with the Converse API</a> in the Amazon Bedrock User Guide.</p>
|
|
2971
3024
|
* @public
|
|
2972
3025
|
*/
|
|
2973
3026
|
export type ToolChoice = ToolChoice.AnyMember | ToolChoice.AutoMember | ToolChoice.ToolMember | ToolChoice.$UnknownMember;
|
|
@@ -2996,7 +3049,7 @@ export declare namespace ToolChoice {
|
|
|
2996
3049
|
$unknown?: never;
|
|
2997
3050
|
}
|
|
2998
3051
|
/**
|
|
2999
|
-
* <p>The Model must request the specified tool. Only supported by Anthropic Claude 3 models. </p>
|
|
3052
|
+
* <p>The Model must request the specified tool. Only supported by Anthropic Claude 3 and Amazon Nova models. </p>
|
|
3000
3053
|
* @public
|
|
3001
3054
|
*/
|
|
3002
3055
|
interface ToolMember {
|
|
@@ -3023,7 +3076,18 @@ export declare namespace ToolChoice {
|
|
|
3023
3076
|
const visit: <T>(value: ToolChoice, visitor: Visitor<T>) => T;
|
|
3024
3077
|
}
|
|
3025
3078
|
/**
|
|
3026
|
-
* <p>
|
|
3079
|
+
* <p>Specifies a system-defined tool for the model to use. <i>System-defined tools</i> are tools that are created and provided by the model provider.</p>
|
|
3080
|
+
* @public
|
|
3081
|
+
*/
|
|
3082
|
+
export interface SystemTool {
|
|
3083
|
+
/**
|
|
3084
|
+
* <p>The name of the system-defined tool that you want to call. </p>
|
|
3085
|
+
* @public
|
|
3086
|
+
*/
|
|
3087
|
+
name: string | undefined;
|
|
3088
|
+
}
|
|
3089
|
+
/**
|
|
3090
|
+
* <p>The schema for the tool. The top level schema type must be <code>object</code>. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/tool-use.html">Call a tool with the Converse API</a> in the Amazon Bedrock User Guide.</p>
|
|
3027
3091
|
* @public
|
|
3028
3092
|
*/
|
|
3029
3093
|
export type ToolInputSchema = ToolInputSchema.JsonMember | ToolInputSchema.$UnknownMember;
|
|
@@ -3053,7 +3117,7 @@ export declare namespace ToolInputSchema {
|
|
|
3053
3117
|
const visit: <T>(value: ToolInputSchema, visitor: Visitor<T>) => T;
|
|
3054
3118
|
}
|
|
3055
3119
|
/**
|
|
3056
|
-
* <p>The specification for the tool.</p>
|
|
3120
|
+
* <p>The specification for the tool. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/tool-use.html">Call a tool with the Converse API</a> in the Amazon Bedrock User Guide.</p>
|
|
3057
3121
|
* @public
|
|
3058
3122
|
*/
|
|
3059
3123
|
export interface ToolSpecification {
|
|
@@ -3074,20 +3138,31 @@ export interface ToolSpecification {
|
|
|
3074
3138
|
inputSchema: ToolInputSchema | undefined;
|
|
3075
3139
|
}
|
|
3076
3140
|
/**
|
|
3077
|
-
* <p>Information about a tool that you can use with the Converse API. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/tool-use.html">
|
|
3141
|
+
* <p>Information about a tool that you can use with the Converse API. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/tool-use.html">Call a tool with the Converse API</a> in the Amazon Bedrock User Guide.</p>
|
|
3078
3142
|
* @public
|
|
3079
3143
|
*/
|
|
3080
|
-
export type Tool = Tool.CachePointMember | Tool.ToolSpecMember | Tool.$UnknownMember;
|
|
3144
|
+
export type Tool = Tool.CachePointMember | Tool.SystemToolMember | Tool.ToolSpecMember | Tool.$UnknownMember;
|
|
3081
3145
|
/**
|
|
3082
3146
|
* @public
|
|
3083
3147
|
*/
|
|
3084
3148
|
export declare namespace Tool {
|
|
3085
3149
|
/**
|
|
3086
|
-
* <p>The specfication for the tool
|
|
3150
|
+
* <p>The specfication for the tool. </p>
|
|
3087
3151
|
* @public
|
|
3088
3152
|
*/
|
|
3089
3153
|
interface ToolSpecMember {
|
|
3090
3154
|
toolSpec: ToolSpecification;
|
|
3155
|
+
systemTool?: never;
|
|
3156
|
+
cachePoint?: never;
|
|
3157
|
+
$unknown?: never;
|
|
3158
|
+
}
|
|
3159
|
+
/**
|
|
3160
|
+
* <p>Specifies the system-defined tool that you want use.</p>
|
|
3161
|
+
* @public
|
|
3162
|
+
*/
|
|
3163
|
+
interface SystemToolMember {
|
|
3164
|
+
toolSpec?: never;
|
|
3165
|
+
systemTool: SystemTool;
|
|
3091
3166
|
cachePoint?: never;
|
|
3092
3167
|
$unknown?: never;
|
|
3093
3168
|
}
|
|
@@ -3097,6 +3172,7 @@ export declare namespace Tool {
|
|
|
3097
3172
|
*/
|
|
3098
3173
|
interface CachePointMember {
|
|
3099
3174
|
toolSpec?: never;
|
|
3175
|
+
systemTool?: never;
|
|
3100
3176
|
cachePoint: CachePointBlock;
|
|
3101
3177
|
$unknown?: never;
|
|
3102
3178
|
}
|
|
@@ -3105,11 +3181,13 @@ export declare namespace Tool {
|
|
|
3105
3181
|
*/
|
|
3106
3182
|
interface $UnknownMember {
|
|
3107
3183
|
toolSpec?: never;
|
|
3184
|
+
systemTool?: never;
|
|
3108
3185
|
cachePoint?: never;
|
|
3109
3186
|
$unknown: [string, any];
|
|
3110
3187
|
}
|
|
3111
3188
|
interface Visitor<T> {
|
|
3112
3189
|
toolSpec: (value: ToolSpecification) => T;
|
|
3190
|
+
systemTool: (value: SystemTool) => T;
|
|
3113
3191
|
cachePoint: (value: CachePointBlock) => T;
|
|
3114
3192
|
_: (name: string, value: any) => T;
|
|
3115
3193
|
}
|
|
@@ -3121,12 +3199,12 @@ export declare namespace Tool {
|
|
|
3121
3199
|
*/
|
|
3122
3200
|
export interface ToolConfiguration {
|
|
3123
3201
|
/**
|
|
3124
|
-
* <p>An array of tools that you want to pass to a model
|
|
3202
|
+
* <p>An array of tools that you want to pass to a model. </p>
|
|
3125
3203
|
* @public
|
|
3126
3204
|
*/
|
|
3127
3205
|
tools: Tool[] | undefined;
|
|
3128
3206
|
/**
|
|
3129
|
-
* <p>If supported by model, forces the model to request a tool
|
|
3207
|
+
* <p>If supported by model, forces the model to request a tool. </p>
|
|
3130
3208
|
* @public
|
|
3131
3209
|
*/
|
|
3132
3210
|
toolChoice?: ToolChoice | undefined;
|
|
@@ -3250,7 +3328,7 @@ export declare const StopReason: {
|
|
|
3250
3328
|
*/
|
|
3251
3329
|
export type StopReason = (typeof StopReason)[keyof typeof StopReason];
|
|
3252
3330
|
/**
|
|
3253
|
-
* <p>A Top level guardrail trace object. For more information, see <a>ConverseTrace</a>.</p>
|
|
3331
|
+
* <p>A Top level guardrail trace object. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseTrace.html">ConverseTrace</a>.</p>
|
|
3254
3332
|
* @public
|
|
3255
3333
|
*/
|
|
3256
3334
|
export interface GuardrailTraceAssessment {
|
|
@@ -3287,7 +3365,7 @@ export interface PromptRouterTrace {
|
|
|
3287
3365
|
invokedModelId?: string | undefined;
|
|
3288
3366
|
}
|
|
3289
3367
|
/**
|
|
3290
|
-
* <p>The trace object in a response from <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html">Converse</a
|
|
3368
|
+
* <p>The trace object in a response from <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html">Converse</a>.</p>
|
|
3291
3369
|
* @public
|
|
3292
3370
|
*/
|
|
3293
3371
|
export interface ConverseTrace {
|
|
@@ -3433,7 +3511,7 @@ export declare const GuardrailStreamProcessingMode: {
|
|
|
3433
3511
|
*/
|
|
3434
3512
|
export type GuardrailStreamProcessingMode = (typeof GuardrailStreamProcessingMode)[keyof typeof GuardrailStreamProcessingMode];
|
|
3435
3513
|
/**
|
|
3436
|
-
* <p>Configuration information for a guardrail that you use with the <a>ConverseStream</a> action. </p>
|
|
3514
|
+
* <p>Configuration information for a guardrail that you use with the <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html">ConverseStream</a> action. </p>
|
|
3437
3515
|
* @public
|
|
3438
3516
|
*/
|
|
3439
3517
|
export interface GuardrailStreamConfiguration {
|
|
@@ -3606,6 +3684,36 @@ export declare namespace ReasoningContentBlockDelta {
|
|
|
3606
3684
|
}
|
|
3607
3685
|
const visit: <T>(value: ReasoningContentBlockDelta, visitor: Visitor<T>) => T;
|
|
3608
3686
|
}
|
|
3687
|
+
/**
|
|
3688
|
+
* <p>Contains incremental updates to tool results information during streaming responses. This allows clients to build up tool results data progressively as the response is generated.</p>
|
|
3689
|
+
* @public
|
|
3690
|
+
*/
|
|
3691
|
+
export type ToolResultBlockDelta = ToolResultBlockDelta.TextMember | ToolResultBlockDelta.$UnknownMember;
|
|
3692
|
+
/**
|
|
3693
|
+
* @public
|
|
3694
|
+
*/
|
|
3695
|
+
export declare namespace ToolResultBlockDelta {
|
|
3696
|
+
/**
|
|
3697
|
+
* <p>The reasoning the model used to return the output.</p>
|
|
3698
|
+
* @public
|
|
3699
|
+
*/
|
|
3700
|
+
interface TextMember {
|
|
3701
|
+
text: string;
|
|
3702
|
+
$unknown?: never;
|
|
3703
|
+
}
|
|
3704
|
+
/**
|
|
3705
|
+
* @public
|
|
3706
|
+
*/
|
|
3707
|
+
interface $UnknownMember {
|
|
3708
|
+
text?: never;
|
|
3709
|
+
$unknown: [string, any];
|
|
3710
|
+
}
|
|
3711
|
+
interface Visitor<T> {
|
|
3712
|
+
text: (value: string) => T;
|
|
3713
|
+
_: (name: string, value: any) => T;
|
|
3714
|
+
}
|
|
3715
|
+
const visit: <T>(value: ToolResultBlockDelta, visitor: Visitor<T>) => T;
|
|
3716
|
+
}
|
|
3609
3717
|
/**
|
|
3610
3718
|
* <p>The delta for a tool use block.</p>
|
|
3611
3719
|
* @public
|
|
@@ -3621,7 +3729,7 @@ export interface ToolUseBlockDelta {
|
|
|
3621
3729
|
* <p>A block of content in a streaming response.</p>
|
|
3622
3730
|
* @public
|
|
3623
3731
|
*/
|
|
3624
|
-
export type ContentBlockDelta = ContentBlockDelta.CitationMember | ContentBlockDelta.ReasoningContentMember | ContentBlockDelta.TextMember | ContentBlockDelta.ToolUseMember | ContentBlockDelta.$UnknownMember;
|
|
3732
|
+
export type ContentBlockDelta = ContentBlockDelta.CitationMember | ContentBlockDelta.ReasoningContentMember | ContentBlockDelta.TextMember | ContentBlockDelta.ToolResultMember | ContentBlockDelta.ToolUseMember | ContentBlockDelta.$UnknownMember;
|
|
3625
3733
|
/**
|
|
3626
3734
|
* @public
|
|
3627
3735
|
*/
|
|
@@ -3633,6 +3741,7 @@ export declare namespace ContentBlockDelta {
|
|
|
3633
3741
|
interface TextMember {
|
|
3634
3742
|
text: string;
|
|
3635
3743
|
toolUse?: never;
|
|
3744
|
+
toolResult?: never;
|
|
3636
3745
|
reasoningContent?: never;
|
|
3637
3746
|
citation?: never;
|
|
3638
3747
|
$unknown?: never;
|
|
@@ -3644,6 +3753,19 @@ export declare namespace ContentBlockDelta {
|
|
|
3644
3753
|
interface ToolUseMember {
|
|
3645
3754
|
text?: never;
|
|
3646
3755
|
toolUse: ToolUseBlockDelta;
|
|
3756
|
+
toolResult?: never;
|
|
3757
|
+
reasoningContent?: never;
|
|
3758
|
+
citation?: never;
|
|
3759
|
+
$unknown?: never;
|
|
3760
|
+
}
|
|
3761
|
+
/**
|
|
3762
|
+
* <p>An incremental update that contains the results from a tool call.</p>
|
|
3763
|
+
* @public
|
|
3764
|
+
*/
|
|
3765
|
+
interface ToolResultMember {
|
|
3766
|
+
text?: never;
|
|
3767
|
+
toolUse?: never;
|
|
3768
|
+
toolResult: ToolResultBlockDelta[];
|
|
3647
3769
|
reasoningContent?: never;
|
|
3648
3770
|
citation?: never;
|
|
3649
3771
|
$unknown?: never;
|
|
@@ -3655,6 +3777,7 @@ export declare namespace ContentBlockDelta {
|
|
|
3655
3777
|
interface ReasoningContentMember {
|
|
3656
3778
|
text?: never;
|
|
3657
3779
|
toolUse?: never;
|
|
3780
|
+
toolResult?: never;
|
|
3658
3781
|
reasoningContent: ReasoningContentBlockDelta;
|
|
3659
3782
|
citation?: never;
|
|
3660
3783
|
$unknown?: never;
|
|
@@ -3666,6 +3789,7 @@ export declare namespace ContentBlockDelta {
|
|
|
3666
3789
|
interface CitationMember {
|
|
3667
3790
|
text?: never;
|
|
3668
3791
|
toolUse?: never;
|
|
3792
|
+
toolResult?: never;
|
|
3669
3793
|
reasoningContent?: never;
|
|
3670
3794
|
citation: CitationsDelta;
|
|
3671
3795
|
$unknown?: never;
|
|
@@ -3676,6 +3800,7 @@ export declare namespace ContentBlockDelta {
|
|
|
3676
3800
|
interface $UnknownMember {
|
|
3677
3801
|
text?: never;
|
|
3678
3802
|
toolUse?: never;
|
|
3803
|
+
toolResult?: never;
|
|
3679
3804
|
reasoningContent?: never;
|
|
3680
3805
|
citation?: never;
|
|
3681
3806
|
$unknown: [string, any];
|
|
@@ -3683,6 +3808,7 @@ export declare namespace ContentBlockDelta {
|
|
|
3683
3808
|
interface Visitor<T> {
|
|
3684
3809
|
text: (value: string) => T;
|
|
3685
3810
|
toolUse: (value: ToolUseBlockDelta) => T;
|
|
3811
|
+
toolResult: (value: ToolResultBlockDelta[]) => T;
|
|
3686
3812
|
reasoningContent: (value: ReasoningContentBlockDelta) => T;
|
|
3687
3813
|
citation: (value: CitationsDelta) => T;
|
|
3688
3814
|
_: (name: string, value: any) => T;
|
|
@@ -3706,7 +3832,28 @@ export interface ContentBlockDeltaEvent {
|
|
|
3706
3832
|
contentBlockIndex: number | undefined;
|
|
3707
3833
|
}
|
|
3708
3834
|
/**
|
|
3709
|
-
* <p>The start of a tool use
|
|
3835
|
+
* <p>The start of a tool result block. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/tool-use.html">Call a tool with the Converse API</a> in the Amazon Bedrock User Guide.</p>
|
|
3836
|
+
* @public
|
|
3837
|
+
*/
|
|
3838
|
+
export interface ToolResultBlockStart {
|
|
3839
|
+
/**
|
|
3840
|
+
* <p>The ID of the tool that was used to generate this tool result block.</p>
|
|
3841
|
+
* @public
|
|
3842
|
+
*/
|
|
3843
|
+
toolUseId: string | undefined;
|
|
3844
|
+
/**
|
|
3845
|
+
* <p>The type for the tool that was used to generate this tool result block.</p>
|
|
3846
|
+
* @public
|
|
3847
|
+
*/
|
|
3848
|
+
type?: string | undefined;
|
|
3849
|
+
/**
|
|
3850
|
+
* <p>The status of the tool result block.</p>
|
|
3851
|
+
* @public
|
|
3852
|
+
*/
|
|
3853
|
+
status?: ToolResultStatus | undefined;
|
|
3854
|
+
}
|
|
3855
|
+
/**
|
|
3856
|
+
* <p>The start of a tool use block. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/tool-use.html">Call a tool with the Converse API</a> in the Amazon Bedrock User Guide.</p>
|
|
3710
3857
|
* @public
|
|
3711
3858
|
*/
|
|
3712
3859
|
export interface ToolUseBlockStart {
|
|
@@ -3720,12 +3867,17 @@ export interface ToolUseBlockStart {
|
|
|
3720
3867
|
* @public
|
|
3721
3868
|
*/
|
|
3722
3869
|
name: string | undefined;
|
|
3870
|
+
/**
|
|
3871
|
+
* <p>The type for the tool request.</p>
|
|
3872
|
+
* @public
|
|
3873
|
+
*/
|
|
3874
|
+
type?: ToolUseType | undefined;
|
|
3723
3875
|
}
|
|
3724
3876
|
/**
|
|
3725
3877
|
* <p>Content block start information.</p>
|
|
3726
3878
|
* @public
|
|
3727
3879
|
*/
|
|
3728
|
-
export type ContentBlockStart = ContentBlockStart.ToolUseMember | ContentBlockStart.$UnknownMember;
|
|
3880
|
+
export type ContentBlockStart = ContentBlockStart.ToolResultMember | ContentBlockStart.ToolUseMember | ContentBlockStart.$UnknownMember;
|
|
3729
3881
|
/**
|
|
3730
3882
|
* @public
|
|
3731
3883
|
*/
|
|
@@ -3736,6 +3888,16 @@ export declare namespace ContentBlockStart {
|
|
|
3736
3888
|
*/
|
|
3737
3889
|
interface ToolUseMember {
|
|
3738
3890
|
toolUse: ToolUseBlockStart;
|
|
3891
|
+
toolResult?: never;
|
|
3892
|
+
$unknown?: never;
|
|
3893
|
+
}
|
|
3894
|
+
/**
|
|
3895
|
+
* <p>The </p>
|
|
3896
|
+
* @public
|
|
3897
|
+
*/
|
|
3898
|
+
interface ToolResultMember {
|
|
3899
|
+
toolUse?: never;
|
|
3900
|
+
toolResult: ToolResultBlockStart;
|
|
3739
3901
|
$unknown?: never;
|
|
3740
3902
|
}
|
|
3741
3903
|
/**
|
|
@@ -3743,10 +3905,12 @@ export declare namespace ContentBlockStart {
|
|
|
3743
3905
|
*/
|
|
3744
3906
|
interface $UnknownMember {
|
|
3745
3907
|
toolUse?: never;
|
|
3908
|
+
toolResult?: never;
|
|
3746
3909
|
$unknown: [string, any];
|
|
3747
3910
|
}
|
|
3748
3911
|
interface Visitor<T> {
|
|
3749
3912
|
toolUse: (value: ToolUseBlockStart) => T;
|
|
3913
|
+
toolResult: (value: ToolResultBlockStart) => T;
|
|
3750
3914
|
_: (name: string, value: any) => T;
|
|
3751
3915
|
}
|
|
3752
3916
|
const visit: <T>(value: ContentBlockStart, visitor: Visitor<T>) => T;
|
|
@@ -3817,7 +3981,7 @@ export interface ConverseStreamMetrics {
|
|
|
3817
3981
|
latencyMs: number | undefined;
|
|
3818
3982
|
}
|
|
3819
3983
|
/**
|
|
3820
|
-
* <p>The trace object in a response from <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html">ConverseStream</a
|
|
3984
|
+
* <p>The trace object in a response from <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html">ConverseStream</a>.</p>
|
|
3821
3985
|
* @public
|
|
3822
3986
|
*/
|
|
3823
3987
|
export interface ConverseStreamTrace {
|
|
@@ -4034,7 +4198,7 @@ export declare namespace ConverseStreamOutput {
|
|
|
4034
4198
|
$unknown?: never;
|
|
4035
4199
|
}
|
|
4036
4200
|
/**
|
|
4037
|
-
* <p>The input fails to satisfy the constraints specified by <i>Amazon Bedrock</i>. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-validation-error">ValidationError</a> in the Amazon Bedrock User Guide
|
|
4201
|
+
* <p>The input fails to satisfy the constraints specified by <i>Amazon Bedrock</i>. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-validation-error">ValidationError</a> in the Amazon Bedrock User Guide.</p>
|
|
4038
4202
|
* @public
|
|
4039
4203
|
*/
|
|
4040
4204
|
interface ValidationExceptionMember {
|
|
@@ -4052,7 +4216,7 @@ export declare namespace ConverseStreamOutput {
|
|
|
4052
4216
|
$unknown?: never;
|
|
4053
4217
|
}
|
|
4054
4218
|
/**
|
|
4055
|
-
* <p>Your request was denied due to exceeding the account quotas for <i>Amazon Bedrock</i>. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-throttling-exception">ThrottlingException</a> in the Amazon Bedrock User Guide
|
|
4219
|
+
* <p>Your request was denied due to exceeding the account quotas for <i>Amazon Bedrock</i>. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-throttling-exception">ThrottlingException</a> in the Amazon Bedrock User Guide.</p>
|
|
4056
4220
|
* @public
|
|
4057
4221
|
*/
|
|
4058
4222
|
interface ThrottlingExceptionMember {
|
|
@@ -11,7 +11,7 @@ export declare const getRuntimeConfig: (config: BedrockRuntimeClientConfig) => {
|
|
|
11
11
|
defaultsMode: import("@smithy/types").Provider<import("@smithy/smithy-client").ResolvedDefaultsMode>;
|
|
12
12
|
authSchemePreference: string[] | import("@smithy/types").Provider<string[]>;
|
|
13
13
|
bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
|
|
14
|
-
credentialDefaultProvider: ((input: any) => import("@smithy/types").AwsCredentialIdentityProvider) | ((init?: import("@aws-sdk/credential-provider-node").DefaultProviderInit) => import("@
|
|
14
|
+
credentialDefaultProvider: ((input: any) => import("@smithy/types").AwsCredentialIdentityProvider) | ((init?: import("@aws-sdk/credential-provider-node").DefaultProviderInit) => import("@aws-sdk/credential-provider-node/dist-types/runtime/memoize-chain").MemoizedRuntimeConfigAwsCredentialIdentityProvider);
|
|
15
15
|
defaultUserAgentProvider: (config?: import("@aws-sdk/util-user-agent-node").PreviouslyResolved) => Promise<import("@smithy/types").UserAgent>;
|
|
16
16
|
eventStreamPayloadHandlerProvider: import("@smithy/types").EventStreamPayloadHandlerProvider;
|
|
17
17
|
eventStreamSerdeProvider: import("@smithy/types").EventStreamSerdeProvider;
|