@aws-sdk/client-bedrock-runtime 3.596.0 → 3.600.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/index.js +120 -0
- package/dist-es/models/models_0.js +87 -0
- package/dist-es/protocols/Aws_restJson1.js +9 -0
- package/dist-types/commands/ConverseCommand.d.ts +145 -2
- package/dist-types/commands/ConverseStreamCommand.d.ts +140 -4
- package/dist-types/models/models_0.d.ts +583 -108
- package/dist-types/ts3.4/models/models_0.d.ts +221 -0
- package/package.json +41 -41
|
@@ -13,6 +13,39 @@ export declare class AccessDeniedException extends __BaseException {
|
|
|
13
13
|
*/
|
|
14
14
|
constructor(opts: __ExceptionOptionType<AccessDeniedException, __BaseException>);
|
|
15
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* @public
|
|
18
|
+
* @enum
|
|
19
|
+
*/
|
|
20
|
+
export declare const GuardrailTrace: {
|
|
21
|
+
readonly DISABLED: "disabled";
|
|
22
|
+
readonly ENABLED: "enabled";
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* @public
|
|
26
|
+
*/
|
|
27
|
+
export type GuardrailTrace = (typeof GuardrailTrace)[keyof typeof GuardrailTrace];
|
|
28
|
+
/**
|
|
29
|
+
* <p>Configuration information for a guardrail that you use with the <a>Converse</a> action.</p>
|
|
30
|
+
* @public
|
|
31
|
+
*/
|
|
32
|
+
export interface GuardrailConfiguration {
|
|
33
|
+
/**
|
|
34
|
+
* <p>The identifier for the guardrail.</p>
|
|
35
|
+
* @public
|
|
36
|
+
*/
|
|
37
|
+
guardrailIdentifier: string | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* <p>The version of the guardrail.</p>
|
|
40
|
+
* @public
|
|
41
|
+
*/
|
|
42
|
+
guardrailVersion: string | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* <p>The trace behavior for the guardrail.</p>
|
|
45
|
+
* @public
|
|
46
|
+
*/
|
|
47
|
+
trace?: GuardrailTrace;
|
|
48
|
+
}
|
|
16
49
|
/**
|
|
17
50
|
* <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,
|
|
18
51
|
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html">Inference parameters for foundation models</a>.</p>
|
|
@@ -26,96 +59,7 @@ export interface InferenceConfiguration {
|
|
|
26
59
|
/**
|
|
27
60
|
* <p>The maximum number of tokens to allow in the generated response. The default value is
|
|
28
61
|
* the maximum allowed value for the model that you are using. For more information, see
|
|
29
|
-
* <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html">Inference parameters for
|
|
30
|
-
* "messages": [
|
|
31
|
-
* \{
|
|
32
|
-
* "role": "user",
|
|
33
|
-
* "content": [
|
|
34
|
-
* \{
|
|
35
|
-
* "text": "what's the weather in Queens, NY and Austin, TX?"
|
|
36
|
-
* \}
|
|
37
|
-
* ]
|
|
38
|
-
* \},
|
|
39
|
-
* \{
|
|
40
|
-
* "role": "assistant",
|
|
41
|
-
* "content": [
|
|
42
|
-
* \{
|
|
43
|
-
* "toolUse": \{
|
|
44
|
-
* "toolUseId": "1",
|
|
45
|
-
* "name": "get_weather",
|
|
46
|
-
* "input": \{
|
|
47
|
-
* "city": "Queens",
|
|
48
|
-
* "state": "NY"
|
|
49
|
-
* \}
|
|
50
|
-
* \}
|
|
51
|
-
* \},
|
|
52
|
-
* \{
|
|
53
|
-
* "toolUse": \{
|
|
54
|
-
* "toolUseId": "2",
|
|
55
|
-
* "name": "get_weather",
|
|
56
|
-
* "input": \{
|
|
57
|
-
* "city": "Austin",
|
|
58
|
-
* "state": "TX"
|
|
59
|
-
* \}
|
|
60
|
-
* \}
|
|
61
|
-
* \}
|
|
62
|
-
* ]
|
|
63
|
-
* \},
|
|
64
|
-
* \{
|
|
65
|
-
* "role": "user",
|
|
66
|
-
* "content": [
|
|
67
|
-
* \{
|
|
68
|
-
* "toolResult": \{
|
|
69
|
-
* "toolUseId": "2",
|
|
70
|
-
* "content": [
|
|
71
|
-
* \{
|
|
72
|
-
* "json": \{
|
|
73
|
-
* "weather": "40"
|
|
74
|
-
* \}
|
|
75
|
-
* \}
|
|
76
|
-
* ]
|
|
77
|
-
* \}
|
|
78
|
-
* \},
|
|
79
|
-
* \{
|
|
80
|
-
* "text": "..."
|
|
81
|
-
* \},
|
|
82
|
-
* \{
|
|
83
|
-
* "toolResult": \{
|
|
84
|
-
* "toolUseId": "1",
|
|
85
|
-
* "content": [
|
|
86
|
-
* \{
|
|
87
|
-
* "text": "result text"
|
|
88
|
-
* \}
|
|
89
|
-
* ]
|
|
90
|
-
* \}
|
|
91
|
-
* \}
|
|
92
|
-
* ]
|
|
93
|
-
* \}
|
|
94
|
-
* ],
|
|
95
|
-
* "toolConfig": \{
|
|
96
|
-
* "tools": [
|
|
97
|
-
* \{
|
|
98
|
-
* "name": "get_weather",
|
|
99
|
-
* "description": "Get weather",
|
|
100
|
-
* "inputSchema": \{
|
|
101
|
-
* "type": "object",
|
|
102
|
-
* "properties": \{
|
|
103
|
-
* "city": \{
|
|
104
|
-
* "type": "string",
|
|
105
|
-
* "description": "City of location"
|
|
106
|
-
* \},
|
|
107
|
-
* "state": \{
|
|
108
|
-
* "type": "string",
|
|
109
|
-
* "description": "State of location"
|
|
110
|
-
* \}
|
|
111
|
-
* \},
|
|
112
|
-
* "required": ["city", "state"]
|
|
113
|
-
* \}
|
|
114
|
-
* \}
|
|
115
|
-
* ]
|
|
116
|
-
* \}
|
|
117
|
-
* \}
|
|
118
|
-
* n models</a>. </p>
|
|
62
|
+
* <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html">Inference parameters for foundation models</a>. </p>
|
|
119
63
|
* @public
|
|
120
64
|
*/
|
|
121
65
|
maxTokens?: number;
|
|
@@ -146,6 +90,49 @@ export interface InferenceConfiguration {
|
|
|
146
90
|
*/
|
|
147
91
|
stopSequences?: string[];
|
|
148
92
|
}
|
|
93
|
+
/**
|
|
94
|
+
* <p>A text block that contains text that you want to assess with a guardrail. For more information, see <a>GuardrailConverseContentBlock</a>.</p>
|
|
95
|
+
* @public
|
|
96
|
+
*/
|
|
97
|
+
export interface GuardrailConverseTextBlock {
|
|
98
|
+
/**
|
|
99
|
+
* <p>The text that you want to guard.</p>
|
|
100
|
+
* @public
|
|
101
|
+
*/
|
|
102
|
+
text: string | undefined;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* <p/>
|
|
106
|
+
* <p>A content block for selective guarding with the Converse API (<a>Converse</a> and <a>ConverseStream</a>).
|
|
107
|
+
* </p>
|
|
108
|
+
* @public
|
|
109
|
+
*/
|
|
110
|
+
export type GuardrailConverseContentBlock = GuardrailConverseContentBlock.TextMember | GuardrailConverseContentBlock.$UnknownMember;
|
|
111
|
+
/**
|
|
112
|
+
* @public
|
|
113
|
+
*/
|
|
114
|
+
export declare namespace GuardrailConverseContentBlock {
|
|
115
|
+
/**
|
|
116
|
+
* <p>The text to guard.</p>
|
|
117
|
+
* @public
|
|
118
|
+
*/
|
|
119
|
+
interface TextMember {
|
|
120
|
+
text: GuardrailConverseTextBlock;
|
|
121
|
+
$unknown?: never;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* @public
|
|
125
|
+
*/
|
|
126
|
+
interface $UnknownMember {
|
|
127
|
+
text?: never;
|
|
128
|
+
$unknown: [string, any];
|
|
129
|
+
}
|
|
130
|
+
interface Visitor<T> {
|
|
131
|
+
text: (value: GuardrailConverseTextBlock) => T;
|
|
132
|
+
_: (name: string, value: any) => T;
|
|
133
|
+
}
|
|
134
|
+
const visit: <T>(value: GuardrailConverseContentBlock, visitor: Visitor<T>) => T;
|
|
135
|
+
}
|
|
149
136
|
/**
|
|
150
137
|
* @public
|
|
151
138
|
* @enum
|
|
@@ -325,10 +312,10 @@ export interface ToolUseBlock {
|
|
|
325
312
|
input: __DocumentType | undefined;
|
|
326
313
|
}
|
|
327
314
|
/**
|
|
328
|
-
* <p>A block of content for a message.</p>
|
|
315
|
+
* <p>A block of content for a message that you pass to, or receive from, a model with the Converse API (<a>Converse</a> and <a>ConverseStream</a>).</p>
|
|
329
316
|
* @public
|
|
330
317
|
*/
|
|
331
|
-
export type ContentBlock = ContentBlock.ImageMember | ContentBlock.TextMember | ContentBlock.ToolResultMember | ContentBlock.ToolUseMember | ContentBlock.$UnknownMember;
|
|
318
|
+
export type ContentBlock = ContentBlock.GuardContentMember | ContentBlock.ImageMember | ContentBlock.TextMember | ContentBlock.ToolResultMember | ContentBlock.ToolUseMember | ContentBlock.$UnknownMember;
|
|
332
319
|
/**
|
|
333
320
|
* @public
|
|
334
321
|
*/
|
|
@@ -342,6 +329,7 @@ export declare namespace ContentBlock {
|
|
|
342
329
|
image?: never;
|
|
343
330
|
toolUse?: never;
|
|
344
331
|
toolResult?: never;
|
|
332
|
+
guardContent?: never;
|
|
345
333
|
$unknown?: never;
|
|
346
334
|
}
|
|
347
335
|
/**
|
|
@@ -356,6 +344,7 @@ export declare namespace ContentBlock {
|
|
|
356
344
|
image: ImageBlock;
|
|
357
345
|
toolUse?: never;
|
|
358
346
|
toolResult?: never;
|
|
347
|
+
guardContent?: never;
|
|
359
348
|
$unknown?: never;
|
|
360
349
|
}
|
|
361
350
|
/**
|
|
@@ -367,6 +356,7 @@ export declare namespace ContentBlock {
|
|
|
367
356
|
image?: never;
|
|
368
357
|
toolUse: ToolUseBlock;
|
|
369
358
|
toolResult?: never;
|
|
359
|
+
guardContent?: never;
|
|
370
360
|
$unknown?: never;
|
|
371
361
|
}
|
|
372
362
|
/**
|
|
@@ -378,6 +368,24 @@ export declare namespace ContentBlock {
|
|
|
378
368
|
image?: never;
|
|
379
369
|
toolUse?: never;
|
|
380
370
|
toolResult: ToolResultBlock;
|
|
371
|
+
guardContent?: never;
|
|
372
|
+
$unknown?: never;
|
|
373
|
+
}
|
|
374
|
+
/**
|
|
375
|
+
* <p>Contains the content to assess with the guardrail. If you don't specify
|
|
376
|
+
* <code>guardContent</code> in a call to the Converse API, the guardrail (if passed in the
|
|
377
|
+
* Converse API) assesses the entire message.</p>
|
|
378
|
+
* <p>For more information, see <i>Use a guardrail with the Converse API</i> in the <i>Amazon Bedrock User Guide</i>.
|
|
379
|
+
*
|
|
380
|
+
* </p>
|
|
381
|
+
* @public
|
|
382
|
+
*/
|
|
383
|
+
interface GuardContentMember {
|
|
384
|
+
text?: never;
|
|
385
|
+
image?: never;
|
|
386
|
+
toolUse?: never;
|
|
387
|
+
toolResult?: never;
|
|
388
|
+
guardContent: GuardrailConverseContentBlock;
|
|
381
389
|
$unknown?: never;
|
|
382
390
|
}
|
|
383
391
|
/**
|
|
@@ -388,6 +396,7 @@ export declare namespace ContentBlock {
|
|
|
388
396
|
image?: never;
|
|
389
397
|
toolUse?: never;
|
|
390
398
|
toolResult?: never;
|
|
399
|
+
guardContent?: never;
|
|
391
400
|
$unknown: [string, any];
|
|
392
401
|
}
|
|
393
402
|
interface Visitor<T> {
|
|
@@ -395,6 +404,7 @@ export declare namespace ContentBlock {
|
|
|
395
404
|
image: (value: ImageBlock) => T;
|
|
396
405
|
toolUse: (value: ToolUseBlock) => T;
|
|
397
406
|
toolResult: (value: ToolResultBlock) => T;
|
|
407
|
+
guardContent: (value: GuardrailConverseContentBlock) => T;
|
|
398
408
|
_: (name: string, value: any) => T;
|
|
399
409
|
}
|
|
400
410
|
const visit: <T>(value: ContentBlock, visitor: Visitor<T>) => T;
|
|
@@ -412,8 +422,7 @@ export declare const ConversationRole: {
|
|
|
412
422
|
*/
|
|
413
423
|
export type ConversationRole = (typeof ConversationRole)[keyof typeof ConversationRole];
|
|
414
424
|
/**
|
|
415
|
-
* <p>A message
|
|
416
|
-
* <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html">Converse</a>. </p>
|
|
425
|
+
* <p>A message input, or returned from, 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>.</p>
|
|
417
426
|
* @public
|
|
418
427
|
*/
|
|
419
428
|
export interface Message {
|
|
@@ -429,10 +438,10 @@ export interface Message {
|
|
|
429
438
|
content: ContentBlock[] | undefined;
|
|
430
439
|
}
|
|
431
440
|
/**
|
|
432
|
-
* <p>A system content block
|
|
441
|
+
* <p>A system content block.</p>
|
|
433
442
|
* @public
|
|
434
443
|
*/
|
|
435
|
-
export type SystemContentBlock = SystemContentBlock.TextMember | SystemContentBlock.$UnknownMember;
|
|
444
|
+
export type SystemContentBlock = SystemContentBlock.GuardContentMember | SystemContentBlock.TextMember | SystemContentBlock.$UnknownMember;
|
|
436
445
|
/**
|
|
437
446
|
* @public
|
|
438
447
|
*/
|
|
@@ -443,6 +452,18 @@ export declare namespace SystemContentBlock {
|
|
|
443
452
|
*/
|
|
444
453
|
interface TextMember {
|
|
445
454
|
text: string;
|
|
455
|
+
guardContent?: never;
|
|
456
|
+
$unknown?: never;
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* <p>A content block to assess with the guardrail. Use with the Converse API (<a>Converse</a> and <a>ConverseStream</a>). </p>
|
|
460
|
+
* <p>For more information, see <i>Use a guardrail with the Converse
|
|
461
|
+
* API</i> in the <i>Amazon Bedrock User Guide</i>.</p>
|
|
462
|
+
* @public
|
|
463
|
+
*/
|
|
464
|
+
interface GuardContentMember {
|
|
465
|
+
text?: never;
|
|
466
|
+
guardContent: GuardrailConverseContentBlock;
|
|
446
467
|
$unknown?: never;
|
|
447
468
|
}
|
|
448
469
|
/**
|
|
@@ -450,28 +471,31 @@ export declare namespace SystemContentBlock {
|
|
|
450
471
|
*/
|
|
451
472
|
interface $UnknownMember {
|
|
452
473
|
text?: never;
|
|
474
|
+
guardContent?: never;
|
|
453
475
|
$unknown: [string, any];
|
|
454
476
|
}
|
|
455
477
|
interface Visitor<T> {
|
|
456
478
|
text: (value: string) => T;
|
|
479
|
+
guardContent: (value: GuardrailConverseContentBlock) => T;
|
|
457
480
|
_: (name: string, value: any) => T;
|
|
458
481
|
}
|
|
459
482
|
const visit: <T>(value: SystemContentBlock, visitor: Visitor<T>) => T;
|
|
460
483
|
}
|
|
461
484
|
/**
|
|
462
|
-
* <p>The model must request at least one tool (no text is generated)
|
|
485
|
+
* <p>The model must request at least one tool (no text is generated). For example, <code>\{"any" : \{\}\}</code>.</p>
|
|
463
486
|
* @public
|
|
464
487
|
*/
|
|
465
488
|
export interface AnyToolChoice {
|
|
466
489
|
}
|
|
467
490
|
/**
|
|
468
|
-
* <p>The Model automatically decides if a tool should be called or
|
|
491
|
+
* <p>The Model automatically decides if a tool should be called or whether to generate text instead.
|
|
492
|
+
* For example, <code>\{"auto" : \{\}\}</code>.</p>
|
|
469
493
|
* @public
|
|
470
494
|
*/
|
|
471
495
|
export interface AutoToolChoice {
|
|
472
496
|
}
|
|
473
497
|
/**
|
|
474
|
-
* <p>The model must request a specific tool
|
|
498
|
+
* <p>The model must request a specific tool. For example, <code>\{"tool" : \{"name" : "Your tool name"\}\}</code>.</p>
|
|
475
499
|
* <note>
|
|
476
500
|
* <p>This field is only supported by Anthropic Claude 3 models.</p>
|
|
477
501
|
* </note>
|
|
@@ -485,7 +509,9 @@ export interface SpecificToolChoice {
|
|
|
485
509
|
name: string | undefined;
|
|
486
510
|
}
|
|
487
511
|
/**
|
|
488
|
-
* <p>
|
|
512
|
+
* <p>Determines which tools the model should request in a call to <code>Converse</code> or <code>ConverseStream</code>.
|
|
513
|
+
* <code>ToolChoice</code> is only supported by
|
|
514
|
+
* Anthropic Claude 3 models and by Mistral AI Mistral Large.</p>
|
|
489
515
|
* @public
|
|
490
516
|
*/
|
|
491
517
|
export type ToolChoice = ToolChoice.AnyMember | ToolChoice.AutoMember | ToolChoice.ToolMember | ToolChoice.$UnknownMember;
|
|
@@ -494,7 +520,7 @@ export type ToolChoice = ToolChoice.AnyMember | ToolChoice.AutoMember | ToolChoi
|
|
|
494
520
|
*/
|
|
495
521
|
export declare namespace ToolChoice {
|
|
496
522
|
/**
|
|
497
|
-
* <p>The Model automatically decides if a tool should be called or
|
|
523
|
+
* <p>(Default). The Model automatically decides if a tool should be called or whether to generate text instead. </p>
|
|
498
524
|
* @public
|
|
499
525
|
*/
|
|
500
526
|
interface AutoMember {
|
|
@@ -514,7 +540,7 @@ export declare namespace ToolChoice {
|
|
|
514
540
|
$unknown?: never;
|
|
515
541
|
}
|
|
516
542
|
/**
|
|
517
|
-
* <p>The Model must request the specified tool
|
|
543
|
+
* <p>The Model must request the specified tool. Only supported by Anthropic Claude 3 models. </p>
|
|
518
544
|
* @public
|
|
519
545
|
*/
|
|
520
546
|
interface ToolMember {
|
|
@@ -686,6 +712,11 @@ export interface ConverseRequest {
|
|
|
686
712
|
* @public
|
|
687
713
|
*/
|
|
688
714
|
toolConfig?: ToolConfiguration;
|
|
715
|
+
/**
|
|
716
|
+
* <p>Configuration information for a guardrail that you want to use in the request. </p>
|
|
717
|
+
* @public
|
|
718
|
+
*/
|
|
719
|
+
guardrailConfig?: GuardrailConfiguration;
|
|
689
720
|
/**
|
|
690
721
|
* <p>Additional inference parameters that the model supports, beyond the
|
|
691
722
|
* base set of inference parameters that <code>Converse</code> supports in the <code>inferenceConfig</code>
|
|
@@ -696,7 +727,7 @@ export interface ConverseRequest {
|
|
|
696
727
|
/**
|
|
697
728
|
* <p>Additional model parameters field paths to return in the
|
|
698
729
|
* response. <code>Converse</code> returns the requested fields as a JSON Pointer object in the
|
|
699
|
-
* <code>
|
|
730
|
+
* <code>additionalModelResponseFields</code> field. The following is example JSON for <code>additionalModelResponseFieldPaths</code>.</p>
|
|
700
731
|
* <p>
|
|
701
732
|
* <code>[
|
|
702
733
|
* "/stop_sequence"
|
|
@@ -761,6 +792,7 @@ export declare namespace ConverseOutput {
|
|
|
761
792
|
export declare const StopReason: {
|
|
762
793
|
readonly CONTENT_FILTERED: "content_filtered";
|
|
763
794
|
readonly END_TURN: "end_turn";
|
|
795
|
+
readonly GUARDRAIL_INTERVENED: "guardrail_intervened";
|
|
764
796
|
readonly MAX_TOKENS: "max_tokens";
|
|
765
797
|
readonly STOP_SEQUENCE: "stop_sequence";
|
|
766
798
|
readonly TOOL_USE: "tool_use";
|
|
@@ -769,6 +801,382 @@ export declare const StopReason: {
|
|
|
769
801
|
* @public
|
|
770
802
|
*/
|
|
771
803
|
export type StopReason = (typeof StopReason)[keyof typeof StopReason];
|
|
804
|
+
/**
|
|
805
|
+
* @public
|
|
806
|
+
* @enum
|
|
807
|
+
*/
|
|
808
|
+
export declare const GuardrailContentPolicyAction: {
|
|
809
|
+
readonly BLOCKED: "BLOCKED";
|
|
810
|
+
};
|
|
811
|
+
/**
|
|
812
|
+
* @public
|
|
813
|
+
*/
|
|
814
|
+
export type GuardrailContentPolicyAction = (typeof GuardrailContentPolicyAction)[keyof typeof GuardrailContentPolicyAction];
|
|
815
|
+
/**
|
|
816
|
+
* @public
|
|
817
|
+
* @enum
|
|
818
|
+
*/
|
|
819
|
+
export declare const GuardrailContentFilterConfidence: {
|
|
820
|
+
readonly HIGH: "HIGH";
|
|
821
|
+
readonly LOW: "LOW";
|
|
822
|
+
readonly MEDIUM: "MEDIUM";
|
|
823
|
+
readonly NONE: "NONE";
|
|
824
|
+
};
|
|
825
|
+
/**
|
|
826
|
+
* @public
|
|
827
|
+
*/
|
|
828
|
+
export type GuardrailContentFilterConfidence = (typeof GuardrailContentFilterConfidence)[keyof typeof GuardrailContentFilterConfidence];
|
|
829
|
+
/**
|
|
830
|
+
* @public
|
|
831
|
+
* @enum
|
|
832
|
+
*/
|
|
833
|
+
export declare const GuardrailContentFilterType: {
|
|
834
|
+
readonly HATE: "HATE";
|
|
835
|
+
readonly INSULTS: "INSULTS";
|
|
836
|
+
readonly MISCONDUCT: "MISCONDUCT";
|
|
837
|
+
readonly PROMPT_ATTACK: "PROMPT_ATTACK";
|
|
838
|
+
readonly SEXUAL: "SEXUAL";
|
|
839
|
+
readonly VIOLENCE: "VIOLENCE";
|
|
840
|
+
};
|
|
841
|
+
/**
|
|
842
|
+
* @public
|
|
843
|
+
*/
|
|
844
|
+
export type GuardrailContentFilterType = (typeof GuardrailContentFilterType)[keyof typeof GuardrailContentFilterType];
|
|
845
|
+
/**
|
|
846
|
+
* <p>The content filter for a guardrail.</p>
|
|
847
|
+
* @public
|
|
848
|
+
*/
|
|
849
|
+
export interface GuardrailContentFilter {
|
|
850
|
+
/**
|
|
851
|
+
* <p>The guardrail type.</p>
|
|
852
|
+
* @public
|
|
853
|
+
*/
|
|
854
|
+
type: GuardrailContentFilterType | undefined;
|
|
855
|
+
/**
|
|
856
|
+
* <p>The guardrail confidence.</p>
|
|
857
|
+
* @public
|
|
858
|
+
*/
|
|
859
|
+
confidence: GuardrailContentFilterConfidence | undefined;
|
|
860
|
+
/**
|
|
861
|
+
* <p>The guardrail action.</p>
|
|
862
|
+
* @public
|
|
863
|
+
*/
|
|
864
|
+
action: GuardrailContentPolicyAction | undefined;
|
|
865
|
+
}
|
|
866
|
+
/**
|
|
867
|
+
* <p>An assessment of a content policy for a guardrail.</p>
|
|
868
|
+
* @public
|
|
869
|
+
*/
|
|
870
|
+
export interface GuardrailContentPolicyAssessment {
|
|
871
|
+
/**
|
|
872
|
+
* <p>The content policy filters.</p>
|
|
873
|
+
* @public
|
|
874
|
+
*/
|
|
875
|
+
filters: GuardrailContentFilter[] | undefined;
|
|
876
|
+
}
|
|
877
|
+
/**
|
|
878
|
+
* @public
|
|
879
|
+
* @enum
|
|
880
|
+
*/
|
|
881
|
+
export declare const GuardrailSensitiveInformationPolicyAction: {
|
|
882
|
+
readonly ANONYMIZED: "ANONYMIZED";
|
|
883
|
+
readonly BLOCKED: "BLOCKED";
|
|
884
|
+
};
|
|
885
|
+
/**
|
|
886
|
+
* @public
|
|
887
|
+
*/
|
|
888
|
+
export type GuardrailSensitiveInformationPolicyAction = (typeof GuardrailSensitiveInformationPolicyAction)[keyof typeof GuardrailSensitiveInformationPolicyAction];
|
|
889
|
+
/**
|
|
890
|
+
* @public
|
|
891
|
+
* @enum
|
|
892
|
+
*/
|
|
893
|
+
export declare const GuardrailPiiEntityType: {
|
|
894
|
+
readonly ADDRESS: "ADDRESS";
|
|
895
|
+
readonly AGE: "AGE";
|
|
896
|
+
readonly AWS_ACCESS_KEY: "AWS_ACCESS_KEY";
|
|
897
|
+
readonly AWS_SECRET_KEY: "AWS_SECRET_KEY";
|
|
898
|
+
readonly CA_HEALTH_NUMBER: "CA_HEALTH_NUMBER";
|
|
899
|
+
readonly CA_SOCIAL_INSURANCE_NUMBER: "CA_SOCIAL_INSURANCE_NUMBER";
|
|
900
|
+
readonly CREDIT_DEBIT_CARD_CVV: "CREDIT_DEBIT_CARD_CVV";
|
|
901
|
+
readonly CREDIT_DEBIT_CARD_EXPIRY: "CREDIT_DEBIT_CARD_EXPIRY";
|
|
902
|
+
readonly CREDIT_DEBIT_CARD_NUMBER: "CREDIT_DEBIT_CARD_NUMBER";
|
|
903
|
+
readonly DRIVER_ID: "DRIVER_ID";
|
|
904
|
+
readonly EMAIL: "EMAIL";
|
|
905
|
+
readonly INTERNATIONAL_BANK_ACCOUNT_NUMBER: "INTERNATIONAL_BANK_ACCOUNT_NUMBER";
|
|
906
|
+
readonly IP_ADDRESS: "IP_ADDRESS";
|
|
907
|
+
readonly LICENSE_PLATE: "LICENSE_PLATE";
|
|
908
|
+
readonly MAC_ADDRESS: "MAC_ADDRESS";
|
|
909
|
+
readonly NAME: "NAME";
|
|
910
|
+
readonly PASSWORD: "PASSWORD";
|
|
911
|
+
readonly PHONE: "PHONE";
|
|
912
|
+
readonly PIN: "PIN";
|
|
913
|
+
readonly SWIFT_CODE: "SWIFT_CODE";
|
|
914
|
+
readonly UK_NATIONAL_HEALTH_SERVICE_NUMBER: "UK_NATIONAL_HEALTH_SERVICE_NUMBER";
|
|
915
|
+
readonly UK_NATIONAL_INSURANCE_NUMBER: "UK_NATIONAL_INSURANCE_NUMBER";
|
|
916
|
+
readonly UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER: "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER";
|
|
917
|
+
readonly URL: "URL";
|
|
918
|
+
readonly USERNAME: "USERNAME";
|
|
919
|
+
readonly US_BANK_ACCOUNT_NUMBER: "US_BANK_ACCOUNT_NUMBER";
|
|
920
|
+
readonly US_BANK_ROUTING_NUMBER: "US_BANK_ROUTING_NUMBER";
|
|
921
|
+
readonly US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER: "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER";
|
|
922
|
+
readonly US_PASSPORT_NUMBER: "US_PASSPORT_NUMBER";
|
|
923
|
+
readonly US_SOCIAL_SECURITY_NUMBER: "US_SOCIAL_SECURITY_NUMBER";
|
|
924
|
+
readonly VEHICLE_IDENTIFICATION_NUMBER: "VEHICLE_IDENTIFICATION_NUMBER";
|
|
925
|
+
};
|
|
926
|
+
/**
|
|
927
|
+
* @public
|
|
928
|
+
*/
|
|
929
|
+
export type GuardrailPiiEntityType = (typeof GuardrailPiiEntityType)[keyof typeof GuardrailPiiEntityType];
|
|
930
|
+
/**
|
|
931
|
+
* <p>A Personally Identifiable Information (PII) entity configured in a guardrail.</p>
|
|
932
|
+
* @public
|
|
933
|
+
*/
|
|
934
|
+
export interface GuardrailPiiEntityFilter {
|
|
935
|
+
/**
|
|
936
|
+
* <p>The PII entity filter match.</p>
|
|
937
|
+
* @public
|
|
938
|
+
*/
|
|
939
|
+
match: string | undefined;
|
|
940
|
+
/**
|
|
941
|
+
* <p>The PII entity filter type.</p>
|
|
942
|
+
* @public
|
|
943
|
+
*/
|
|
944
|
+
type: GuardrailPiiEntityType | undefined;
|
|
945
|
+
/**
|
|
946
|
+
* <p>The PII entity filter action.</p>
|
|
947
|
+
* @public
|
|
948
|
+
*/
|
|
949
|
+
action: GuardrailSensitiveInformationPolicyAction | undefined;
|
|
950
|
+
}
|
|
951
|
+
/**
|
|
952
|
+
* <p>A Regex filter configured in a guardrail.</p>
|
|
953
|
+
* @public
|
|
954
|
+
*/
|
|
955
|
+
export interface GuardrailRegexFilter {
|
|
956
|
+
/**
|
|
957
|
+
* <p>The regex filter name.</p>
|
|
958
|
+
* @public
|
|
959
|
+
*/
|
|
960
|
+
name?: string;
|
|
961
|
+
/**
|
|
962
|
+
* <p>The regesx filter match.</p>
|
|
963
|
+
* @public
|
|
964
|
+
*/
|
|
965
|
+
match?: string;
|
|
966
|
+
/**
|
|
967
|
+
* <p>The regex query.</p>
|
|
968
|
+
* @public
|
|
969
|
+
*/
|
|
970
|
+
regex?: string;
|
|
971
|
+
/**
|
|
972
|
+
* <p>The region filter action.</p>
|
|
973
|
+
* @public
|
|
974
|
+
*/
|
|
975
|
+
action: GuardrailSensitiveInformationPolicyAction | undefined;
|
|
976
|
+
}
|
|
977
|
+
/**
|
|
978
|
+
* <p>The assessment for aPersonally Identifiable Information (PII) policy. </p>
|
|
979
|
+
* @public
|
|
980
|
+
*/
|
|
981
|
+
export interface GuardrailSensitiveInformationPolicyAssessment {
|
|
982
|
+
/**
|
|
983
|
+
* <p>The PII entities in the assessment.</p>
|
|
984
|
+
* @public
|
|
985
|
+
*/
|
|
986
|
+
piiEntities: GuardrailPiiEntityFilter[] | undefined;
|
|
987
|
+
/**
|
|
988
|
+
* <p>The regex queries in the assessment.</p>
|
|
989
|
+
* @public
|
|
990
|
+
*/
|
|
991
|
+
regexes: GuardrailRegexFilter[] | undefined;
|
|
992
|
+
}
|
|
993
|
+
/**
|
|
994
|
+
* @public
|
|
995
|
+
* @enum
|
|
996
|
+
*/
|
|
997
|
+
export declare const GuardrailTopicPolicyAction: {
|
|
998
|
+
readonly BLOCKED: "BLOCKED";
|
|
999
|
+
};
|
|
1000
|
+
/**
|
|
1001
|
+
* @public
|
|
1002
|
+
*/
|
|
1003
|
+
export type GuardrailTopicPolicyAction = (typeof GuardrailTopicPolicyAction)[keyof typeof GuardrailTopicPolicyAction];
|
|
1004
|
+
/**
|
|
1005
|
+
* @public
|
|
1006
|
+
* @enum
|
|
1007
|
+
*/
|
|
1008
|
+
export declare const GuardrailTopicType: {
|
|
1009
|
+
readonly DENY: "DENY";
|
|
1010
|
+
};
|
|
1011
|
+
/**
|
|
1012
|
+
* @public
|
|
1013
|
+
*/
|
|
1014
|
+
export type GuardrailTopicType = (typeof GuardrailTopicType)[keyof typeof GuardrailTopicType];
|
|
1015
|
+
/**
|
|
1016
|
+
* <p>Information about a topic guardrail.</p>
|
|
1017
|
+
* @public
|
|
1018
|
+
*/
|
|
1019
|
+
export interface GuardrailTopic {
|
|
1020
|
+
/**
|
|
1021
|
+
* <p>The name for the guardrail.</p>
|
|
1022
|
+
* @public
|
|
1023
|
+
*/
|
|
1024
|
+
name: string | undefined;
|
|
1025
|
+
/**
|
|
1026
|
+
* <p>The type behavior that the guardrail should perform when the model detects the topic.</p>
|
|
1027
|
+
* @public
|
|
1028
|
+
*/
|
|
1029
|
+
type: GuardrailTopicType | undefined;
|
|
1030
|
+
/**
|
|
1031
|
+
* <p>The action the guardrail should take when it intervenes on a topic.</p>
|
|
1032
|
+
* @public
|
|
1033
|
+
*/
|
|
1034
|
+
action: GuardrailTopicPolicyAction | undefined;
|
|
1035
|
+
}
|
|
1036
|
+
/**
|
|
1037
|
+
* <p>A behavior assessment of a topic policy.</p>
|
|
1038
|
+
* @public
|
|
1039
|
+
*/
|
|
1040
|
+
export interface GuardrailTopicPolicyAssessment {
|
|
1041
|
+
/**
|
|
1042
|
+
* <p>The topics in the assessment.</p>
|
|
1043
|
+
* @public
|
|
1044
|
+
*/
|
|
1045
|
+
topics: GuardrailTopic[] | undefined;
|
|
1046
|
+
}
|
|
1047
|
+
/**
|
|
1048
|
+
* @public
|
|
1049
|
+
* @enum
|
|
1050
|
+
*/
|
|
1051
|
+
export declare const GuardrailWordPolicyAction: {
|
|
1052
|
+
readonly BLOCKED: "BLOCKED";
|
|
1053
|
+
};
|
|
1054
|
+
/**
|
|
1055
|
+
* @public
|
|
1056
|
+
*/
|
|
1057
|
+
export type GuardrailWordPolicyAction = (typeof GuardrailWordPolicyAction)[keyof typeof GuardrailWordPolicyAction];
|
|
1058
|
+
/**
|
|
1059
|
+
* <p>A custom word configured in a guardrail.</p>
|
|
1060
|
+
* @public
|
|
1061
|
+
*/
|
|
1062
|
+
export interface GuardrailCustomWord {
|
|
1063
|
+
/**
|
|
1064
|
+
* <p>The match for the custom word.</p>
|
|
1065
|
+
* @public
|
|
1066
|
+
*/
|
|
1067
|
+
match: string | undefined;
|
|
1068
|
+
/**
|
|
1069
|
+
* <p>The action for the custom word.</p>
|
|
1070
|
+
* @public
|
|
1071
|
+
*/
|
|
1072
|
+
action: GuardrailWordPolicyAction | undefined;
|
|
1073
|
+
}
|
|
1074
|
+
/**
|
|
1075
|
+
* @public
|
|
1076
|
+
* @enum
|
|
1077
|
+
*/
|
|
1078
|
+
export declare const GuardrailManagedWordType: {
|
|
1079
|
+
readonly PROFANITY: "PROFANITY";
|
|
1080
|
+
};
|
|
1081
|
+
/**
|
|
1082
|
+
* @public
|
|
1083
|
+
*/
|
|
1084
|
+
export type GuardrailManagedWordType = (typeof GuardrailManagedWordType)[keyof typeof GuardrailManagedWordType];
|
|
1085
|
+
/**
|
|
1086
|
+
* <p>A managed word configured in a guardrail.</p>
|
|
1087
|
+
* @public
|
|
1088
|
+
*/
|
|
1089
|
+
export interface GuardrailManagedWord {
|
|
1090
|
+
/**
|
|
1091
|
+
* <p>The match for the managed word.</p>
|
|
1092
|
+
* @public
|
|
1093
|
+
*/
|
|
1094
|
+
match: string | undefined;
|
|
1095
|
+
/**
|
|
1096
|
+
* <p>The type for the managed word.</p>
|
|
1097
|
+
* @public
|
|
1098
|
+
*/
|
|
1099
|
+
type: GuardrailManagedWordType | undefined;
|
|
1100
|
+
/**
|
|
1101
|
+
* <p>The action for the managed word.</p>
|
|
1102
|
+
* @public
|
|
1103
|
+
*/
|
|
1104
|
+
action: GuardrailWordPolicyAction | undefined;
|
|
1105
|
+
}
|
|
1106
|
+
/**
|
|
1107
|
+
* <p>The word policy assessment.</p>
|
|
1108
|
+
* @public
|
|
1109
|
+
*/
|
|
1110
|
+
export interface GuardrailWordPolicyAssessment {
|
|
1111
|
+
/**
|
|
1112
|
+
* <p>Custom words in the assessment.</p>
|
|
1113
|
+
* @public
|
|
1114
|
+
*/
|
|
1115
|
+
customWords: GuardrailCustomWord[] | undefined;
|
|
1116
|
+
/**
|
|
1117
|
+
* <p>Managed word lists in the assessment.</p>
|
|
1118
|
+
* @public
|
|
1119
|
+
*/
|
|
1120
|
+
managedWordLists: GuardrailManagedWord[] | undefined;
|
|
1121
|
+
}
|
|
1122
|
+
/**
|
|
1123
|
+
* <p>A behavior assessment of the guardrail policies used in a call to the Converse API. </p>
|
|
1124
|
+
* @public
|
|
1125
|
+
*/
|
|
1126
|
+
export interface GuardrailAssessment {
|
|
1127
|
+
/**
|
|
1128
|
+
* <p>The topic policy.</p>
|
|
1129
|
+
* @public
|
|
1130
|
+
*/
|
|
1131
|
+
topicPolicy?: GuardrailTopicPolicyAssessment;
|
|
1132
|
+
/**
|
|
1133
|
+
* <p>The content policy.</p>
|
|
1134
|
+
* @public
|
|
1135
|
+
*/
|
|
1136
|
+
contentPolicy?: GuardrailContentPolicyAssessment;
|
|
1137
|
+
/**
|
|
1138
|
+
* <p>The word policy.</p>
|
|
1139
|
+
* @public
|
|
1140
|
+
*/
|
|
1141
|
+
wordPolicy?: GuardrailWordPolicyAssessment;
|
|
1142
|
+
/**
|
|
1143
|
+
* <p>The sensitive information policy.</p>
|
|
1144
|
+
* @public
|
|
1145
|
+
*/
|
|
1146
|
+
sensitiveInformationPolicy?: GuardrailSensitiveInformationPolicyAssessment;
|
|
1147
|
+
}
|
|
1148
|
+
/**
|
|
1149
|
+
* <p>A Top level guardrail trace object. For more information, see <a>ConverseTrace</a>.</p>
|
|
1150
|
+
* @public
|
|
1151
|
+
*/
|
|
1152
|
+
export interface GuardrailTraceAssessment {
|
|
1153
|
+
/**
|
|
1154
|
+
* <p>The output from the model.</p>
|
|
1155
|
+
* @public
|
|
1156
|
+
*/
|
|
1157
|
+
modelOutput?: string[];
|
|
1158
|
+
/**
|
|
1159
|
+
* <p>The input assessment.</p>
|
|
1160
|
+
* @public
|
|
1161
|
+
*/
|
|
1162
|
+
inputAssessment?: Record<string, GuardrailAssessment>;
|
|
1163
|
+
/**
|
|
1164
|
+
* <p>the output assessments.</p>
|
|
1165
|
+
* @public
|
|
1166
|
+
*/
|
|
1167
|
+
outputAssessments?: Record<string, GuardrailAssessment[]>;
|
|
1168
|
+
}
|
|
1169
|
+
/**
|
|
1170
|
+
* <p>The trace object in a response from <a>Converse</a>. Currently, you can only trace guardrails.</p>
|
|
1171
|
+
* @public
|
|
1172
|
+
*/
|
|
1173
|
+
export interface ConverseTrace {
|
|
1174
|
+
/**
|
|
1175
|
+
* <p>The guardrail trace object. </p>
|
|
1176
|
+
* @public
|
|
1177
|
+
*/
|
|
1178
|
+
guardrail?: GuardrailTraceAssessment;
|
|
1179
|
+
}
|
|
772
1180
|
/**
|
|
773
1181
|
* <p>The tokens used in a message API inference call. </p>
|
|
774
1182
|
* @public
|
|
@@ -820,6 +1228,11 @@ export interface ConverseResponse {
|
|
|
820
1228
|
* @public
|
|
821
1229
|
*/
|
|
822
1230
|
additionalModelResponseFields?: __DocumentType;
|
|
1231
|
+
/**
|
|
1232
|
+
* <p>A trace object that contains information about the Guardrail behavior.</p>
|
|
1233
|
+
* @public
|
|
1234
|
+
*/
|
|
1235
|
+
trace?: ConverseTrace;
|
|
823
1236
|
}
|
|
824
1237
|
/**
|
|
825
1238
|
* <p>An internal server error occurred. Retry your request.</p>
|
|
@@ -915,6 +1328,47 @@ export declare class ValidationException extends __BaseException {
|
|
|
915
1328
|
*/
|
|
916
1329
|
constructor(opts: __ExceptionOptionType<ValidationException, __BaseException>);
|
|
917
1330
|
}
|
|
1331
|
+
/**
|
|
1332
|
+
* @public
|
|
1333
|
+
* @enum
|
|
1334
|
+
*/
|
|
1335
|
+
export declare const GuardrailStreamProcessingMode: {
|
|
1336
|
+
readonly ASYNC: "async";
|
|
1337
|
+
readonly SYNC: "sync";
|
|
1338
|
+
};
|
|
1339
|
+
/**
|
|
1340
|
+
* @public
|
|
1341
|
+
*/
|
|
1342
|
+
export type GuardrailStreamProcessingMode = (typeof GuardrailStreamProcessingMode)[keyof typeof GuardrailStreamProcessingMode];
|
|
1343
|
+
/**
|
|
1344
|
+
* <p>Configuration information for a guardrail that you use with the <a>ConverseStream</a> action.
|
|
1345
|
+
* </p>
|
|
1346
|
+
* @public
|
|
1347
|
+
*/
|
|
1348
|
+
export interface GuardrailStreamConfiguration {
|
|
1349
|
+
/**
|
|
1350
|
+
* <p>The identifier for the guardrail.</p>
|
|
1351
|
+
* @public
|
|
1352
|
+
*/
|
|
1353
|
+
guardrailIdentifier: string | undefined;
|
|
1354
|
+
/**
|
|
1355
|
+
* <p>The version of the guardrail.</p>
|
|
1356
|
+
* @public
|
|
1357
|
+
*/
|
|
1358
|
+
guardrailVersion: string | undefined;
|
|
1359
|
+
/**
|
|
1360
|
+
* <p>The trace behavior for the guardrail.</p>
|
|
1361
|
+
* @public
|
|
1362
|
+
*/
|
|
1363
|
+
trace?: GuardrailTrace;
|
|
1364
|
+
/**
|
|
1365
|
+
* <p>The processing mode. </p>
|
|
1366
|
+
* <p>The processing mode. For more information, see <i>Configure streaming response behavior</i> in the <i>Amazon Bedrock User Guide</i>.
|
|
1367
|
+
* </p>
|
|
1368
|
+
* @public
|
|
1369
|
+
*/
|
|
1370
|
+
streamProcessingMode?: GuardrailStreamProcessingMode;
|
|
1371
|
+
}
|
|
918
1372
|
/**
|
|
919
1373
|
* @public
|
|
920
1374
|
*/
|
|
@@ -961,6 +1415,11 @@ export interface ConverseStreamRequest {
|
|
|
961
1415
|
* @public
|
|
962
1416
|
*/
|
|
963
1417
|
toolConfig?: ToolConfiguration;
|
|
1418
|
+
/**
|
|
1419
|
+
* <p>Configuration information for a guardrail that you want to use in the request. </p>
|
|
1420
|
+
* @public
|
|
1421
|
+
*/
|
|
1422
|
+
guardrailConfig?: GuardrailStreamConfiguration;
|
|
964
1423
|
/**
|
|
965
1424
|
* <p>Additional inference parameters that the model supports, beyond the
|
|
966
1425
|
* base set of inference parameters that <code>ConverseStream</code> supports in the <code>inferenceConfig</code>
|
|
@@ -971,7 +1430,7 @@ export interface ConverseStreamRequest {
|
|
|
971
1430
|
/**
|
|
972
1431
|
* <p>Additional model parameters field paths to return in the
|
|
973
1432
|
* response. <code>ConverseStream</code> returns the requested fields as a JSON Pointer object in the
|
|
974
|
-
* <code>
|
|
1433
|
+
* <code>additionalModelResponseFields</code> field. The following is example JSON for <code>additionalModelResponseFieldPaths</code>.</p>
|
|
975
1434
|
* <p>
|
|
976
1435
|
* <code>[
|
|
977
1436
|
* "/stop_sequence"
|
|
@@ -1167,6 +1626,17 @@ export interface ConverseStreamMetrics {
|
|
|
1167
1626
|
*/
|
|
1168
1627
|
latencyMs: number | undefined;
|
|
1169
1628
|
}
|
|
1629
|
+
/**
|
|
1630
|
+
* <p>The trace object in a response from <a>ConverseStream</a>. Currently, you can only trace guardrails.</p>
|
|
1631
|
+
* @public
|
|
1632
|
+
*/
|
|
1633
|
+
export interface ConverseStreamTrace {
|
|
1634
|
+
/**
|
|
1635
|
+
* <p>The guardrail trace object. </p>
|
|
1636
|
+
* @public
|
|
1637
|
+
*/
|
|
1638
|
+
guardrail?: GuardrailTraceAssessment;
|
|
1639
|
+
}
|
|
1170
1640
|
/**
|
|
1171
1641
|
* <p>A conversation stream metadata event.</p>
|
|
1172
1642
|
* @public
|
|
@@ -1182,6 +1652,11 @@ export interface ConverseStreamMetadataEvent {
|
|
|
1182
1652
|
* @public
|
|
1183
1653
|
*/
|
|
1184
1654
|
metrics: ConverseStreamMetrics | undefined;
|
|
1655
|
+
/**
|
|
1656
|
+
* <p>The trace object in the response from <a>ConverseStream</a> that contains information about the guardrail behavior.</p>
|
|
1657
|
+
* @public
|
|
1658
|
+
*/
|
|
1659
|
+
trace?: ConverseStreamTrace;
|
|
1185
1660
|
}
|
|
1186
1661
|
/**
|
|
1187
1662
|
* <p>An error occurred while streaming the response. Retry your request.</p>
|
|
@@ -1442,12 +1917,12 @@ export type Trace = (typeof Trace)[keyof typeof Trace];
|
|
|
1442
1917
|
*/
|
|
1443
1918
|
export interface InvokeModelRequest {
|
|
1444
1919
|
/**
|
|
1445
|
-
* <p>The prompt and inference parameters in the format specified in the <code>contentType</code> in the header. 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>
|
|
1920
|
+
* <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>
|
|
1446
1921
|
* @public
|
|
1447
1922
|
*/
|
|
1448
1923
|
body: Uint8Array | undefined;
|
|
1449
1924
|
/**
|
|
1450
|
-
* <p>The MIME type of the input data in the request.
|
|
1925
|
+
* <p>The MIME type of the input data in the request. You must specify
|
|
1451
1926
|
* <code>application/json</code>.</p>
|
|
1452
1927
|
* @public
|
|
1453
1928
|
*/
|
|
@@ -1535,12 +2010,12 @@ export declare class ServiceQuotaExceededException extends __BaseException {
|
|
|
1535
2010
|
*/
|
|
1536
2011
|
export interface InvokeModelWithResponseStreamRequest {
|
|
1537
2012
|
/**
|
|
1538
|
-
* <p>The prompt and inference parameters in the format specified in the <code>contentType</code> in the header. 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>
|
|
2013
|
+
* <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>
|
|
1539
2014
|
* @public
|
|
1540
2015
|
*/
|
|
1541
2016
|
body: Uint8Array | undefined;
|
|
1542
2017
|
/**
|
|
1543
|
-
* <p>The MIME type of the input data in the request.
|
|
2018
|
+
* <p>The MIME type of the input data in the request. You must specify
|
|
1544
2019
|
* <code>application/json</code>.</p>
|
|
1545
2020
|
* @public
|
|
1546
2021
|
*/
|