@aws-sdk/client-bedrock-runtime 3.782.0 → 3.785.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/README.md +8 -0
- package/dist-cjs/index.js +232 -8
- package/dist-cjs/runtimeConfig.browser.js +2 -0
- package/dist-cjs/runtimeConfig.js +2 -0
- package/dist-cjs/runtimeConfig.native.js +3 -0
- package/dist-es/BedrockRuntime.js +2 -0
- package/dist-es/BedrockRuntimeClient.js +4 -2
- package/dist-es/commands/InvokeModelWithBidirectionalStreamCommand.js +30 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/models/models_0.js +78 -0
- package/dist-es/protocols/Aws_restJson1.js +105 -2
- package/dist-es/runtimeConfig.browser.js +3 -1
- package/dist-es/runtimeConfig.js +2 -0
- package/dist-es/runtimeConfig.native.js +3 -0
- package/dist-types/BedrockRuntime.d.ts +7 -0
- package/dist-types/BedrockRuntimeClient.d.ts +12 -4
- package/dist-types/commands/ApplyGuardrailCommand.d.ts +15 -6
- package/dist-types/commands/ConverseCommand.d.ts +28 -13
- package/dist-types/commands/ConverseStreamCommand.d.ts +28 -13
- package/dist-types/commands/InvokeModelCommand.d.ts +1 -1
- package/dist-types/commands/InvokeModelWithBidirectionalStreamCommand.d.ts +144 -0
- package/dist-types/commands/InvokeModelWithResponseStreamCommand.d.ts +1 -1
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +302 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +9 -0
- package/dist-types/runtimeConfig.browser.d.ts +1 -0
- package/dist-types/runtimeConfig.d.ts +1 -0
- package/dist-types/runtimeConfig.native.d.ts +1 -0
- package/dist-types/ts3.4/BedrockRuntime.d.ts +23 -0
- package/dist-types/ts3.4/BedrockRuntimeClient.d.ts +14 -0
- package/dist-types/ts3.4/commands/InvokeModelWithBidirectionalStreamCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +179 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +12 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +1 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -0
- package/package.json +3 -1
|
@@ -208,7 +208,7 @@ declare const ConverseCommand_base: {
|
|
|
208
208
|
* guardrailConfig: { // GuardrailConfiguration
|
|
209
209
|
* guardrailIdentifier: "STRING_VALUE", // required
|
|
210
210
|
* guardrailVersion: "STRING_VALUE", // required
|
|
211
|
-
* trace: "enabled" || "disabled",
|
|
211
|
+
* trace: "enabled" || "disabled" || "enabled_full",
|
|
212
212
|
* },
|
|
213
213
|
* additionalModelRequestFields: "DOCUMENT_VALUE",
|
|
214
214
|
* promptVariables: { // PromptVariableMap
|
|
@@ -348,7 +348,8 @@ declare const ConverseCommand_base: {
|
|
|
348
348
|
* // { // GuardrailTopic
|
|
349
349
|
* // name: "STRING_VALUE", // required
|
|
350
350
|
* // type: "DENY", // required
|
|
351
|
-
* // action: "BLOCKED", // required
|
|
351
|
+
* // action: "BLOCKED" || "NONE", // required
|
|
352
|
+
* // detected: true || false,
|
|
352
353
|
* // },
|
|
353
354
|
* // ],
|
|
354
355
|
* // },
|
|
@@ -358,7 +359,8 @@ declare const ConverseCommand_base: {
|
|
|
358
359
|
* // type: "INSULTS" || "HATE" || "SEXUAL" || "VIOLENCE" || "MISCONDUCT" || "PROMPT_ATTACK", // required
|
|
359
360
|
* // confidence: "NONE" || "LOW" || "MEDIUM" || "HIGH", // required
|
|
360
361
|
* // filterStrength: "NONE" || "LOW" || "MEDIUM" || "HIGH",
|
|
361
|
-
* // action: "BLOCKED", // required
|
|
362
|
+
* // action: "BLOCKED" || "NONE", // required
|
|
363
|
+
* // detected: true || false,
|
|
362
364
|
* // },
|
|
363
365
|
* // ],
|
|
364
366
|
* // },
|
|
@@ -366,14 +368,16 @@ declare const ConverseCommand_base: {
|
|
|
366
368
|
* // customWords: [ // GuardrailCustomWordList // required
|
|
367
369
|
* // { // GuardrailCustomWord
|
|
368
370
|
* // match: "STRING_VALUE", // required
|
|
369
|
-
* // action: "BLOCKED", // required
|
|
371
|
+
* // action: "BLOCKED" || "NONE", // required
|
|
372
|
+
* // detected: true || false,
|
|
370
373
|
* // },
|
|
371
374
|
* // ],
|
|
372
375
|
* // managedWordLists: [ // GuardrailManagedWordList // required
|
|
373
376
|
* // { // GuardrailManagedWord
|
|
374
377
|
* // match: "STRING_VALUE", // required
|
|
375
378
|
* // type: "PROFANITY", // required
|
|
376
|
-
* // action: "BLOCKED", // required
|
|
379
|
+
* // action: "BLOCKED" || "NONE", // required
|
|
380
|
+
* // detected: true || false,
|
|
377
381
|
* // },
|
|
378
382
|
* // ],
|
|
379
383
|
* // },
|
|
@@ -382,7 +386,8 @@ declare const ConverseCommand_base: {
|
|
|
382
386
|
* // { // GuardrailPiiEntityFilter
|
|
383
387
|
* // match: "STRING_VALUE", // required
|
|
384
388
|
* // type: "ADDRESS" || "AGE" || "AWS_ACCESS_KEY" || "AWS_SECRET_KEY" || "CA_HEALTH_NUMBER" || "CA_SOCIAL_INSURANCE_NUMBER" || "CREDIT_DEBIT_CARD_CVV" || "CREDIT_DEBIT_CARD_EXPIRY" || "CREDIT_DEBIT_CARD_NUMBER" || "DRIVER_ID" || "EMAIL" || "INTERNATIONAL_BANK_ACCOUNT_NUMBER" || "IP_ADDRESS" || "LICENSE_PLATE" || "MAC_ADDRESS" || "NAME" || "PASSWORD" || "PHONE" || "PIN" || "SWIFT_CODE" || "UK_NATIONAL_HEALTH_SERVICE_NUMBER" || "UK_NATIONAL_INSURANCE_NUMBER" || "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER" || "URL" || "USERNAME" || "US_BANK_ACCOUNT_NUMBER" || "US_BANK_ROUTING_NUMBER" || "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER" || "US_PASSPORT_NUMBER" || "US_SOCIAL_SECURITY_NUMBER" || "VEHICLE_IDENTIFICATION_NUMBER", // required
|
|
385
|
-
* // action: "ANONYMIZED" || "BLOCKED", // required
|
|
389
|
+
* // action: "ANONYMIZED" || "BLOCKED" || "NONE", // required
|
|
390
|
+
* // detected: true || false,
|
|
386
391
|
* // },
|
|
387
392
|
* // ],
|
|
388
393
|
* // regexes: [ // GuardrailRegexFilterList // required
|
|
@@ -390,7 +395,8 @@ declare const ConverseCommand_base: {
|
|
|
390
395
|
* // name: "STRING_VALUE",
|
|
391
396
|
* // match: "STRING_VALUE",
|
|
392
397
|
* // regex: "STRING_VALUE",
|
|
393
|
-
* // action: "ANONYMIZED" || "BLOCKED", // required
|
|
398
|
+
* // action: "ANONYMIZED" || "BLOCKED" || "NONE", // required
|
|
399
|
+
* // detected: true || false,
|
|
394
400
|
* // },
|
|
395
401
|
* // ],
|
|
396
402
|
* // },
|
|
@@ -401,6 +407,7 @@ declare const ConverseCommand_base: {
|
|
|
401
407
|
* // threshold: Number("double"), // required
|
|
402
408
|
* // score: Number("double"), // required
|
|
403
409
|
* // action: "BLOCKED" || "NONE", // required
|
|
410
|
+
* // detected: true || false,
|
|
404
411
|
* // },
|
|
405
412
|
* // ],
|
|
406
413
|
* // },
|
|
@@ -436,7 +443,8 @@ declare const ConverseCommand_base: {
|
|
|
436
443
|
* // {
|
|
437
444
|
* // name: "STRING_VALUE", // required
|
|
438
445
|
* // type: "DENY", // required
|
|
439
|
-
* // action: "BLOCKED", // required
|
|
446
|
+
* // action: "BLOCKED" || "NONE", // required
|
|
447
|
+
* // detected: true || false,
|
|
440
448
|
* // },
|
|
441
449
|
* // ],
|
|
442
450
|
* // },
|
|
@@ -446,7 +454,8 @@ declare const ConverseCommand_base: {
|
|
|
446
454
|
* // type: "INSULTS" || "HATE" || "SEXUAL" || "VIOLENCE" || "MISCONDUCT" || "PROMPT_ATTACK", // required
|
|
447
455
|
* // confidence: "NONE" || "LOW" || "MEDIUM" || "HIGH", // required
|
|
448
456
|
* // filterStrength: "NONE" || "LOW" || "MEDIUM" || "HIGH",
|
|
449
|
-
* // action: "BLOCKED", // required
|
|
457
|
+
* // action: "BLOCKED" || "NONE", // required
|
|
458
|
+
* // detected: true || false,
|
|
450
459
|
* // },
|
|
451
460
|
* // ],
|
|
452
461
|
* // },
|
|
@@ -454,14 +463,16 @@ declare const ConverseCommand_base: {
|
|
|
454
463
|
* // customWords: [ // required
|
|
455
464
|
* // {
|
|
456
465
|
* // match: "STRING_VALUE", // required
|
|
457
|
-
* // action: "BLOCKED", // required
|
|
466
|
+
* // action: "BLOCKED" || "NONE", // required
|
|
467
|
+
* // detected: true || false,
|
|
458
468
|
* // },
|
|
459
469
|
* // ],
|
|
460
470
|
* // managedWordLists: [ // required
|
|
461
471
|
* // {
|
|
462
472
|
* // match: "STRING_VALUE", // required
|
|
463
473
|
* // type: "PROFANITY", // required
|
|
464
|
-
* // action: "BLOCKED", // required
|
|
474
|
+
* // action: "BLOCKED" || "NONE", // required
|
|
475
|
+
* // detected: true || false,
|
|
465
476
|
* // },
|
|
466
477
|
* // ],
|
|
467
478
|
* // },
|
|
@@ -470,7 +481,8 @@ declare const ConverseCommand_base: {
|
|
|
470
481
|
* // {
|
|
471
482
|
* // match: "STRING_VALUE", // required
|
|
472
483
|
* // type: "ADDRESS" || "AGE" || "AWS_ACCESS_KEY" || "AWS_SECRET_KEY" || "CA_HEALTH_NUMBER" || "CA_SOCIAL_INSURANCE_NUMBER" || "CREDIT_DEBIT_CARD_CVV" || "CREDIT_DEBIT_CARD_EXPIRY" || "CREDIT_DEBIT_CARD_NUMBER" || "DRIVER_ID" || "EMAIL" || "INTERNATIONAL_BANK_ACCOUNT_NUMBER" || "IP_ADDRESS" || "LICENSE_PLATE" || "MAC_ADDRESS" || "NAME" || "PASSWORD" || "PHONE" || "PIN" || "SWIFT_CODE" || "UK_NATIONAL_HEALTH_SERVICE_NUMBER" || "UK_NATIONAL_INSURANCE_NUMBER" || "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER" || "URL" || "USERNAME" || "US_BANK_ACCOUNT_NUMBER" || "US_BANK_ROUTING_NUMBER" || "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER" || "US_PASSPORT_NUMBER" || "US_SOCIAL_SECURITY_NUMBER" || "VEHICLE_IDENTIFICATION_NUMBER", // required
|
|
473
|
-
* // action: "ANONYMIZED" || "BLOCKED", // required
|
|
484
|
+
* // action: "ANONYMIZED" || "BLOCKED" || "NONE", // required
|
|
485
|
+
* // detected: true || false,
|
|
474
486
|
* // },
|
|
475
487
|
* // ],
|
|
476
488
|
* // regexes: [ // required
|
|
@@ -478,7 +490,8 @@ declare const ConverseCommand_base: {
|
|
|
478
490
|
* // name: "STRING_VALUE",
|
|
479
491
|
* // match: "STRING_VALUE",
|
|
480
492
|
* // regex: "STRING_VALUE",
|
|
481
|
-
* // action: "ANONYMIZED" || "BLOCKED", // required
|
|
493
|
+
* // action: "ANONYMIZED" || "BLOCKED" || "NONE", // required
|
|
494
|
+
* // detected: true || false,
|
|
482
495
|
* // },
|
|
483
496
|
* // ],
|
|
484
497
|
* // },
|
|
@@ -489,6 +502,7 @@ declare const ConverseCommand_base: {
|
|
|
489
502
|
* // threshold: Number("double"), // required
|
|
490
503
|
* // score: Number("double"), // required
|
|
491
504
|
* // action: "BLOCKED" || "NONE", // required
|
|
505
|
+
* // detected: true || false,
|
|
492
506
|
* // },
|
|
493
507
|
* // ],
|
|
494
508
|
* // },
|
|
@@ -517,6 +531,7 @@ declare const ConverseCommand_base: {
|
|
|
517
531
|
* // },
|
|
518
532
|
* // ],
|
|
519
533
|
* // },
|
|
534
|
+
* // actionReason: "STRING_VALUE",
|
|
520
535
|
* // },
|
|
521
536
|
* // promptRouter: { // PromptRouterTrace
|
|
522
537
|
* // invokedModelId: "STRING_VALUE",
|
|
@@ -214,7 +214,7 @@ declare const ConverseStreamCommand_base: {
|
|
|
214
214
|
* guardrailConfig: { // GuardrailStreamConfiguration
|
|
215
215
|
* guardrailIdentifier: "STRING_VALUE", // required
|
|
216
216
|
* guardrailVersion: "STRING_VALUE", // required
|
|
217
|
-
* trace: "enabled" || "disabled",
|
|
217
|
+
* trace: "enabled" || "disabled" || "enabled_full",
|
|
218
218
|
* streamProcessingMode: "sync" || "async",
|
|
219
219
|
* },
|
|
220
220
|
* additionalModelRequestFields: "DOCUMENT_VALUE",
|
|
@@ -293,7 +293,8 @@ declare const ConverseStreamCommand_base: {
|
|
|
293
293
|
* // { // GuardrailTopic
|
|
294
294
|
* // name: "STRING_VALUE", // required
|
|
295
295
|
* // type: "DENY", // required
|
|
296
|
-
* // action: "BLOCKED", // required
|
|
296
|
+
* // action: "BLOCKED" || "NONE", // required
|
|
297
|
+
* // detected: true || false,
|
|
297
298
|
* // },
|
|
298
299
|
* // ],
|
|
299
300
|
* // },
|
|
@@ -303,7 +304,8 @@ declare const ConverseStreamCommand_base: {
|
|
|
303
304
|
* // type: "INSULTS" || "HATE" || "SEXUAL" || "VIOLENCE" || "MISCONDUCT" || "PROMPT_ATTACK", // required
|
|
304
305
|
* // confidence: "NONE" || "LOW" || "MEDIUM" || "HIGH", // required
|
|
305
306
|
* // filterStrength: "NONE" || "LOW" || "MEDIUM" || "HIGH",
|
|
306
|
-
* // action: "BLOCKED", // required
|
|
307
|
+
* // action: "BLOCKED" || "NONE", // required
|
|
308
|
+
* // detected: true || false,
|
|
307
309
|
* // },
|
|
308
310
|
* // ],
|
|
309
311
|
* // },
|
|
@@ -311,14 +313,16 @@ declare const ConverseStreamCommand_base: {
|
|
|
311
313
|
* // customWords: [ // GuardrailCustomWordList // required
|
|
312
314
|
* // { // GuardrailCustomWord
|
|
313
315
|
* // match: "STRING_VALUE", // required
|
|
314
|
-
* // action: "BLOCKED", // required
|
|
316
|
+
* // action: "BLOCKED" || "NONE", // required
|
|
317
|
+
* // detected: true || false,
|
|
315
318
|
* // },
|
|
316
319
|
* // ],
|
|
317
320
|
* // managedWordLists: [ // GuardrailManagedWordList // required
|
|
318
321
|
* // { // GuardrailManagedWord
|
|
319
322
|
* // match: "STRING_VALUE", // required
|
|
320
323
|
* // type: "PROFANITY", // required
|
|
321
|
-
* // action: "BLOCKED", // required
|
|
324
|
+
* // action: "BLOCKED" || "NONE", // required
|
|
325
|
+
* // detected: true || false,
|
|
322
326
|
* // },
|
|
323
327
|
* // ],
|
|
324
328
|
* // },
|
|
@@ -327,7 +331,8 @@ declare const ConverseStreamCommand_base: {
|
|
|
327
331
|
* // { // GuardrailPiiEntityFilter
|
|
328
332
|
* // match: "STRING_VALUE", // required
|
|
329
333
|
* // type: "ADDRESS" || "AGE" || "AWS_ACCESS_KEY" || "AWS_SECRET_KEY" || "CA_HEALTH_NUMBER" || "CA_SOCIAL_INSURANCE_NUMBER" || "CREDIT_DEBIT_CARD_CVV" || "CREDIT_DEBIT_CARD_EXPIRY" || "CREDIT_DEBIT_CARD_NUMBER" || "DRIVER_ID" || "EMAIL" || "INTERNATIONAL_BANK_ACCOUNT_NUMBER" || "IP_ADDRESS" || "LICENSE_PLATE" || "MAC_ADDRESS" || "NAME" || "PASSWORD" || "PHONE" || "PIN" || "SWIFT_CODE" || "UK_NATIONAL_HEALTH_SERVICE_NUMBER" || "UK_NATIONAL_INSURANCE_NUMBER" || "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER" || "URL" || "USERNAME" || "US_BANK_ACCOUNT_NUMBER" || "US_BANK_ROUTING_NUMBER" || "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER" || "US_PASSPORT_NUMBER" || "US_SOCIAL_SECURITY_NUMBER" || "VEHICLE_IDENTIFICATION_NUMBER", // required
|
|
330
|
-
* // action: "ANONYMIZED" || "BLOCKED", // required
|
|
334
|
+
* // action: "ANONYMIZED" || "BLOCKED" || "NONE", // required
|
|
335
|
+
* // detected: true || false,
|
|
331
336
|
* // },
|
|
332
337
|
* // ],
|
|
333
338
|
* // regexes: [ // GuardrailRegexFilterList // required
|
|
@@ -335,7 +340,8 @@ declare const ConverseStreamCommand_base: {
|
|
|
335
340
|
* // name: "STRING_VALUE",
|
|
336
341
|
* // match: "STRING_VALUE",
|
|
337
342
|
* // regex: "STRING_VALUE",
|
|
338
|
-
* // action: "ANONYMIZED" || "BLOCKED", // required
|
|
343
|
+
* // action: "ANONYMIZED" || "BLOCKED" || "NONE", // required
|
|
344
|
+
* // detected: true || false,
|
|
339
345
|
* // },
|
|
340
346
|
* // ],
|
|
341
347
|
* // },
|
|
@@ -346,6 +352,7 @@ declare const ConverseStreamCommand_base: {
|
|
|
346
352
|
* // threshold: Number("double"), // required
|
|
347
353
|
* // score: Number("double"), // required
|
|
348
354
|
* // action: "BLOCKED" || "NONE", // required
|
|
355
|
+
* // detected: true || false,
|
|
349
356
|
* // },
|
|
350
357
|
* // ],
|
|
351
358
|
* // },
|
|
@@ -381,7 +388,8 @@ declare const ConverseStreamCommand_base: {
|
|
|
381
388
|
* // {
|
|
382
389
|
* // name: "STRING_VALUE", // required
|
|
383
390
|
* // type: "DENY", // required
|
|
384
|
-
* // action: "BLOCKED", // required
|
|
391
|
+
* // action: "BLOCKED" || "NONE", // required
|
|
392
|
+
* // detected: true || false,
|
|
385
393
|
* // },
|
|
386
394
|
* // ],
|
|
387
395
|
* // },
|
|
@@ -391,7 +399,8 @@ declare const ConverseStreamCommand_base: {
|
|
|
391
399
|
* // type: "INSULTS" || "HATE" || "SEXUAL" || "VIOLENCE" || "MISCONDUCT" || "PROMPT_ATTACK", // required
|
|
392
400
|
* // confidence: "NONE" || "LOW" || "MEDIUM" || "HIGH", // required
|
|
393
401
|
* // filterStrength: "NONE" || "LOW" || "MEDIUM" || "HIGH",
|
|
394
|
-
* // action: "BLOCKED", // required
|
|
402
|
+
* // action: "BLOCKED" || "NONE", // required
|
|
403
|
+
* // detected: true || false,
|
|
395
404
|
* // },
|
|
396
405
|
* // ],
|
|
397
406
|
* // },
|
|
@@ -399,14 +408,16 @@ declare const ConverseStreamCommand_base: {
|
|
|
399
408
|
* // customWords: [ // required
|
|
400
409
|
* // {
|
|
401
410
|
* // match: "STRING_VALUE", // required
|
|
402
|
-
* // action: "BLOCKED", // required
|
|
411
|
+
* // action: "BLOCKED" || "NONE", // required
|
|
412
|
+
* // detected: true || false,
|
|
403
413
|
* // },
|
|
404
414
|
* // ],
|
|
405
415
|
* // managedWordLists: [ // required
|
|
406
416
|
* // {
|
|
407
417
|
* // match: "STRING_VALUE", // required
|
|
408
418
|
* // type: "PROFANITY", // required
|
|
409
|
-
* // action: "BLOCKED", // required
|
|
419
|
+
* // action: "BLOCKED" || "NONE", // required
|
|
420
|
+
* // detected: true || false,
|
|
410
421
|
* // },
|
|
411
422
|
* // ],
|
|
412
423
|
* // },
|
|
@@ -415,7 +426,8 @@ declare const ConverseStreamCommand_base: {
|
|
|
415
426
|
* // {
|
|
416
427
|
* // match: "STRING_VALUE", // required
|
|
417
428
|
* // type: "ADDRESS" || "AGE" || "AWS_ACCESS_KEY" || "AWS_SECRET_KEY" || "CA_HEALTH_NUMBER" || "CA_SOCIAL_INSURANCE_NUMBER" || "CREDIT_DEBIT_CARD_CVV" || "CREDIT_DEBIT_CARD_EXPIRY" || "CREDIT_DEBIT_CARD_NUMBER" || "DRIVER_ID" || "EMAIL" || "INTERNATIONAL_BANK_ACCOUNT_NUMBER" || "IP_ADDRESS" || "LICENSE_PLATE" || "MAC_ADDRESS" || "NAME" || "PASSWORD" || "PHONE" || "PIN" || "SWIFT_CODE" || "UK_NATIONAL_HEALTH_SERVICE_NUMBER" || "UK_NATIONAL_INSURANCE_NUMBER" || "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER" || "URL" || "USERNAME" || "US_BANK_ACCOUNT_NUMBER" || "US_BANK_ROUTING_NUMBER" || "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER" || "US_PASSPORT_NUMBER" || "US_SOCIAL_SECURITY_NUMBER" || "VEHICLE_IDENTIFICATION_NUMBER", // required
|
|
418
|
-
* // action: "ANONYMIZED" || "BLOCKED", // required
|
|
429
|
+
* // action: "ANONYMIZED" || "BLOCKED" || "NONE", // required
|
|
430
|
+
* // detected: true || false,
|
|
419
431
|
* // },
|
|
420
432
|
* // ],
|
|
421
433
|
* // regexes: [ // required
|
|
@@ -423,7 +435,8 @@ declare const ConverseStreamCommand_base: {
|
|
|
423
435
|
* // name: "STRING_VALUE",
|
|
424
436
|
* // match: "STRING_VALUE",
|
|
425
437
|
* // regex: "STRING_VALUE",
|
|
426
|
-
* // action: "ANONYMIZED" || "BLOCKED", // required
|
|
438
|
+
* // action: "ANONYMIZED" || "BLOCKED" || "NONE", // required
|
|
439
|
+
* // detected: true || false,
|
|
427
440
|
* // },
|
|
428
441
|
* // ],
|
|
429
442
|
* // },
|
|
@@ -434,6 +447,7 @@ declare const ConverseStreamCommand_base: {
|
|
|
434
447
|
* // threshold: Number("double"), // required
|
|
435
448
|
* // score: Number("double"), // required
|
|
436
449
|
* // action: "BLOCKED" || "NONE", // required
|
|
450
|
+
* // detected: true || false,
|
|
437
451
|
* // },
|
|
438
452
|
* // ],
|
|
439
453
|
* // },
|
|
@@ -462,6 +476,7 @@ declare const ConverseStreamCommand_base: {
|
|
|
462
476
|
* // },
|
|
463
477
|
* // ],
|
|
464
478
|
* // },
|
|
479
|
+
* // actionReason: "STRING_VALUE",
|
|
465
480
|
* // },
|
|
466
481
|
* // promptRouter: { // PromptRouterTrace
|
|
467
482
|
* // invokedModelId: "STRING_VALUE",
|
|
@@ -65,7 +65,7 @@ declare const InvokeModelCommand_base: {
|
|
|
65
65
|
* contentType: "STRING_VALUE",
|
|
66
66
|
* accept: "STRING_VALUE",
|
|
67
67
|
* modelId: "STRING_VALUE", // required
|
|
68
|
-
* trace: "ENABLED" || "DISABLED",
|
|
68
|
+
* trace: "ENABLED" || "DISABLED" || "ENABLED_FULL",
|
|
69
69
|
* guardrailIdentifier: "STRING_VALUE",
|
|
70
70
|
* guardrailVersion: "STRING_VALUE",
|
|
71
71
|
* performanceConfigLatency: "standard" || "optimized",
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
2
|
+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
3
|
+
import { BedrockRuntimeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BedrockRuntimeClient";
|
|
4
|
+
import { InvokeModelWithBidirectionalStreamRequest, InvokeModelWithBidirectionalStreamResponse } from "../models/models_0";
|
|
5
|
+
/**
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export type { __MetadataBearer };
|
|
9
|
+
export { $Command };
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*
|
|
13
|
+
* The input for {@link InvokeModelWithBidirectionalStreamCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface InvokeModelWithBidirectionalStreamCommandInput extends InvokeModelWithBidirectionalStreamRequest {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link InvokeModelWithBidirectionalStreamCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface InvokeModelWithBidirectionalStreamCommandOutput extends InvokeModelWithBidirectionalStreamResponse, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const InvokeModelWithBidirectionalStreamCommand_base: {
|
|
25
|
+
new (input: InvokeModelWithBidirectionalStreamCommandInput): import("@smithy/smithy-client").CommandImpl<InvokeModelWithBidirectionalStreamCommandInput, InvokeModelWithBidirectionalStreamCommandOutput, BedrockRuntimeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (__0_0: InvokeModelWithBidirectionalStreamCommandInput): import("@smithy/smithy-client").CommandImpl<InvokeModelWithBidirectionalStreamCommandInput, InvokeModelWithBidirectionalStreamCommandOutput, BedrockRuntimeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* <p>Invoke the specified Amazon Bedrock model to run inference using the bidirectional stream. The response is returned in a stream that remains open for 8 minutes. A single session can contain multiple prompts and responses from the model. The prompts to the model are provided as audio files and the model's responses are spoken back to the user and transcribed.</p>
|
|
31
|
+
* <p>It is possible for users to interrupt the model's response with a new prompt, which will halt the response speech. The model will retain contextual awareness of the conversation while pivoting to respond to the new prompt.</p>
|
|
32
|
+
* @example
|
|
33
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
34
|
+
* ```javascript
|
|
35
|
+
* import { BedrockRuntimeClient, InvokeModelWithBidirectionalStreamCommand } from "@aws-sdk/client-bedrock-runtime"; // ES Modules import
|
|
36
|
+
* // const { BedrockRuntimeClient, InvokeModelWithBidirectionalStreamCommand } = require("@aws-sdk/client-bedrock-runtime"); // CommonJS import
|
|
37
|
+
* const client = new BedrockRuntimeClient(config);
|
|
38
|
+
* const input = { // InvokeModelWithBidirectionalStreamRequest
|
|
39
|
+
* modelId: "STRING_VALUE", // required
|
|
40
|
+
* body: { // InvokeModelWithBidirectionalStreamInput Union: only one key present
|
|
41
|
+
* chunk: { // BidirectionalInputPayloadPart
|
|
42
|
+
* bytes: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("")
|
|
43
|
+
* },
|
|
44
|
+
* },
|
|
45
|
+
* };
|
|
46
|
+
* const command = new InvokeModelWithBidirectionalStreamCommand(input);
|
|
47
|
+
* const response = await client.send(command);
|
|
48
|
+
* // { // InvokeModelWithBidirectionalStreamResponse
|
|
49
|
+
* // body: { // InvokeModelWithBidirectionalStreamOutput Union: only one key present
|
|
50
|
+
* // chunk: { // BidirectionalOutputPayloadPart
|
|
51
|
+
* // bytes: new Uint8Array(),
|
|
52
|
+
* // },
|
|
53
|
+
* // internalServerException: { // InternalServerException
|
|
54
|
+
* // message: "STRING_VALUE",
|
|
55
|
+
* // },
|
|
56
|
+
* // modelStreamErrorException: { // ModelStreamErrorException
|
|
57
|
+
* // message: "STRING_VALUE",
|
|
58
|
+
* // originalStatusCode: Number("int"),
|
|
59
|
+
* // originalMessage: "STRING_VALUE",
|
|
60
|
+
* // },
|
|
61
|
+
* // validationException: { // ValidationException
|
|
62
|
+
* // message: "STRING_VALUE",
|
|
63
|
+
* // },
|
|
64
|
+
* // throttlingException: { // ThrottlingException
|
|
65
|
+
* // message: "STRING_VALUE",
|
|
66
|
+
* // },
|
|
67
|
+
* // modelTimeoutException: { // ModelTimeoutException
|
|
68
|
+
* // message: "STRING_VALUE",
|
|
69
|
+
* // },
|
|
70
|
+
* // serviceUnavailableException: { // ServiceUnavailableException
|
|
71
|
+
* // message: "STRING_VALUE",
|
|
72
|
+
* // },
|
|
73
|
+
* // },
|
|
74
|
+
* // };
|
|
75
|
+
*
|
|
76
|
+
* ```
|
|
77
|
+
*
|
|
78
|
+
* @param InvokeModelWithBidirectionalStreamCommandInput - {@link InvokeModelWithBidirectionalStreamCommandInput}
|
|
79
|
+
* @returns {@link InvokeModelWithBidirectionalStreamCommandOutput}
|
|
80
|
+
* @see {@link InvokeModelWithBidirectionalStreamCommandInput} for command's `input` shape.
|
|
81
|
+
* @see {@link InvokeModelWithBidirectionalStreamCommandOutput} for command's `response` shape.
|
|
82
|
+
* @see {@link BedrockRuntimeClientResolvedConfig | config} for BedrockRuntimeClient's `config` shape.
|
|
83
|
+
*
|
|
84
|
+
* @throws {@link AccessDeniedException} (client fault)
|
|
85
|
+
* <p>The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error,
|
|
86
|
+
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-access-denied">AccessDeniedException</a> in the Amazon Bedrock User Guide</p>
|
|
87
|
+
*
|
|
88
|
+
* @throws {@link InternalServerException} (server fault)
|
|
89
|
+
* <p>An internal server error occurred. For troubleshooting this error,
|
|
90
|
+
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-internal-failure">InternalFailure</a> in the Amazon Bedrock User Guide</p>
|
|
91
|
+
*
|
|
92
|
+
* @throws {@link ModelErrorException} (client fault)
|
|
93
|
+
* <p>The request failed due to an error while processing the model.</p>
|
|
94
|
+
*
|
|
95
|
+
* @throws {@link ModelNotReadyException} (client fault)
|
|
96
|
+
* <p>The model specified in the request is not ready to serve inference requests. The AWS SDK
|
|
97
|
+
* will automatically retry the operation up to 5 times. For information about configuring
|
|
98
|
+
* automatic retries, see <a href="https://docs.aws.amazon.com/sdkref/latest/guide/feature-retry-behavior.html">Retry behavior</a> in the <i>AWS SDKs and Tools</i>
|
|
99
|
+
* reference guide.</p>
|
|
100
|
+
*
|
|
101
|
+
* @throws {@link ModelStreamErrorException} (client fault)
|
|
102
|
+
* <p>An error occurred while streaming the response. Retry your request.</p>
|
|
103
|
+
*
|
|
104
|
+
* @throws {@link ModelTimeoutException} (client fault)
|
|
105
|
+
* <p>The request took too long to process. Processing time exceeded the model timeout length.</p>
|
|
106
|
+
*
|
|
107
|
+
* @throws {@link ResourceNotFoundException} (client fault)
|
|
108
|
+
* <p>The specified resource ARN was not found. For troubleshooting this error,
|
|
109
|
+
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-resource-not-found">ResourceNotFound</a> in the Amazon Bedrock User Guide</p>
|
|
110
|
+
*
|
|
111
|
+
* @throws {@link ServiceQuotaExceededException} (client fault)
|
|
112
|
+
* <p>Your request exceeds the service quota for your account. You can view your quotas at <a href="https://docs.aws.amazon.com/servicequotas/latest/userguide/gs-request-quota.html">Viewing service quotas</a>. You can resubmit your request later.</p>
|
|
113
|
+
*
|
|
114
|
+
* @throws {@link ServiceUnavailableException} (server fault)
|
|
115
|
+
* <p>The service isn't currently available. For troubleshooting this error,
|
|
116
|
+
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-service-unavailable">ServiceUnavailable</a> in the Amazon Bedrock User Guide</p>
|
|
117
|
+
*
|
|
118
|
+
* @throws {@link ThrottlingException} (client fault)
|
|
119
|
+
* <p>Your request was denied due to exceeding the account quotas for <i>Amazon Bedrock</i>. For
|
|
120
|
+
* 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>
|
|
121
|
+
*
|
|
122
|
+
* @throws {@link ValidationException} (client fault)
|
|
123
|
+
* <p>The input fails to satisfy the constraints specified by <i>Amazon Bedrock</i>. For troubleshooting this error,
|
|
124
|
+
* 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>
|
|
125
|
+
*
|
|
126
|
+
* @throws {@link BedrockRuntimeServiceException}
|
|
127
|
+
* <p>Base exception class for all service exceptions from BedrockRuntime service.</p>
|
|
128
|
+
*
|
|
129
|
+
*
|
|
130
|
+
* @public
|
|
131
|
+
*/
|
|
132
|
+
export declare class InvokeModelWithBidirectionalStreamCommand extends InvokeModelWithBidirectionalStreamCommand_base {
|
|
133
|
+
/** @internal type navigation helper, not in runtime. */
|
|
134
|
+
protected static __types: {
|
|
135
|
+
api: {
|
|
136
|
+
input: InvokeModelWithBidirectionalStreamRequest;
|
|
137
|
+
output: InvokeModelWithBidirectionalStreamResponse;
|
|
138
|
+
};
|
|
139
|
+
sdk: {
|
|
140
|
+
input: InvokeModelWithBidirectionalStreamCommandInput;
|
|
141
|
+
output: InvokeModelWithBidirectionalStreamCommandOutput;
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
}
|
|
@@ -63,7 +63,7 @@ declare const InvokeModelWithResponseStreamCommand_base: {
|
|
|
63
63
|
* contentType: "STRING_VALUE",
|
|
64
64
|
* accept: "STRING_VALUE",
|
|
65
65
|
* modelId: "STRING_VALUE", // required
|
|
66
|
-
* trace: "ENABLED" || "DISABLED",
|
|
66
|
+
* trace: "ENABLED" || "DISABLED" || "ENABLED_FULL",
|
|
67
67
|
* guardrailIdentifier: "STRING_VALUE",
|
|
68
68
|
* guardrailVersion: "STRING_VALUE",
|
|
69
69
|
* performanceConfigLatency: "standard" || "optimized",
|
|
@@ -3,6 +3,7 @@ export * from "./ConverseCommand";
|
|
|
3
3
|
export * from "./ConverseStreamCommand";
|
|
4
4
|
export * from "./GetAsyncInvokeCommand";
|
|
5
5
|
export * from "./InvokeModelCommand";
|
|
6
|
+
export * from "./InvokeModelWithBidirectionalStreamCommand";
|
|
6
7
|
export * from "./InvokeModelWithResponseStreamCommand";
|
|
7
8
|
export * from "./ListAsyncInvokesCommand";
|
|
8
9
|
export * from "./StartAsyncInvokeCommand";
|