@aws-sdk/client-bedrock-runtime 3.929.0 → 3.930.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 CHANGED
@@ -144,14 +144,6 @@ let AccessDeniedException$1 = class AccessDeniedException extends BedrockRuntime
144
144
  Object.setPrototypeOf(this, AccessDeniedException.prototype);
145
145
  }
146
146
  };
147
- exports.AsyncInvokeOutputDataConfig = void 0;
148
- (function (AsyncInvokeOutputDataConfig) {
149
- AsyncInvokeOutputDataConfig.visit = (value, visitor) => {
150
- if (value.s3OutputDataConfig !== undefined)
151
- return visitor.s3OutputDataConfig(value.s3OutputDataConfig);
152
- return visitor._(value.$unknown[0], value.$unknown[1]);
153
- };
154
- })(exports.AsyncInvokeOutputDataConfig || (exports.AsyncInvokeOutputDataConfig = {}));
155
147
  const AsyncInvokeStatus = {
156
148
  COMPLETED: "Completed",
157
149
  FAILED: "Failed",
@@ -252,29 +244,11 @@ const GuardrailImageFormat = {
252
244
  JPEG: "jpeg",
253
245
  PNG: "png",
254
246
  };
255
- exports.GuardrailImageSource = void 0;
256
- (function (GuardrailImageSource) {
257
- GuardrailImageSource.visit = (value, visitor) => {
258
- if (value.bytes !== undefined)
259
- return visitor.bytes(value.bytes);
260
- return visitor._(value.$unknown[0], value.$unknown[1]);
261
- };
262
- })(exports.GuardrailImageSource || (exports.GuardrailImageSource = {}));
263
247
  const GuardrailContentQualifier = {
264
248
  GROUNDING_SOURCE: "grounding_source",
265
249
  GUARD_CONTENT: "guard_content",
266
250
  QUERY: "query",
267
251
  };
268
- exports.GuardrailContentBlock = void 0;
269
- (function (GuardrailContentBlock) {
270
- GuardrailContentBlock.visit = (value, visitor) => {
271
- if (value.text !== undefined)
272
- return visitor.text(value.text);
273
- if (value.image !== undefined)
274
- return visitor.image(value.image);
275
- return visitor._(value.$unknown[0], value.$unknown[1]);
276
- };
277
- })(exports.GuardrailContentBlock || (exports.GuardrailContentBlock = {}));
278
252
  const GuardrailOutputScope = {
279
253
  FULL: "FULL",
280
254
  INTERVENTIONS: "INTERVENTIONS",
@@ -291,26 +265,6 @@ const GuardrailAutomatedReasoningLogicWarningType = {
291
265
  ALWAYS_FALSE: "ALWAYS_FALSE",
292
266
  ALWAYS_TRUE: "ALWAYS_TRUE",
293
267
  };
294
- exports.GuardrailAutomatedReasoningFinding = void 0;
295
- (function (GuardrailAutomatedReasoningFinding) {
296
- GuardrailAutomatedReasoningFinding.visit = (value, visitor) => {
297
- if (value.valid !== undefined)
298
- return visitor.valid(value.valid);
299
- if (value.invalid !== undefined)
300
- return visitor.invalid(value.invalid);
301
- if (value.satisfiable !== undefined)
302
- return visitor.satisfiable(value.satisfiable);
303
- if (value.impossible !== undefined)
304
- return visitor.impossible(value.impossible);
305
- if (value.translationAmbiguous !== undefined)
306
- return visitor.translationAmbiguous(value.translationAmbiguous);
307
- if (value.tooComplex !== undefined)
308
- return visitor.tooComplex(value.tooComplex);
309
- if (value.noTranslations !== undefined)
310
- return visitor.noTranslations(value.noTranslations);
311
- return visitor._(value.$unknown[0], value.$unknown[1]);
312
- };
313
- })(exports.GuardrailAutomatedReasoningFinding || (exports.GuardrailAutomatedReasoningFinding = {}));
314
268
  const GuardrailContentPolicyAction = {
315
269
  BLOCKED: "BLOCKED",
316
270
  NONE: "NONE",
@@ -403,36 +357,6 @@ const GuardrailTrace = {
403
357
  const CachePointType = {
404
358
  DEFAULT: "default",
405
359
  };
406
- exports.CitationLocation = void 0;
407
- (function (CitationLocation) {
408
- CitationLocation.visit = (value, visitor) => {
409
- if (value.web !== undefined)
410
- return visitor.web(value.web);
411
- if (value.documentChar !== undefined)
412
- return visitor.documentChar(value.documentChar);
413
- if (value.documentPage !== undefined)
414
- return visitor.documentPage(value.documentPage);
415
- if (value.documentChunk !== undefined)
416
- return visitor.documentChunk(value.documentChunk);
417
- return visitor._(value.$unknown[0], value.$unknown[1]);
418
- };
419
- })(exports.CitationLocation || (exports.CitationLocation = {}));
420
- exports.CitationSourceContent = void 0;
421
- (function (CitationSourceContent) {
422
- CitationSourceContent.visit = (value, visitor) => {
423
- if (value.text !== undefined)
424
- return visitor.text(value.text);
425
- return visitor._(value.$unknown[0], value.$unknown[1]);
426
- };
427
- })(exports.CitationSourceContent || (exports.CitationSourceContent = {}));
428
- exports.CitationGeneratedContent = void 0;
429
- (function (CitationGeneratedContent) {
430
- CitationGeneratedContent.visit = (value, visitor) => {
431
- if (value.text !== undefined)
432
- return visitor.text(value.text);
433
- return visitor._(value.$unknown[0], value.$unknown[1]);
434
- };
435
- })(exports.CitationGeneratedContent || (exports.CitationGeneratedContent = {}));
436
360
  const DocumentFormat = {
437
361
  CSV: "csv",
438
362
  DOC: "doc",
@@ -444,81 +368,21 @@ const DocumentFormat = {
444
368
  XLS: "xls",
445
369
  XLSX: "xlsx",
446
370
  };
447
- exports.DocumentContentBlock = void 0;
448
- (function (DocumentContentBlock) {
449
- DocumentContentBlock.visit = (value, visitor) => {
450
- if (value.text !== undefined)
451
- return visitor.text(value.text);
452
- return visitor._(value.$unknown[0], value.$unknown[1]);
453
- };
454
- })(exports.DocumentContentBlock || (exports.DocumentContentBlock = {}));
455
- exports.DocumentSource = void 0;
456
- (function (DocumentSource) {
457
- DocumentSource.visit = (value, visitor) => {
458
- if (value.bytes !== undefined)
459
- return visitor.bytes(value.bytes);
460
- if (value.s3Location !== undefined)
461
- return visitor.s3Location(value.s3Location);
462
- if (value.text !== undefined)
463
- return visitor.text(value.text);
464
- if (value.content !== undefined)
465
- return visitor.content(value.content);
466
- return visitor._(value.$unknown[0], value.$unknown[1]);
467
- };
468
- })(exports.DocumentSource || (exports.DocumentSource = {}));
469
371
  const GuardrailConverseImageFormat = {
470
372
  JPEG: "jpeg",
471
373
  PNG: "png",
472
374
  };
473
- exports.GuardrailConverseImageSource = void 0;
474
- (function (GuardrailConverseImageSource) {
475
- GuardrailConverseImageSource.visit = (value, visitor) => {
476
- if (value.bytes !== undefined)
477
- return visitor.bytes(value.bytes);
478
- return visitor._(value.$unknown[0], value.$unknown[1]);
479
- };
480
- })(exports.GuardrailConverseImageSource || (exports.GuardrailConverseImageSource = {}));
481
375
  const GuardrailConverseContentQualifier = {
482
376
  GROUNDING_SOURCE: "grounding_source",
483
377
  GUARD_CONTENT: "guard_content",
484
378
  QUERY: "query",
485
379
  };
486
- exports.GuardrailConverseContentBlock = void 0;
487
- (function (GuardrailConverseContentBlock) {
488
- GuardrailConverseContentBlock.visit = (value, visitor) => {
489
- if (value.text !== undefined)
490
- return visitor.text(value.text);
491
- if (value.image !== undefined)
492
- return visitor.image(value.image);
493
- return visitor._(value.$unknown[0], value.$unknown[1]);
494
- };
495
- })(exports.GuardrailConverseContentBlock || (exports.GuardrailConverseContentBlock = {}));
496
380
  const ImageFormat = {
497
381
  GIF: "gif",
498
382
  JPEG: "jpeg",
499
383
  PNG: "png",
500
384
  WEBP: "webp",
501
385
  };
502
- exports.ImageSource = void 0;
503
- (function (ImageSource) {
504
- ImageSource.visit = (value, visitor) => {
505
- if (value.bytes !== undefined)
506
- return visitor.bytes(value.bytes);
507
- if (value.s3Location !== undefined)
508
- return visitor.s3Location(value.s3Location);
509
- return visitor._(value.$unknown[0], value.$unknown[1]);
510
- };
511
- })(exports.ImageSource || (exports.ImageSource = {}));
512
- exports.ReasoningContentBlock = void 0;
513
- (function (ReasoningContentBlock) {
514
- ReasoningContentBlock.visit = (value, visitor) => {
515
- if (value.reasoningText !== undefined)
516
- return visitor.reasoningText(value.reasoningText);
517
- if (value.redactedContent !== undefined)
518
- return visitor.redactedContent(value.redactedContent);
519
- return visitor._(value.$unknown[0], value.$unknown[1]);
520
- };
521
- })(exports.ReasoningContentBlock || (exports.ReasoningContentBlock = {}));
522
386
  const VideoFormat = {
523
387
  FLV: "flv",
524
388
  MKV: "mkv",
@@ -530,32 +394,6 @@ const VideoFormat = {
530
394
  WEBM: "webm",
531
395
  WMV: "wmv",
532
396
  };
533
- exports.VideoSource = void 0;
534
- (function (VideoSource) {
535
- VideoSource.visit = (value, visitor) => {
536
- if (value.bytes !== undefined)
537
- return visitor.bytes(value.bytes);
538
- if (value.s3Location !== undefined)
539
- return visitor.s3Location(value.s3Location);
540
- return visitor._(value.$unknown[0], value.$unknown[1]);
541
- };
542
- })(exports.VideoSource || (exports.VideoSource = {}));
543
- exports.ToolResultContentBlock = void 0;
544
- (function (ToolResultContentBlock) {
545
- ToolResultContentBlock.visit = (value, visitor) => {
546
- if (value.json !== undefined)
547
- return visitor.json(value.json);
548
- if (value.text !== undefined)
549
- return visitor.text(value.text);
550
- if (value.image !== undefined)
551
- return visitor.image(value.image);
552
- if (value.document !== undefined)
553
- return visitor.document(value.document);
554
- if (value.video !== undefined)
555
- return visitor.video(value.video);
556
- return visitor._(value.$unknown[0], value.$unknown[1]);
557
- };
558
- })(exports.ToolResultContentBlock || (exports.ToolResultContentBlock = {}));
559
397
  const ToolResultStatus = {
560
398
  ERROR: "error",
561
399
  SUCCESS: "success",
@@ -563,32 +401,6 @@ const ToolResultStatus = {
563
401
  const ToolUseType = {
564
402
  SERVER_TOOL_USE: "server_tool_use",
565
403
  };
566
- exports.ContentBlock = void 0;
567
- (function (ContentBlock) {
568
- ContentBlock.visit = (value, visitor) => {
569
- if (value.text !== undefined)
570
- return visitor.text(value.text);
571
- if (value.image !== undefined)
572
- return visitor.image(value.image);
573
- if (value.document !== undefined)
574
- return visitor.document(value.document);
575
- if (value.video !== undefined)
576
- return visitor.video(value.video);
577
- if (value.toolUse !== undefined)
578
- return visitor.toolUse(value.toolUse);
579
- if (value.toolResult !== undefined)
580
- return visitor.toolResult(value.toolResult);
581
- if (value.guardContent !== undefined)
582
- return visitor.guardContent(value.guardContent);
583
- if (value.cachePoint !== undefined)
584
- return visitor.cachePoint(value.cachePoint);
585
- if (value.reasoningContent !== undefined)
586
- return visitor.reasoningContent(value.reasoningContent);
587
- if (value.citationsContent !== undefined)
588
- return visitor.citationsContent(value.citationsContent);
589
- return visitor._(value.$unknown[0], value.$unknown[1]);
590
- };
591
- })(exports.ContentBlock || (exports.ContentBlock = {}));
592
404
  const ConversationRole = {
593
405
  ASSISTANT: "assistant",
594
406
  USER: "user",
@@ -597,66 +409,6 @@ const PerformanceConfigLatency = {
597
409
  OPTIMIZED: "optimized",
598
410
  STANDARD: "standard",
599
411
  };
600
- exports.PromptVariableValues = void 0;
601
- (function (PromptVariableValues) {
602
- PromptVariableValues.visit = (value, visitor) => {
603
- if (value.text !== undefined)
604
- return visitor.text(value.text);
605
- return visitor._(value.$unknown[0], value.$unknown[1]);
606
- };
607
- })(exports.PromptVariableValues || (exports.PromptVariableValues = {}));
608
- exports.SystemContentBlock = void 0;
609
- (function (SystemContentBlock) {
610
- SystemContentBlock.visit = (value, visitor) => {
611
- if (value.text !== undefined)
612
- return visitor.text(value.text);
613
- if (value.guardContent !== undefined)
614
- return visitor.guardContent(value.guardContent);
615
- if (value.cachePoint !== undefined)
616
- return visitor.cachePoint(value.cachePoint);
617
- return visitor._(value.$unknown[0], value.$unknown[1]);
618
- };
619
- })(exports.SystemContentBlock || (exports.SystemContentBlock = {}));
620
- exports.ToolChoice = void 0;
621
- (function (ToolChoice) {
622
- ToolChoice.visit = (value, visitor) => {
623
- if (value.auto !== undefined)
624
- return visitor.auto(value.auto);
625
- if (value.any !== undefined)
626
- return visitor.any(value.any);
627
- if (value.tool !== undefined)
628
- return visitor.tool(value.tool);
629
- return visitor._(value.$unknown[0], value.$unknown[1]);
630
- };
631
- })(exports.ToolChoice || (exports.ToolChoice = {}));
632
- exports.ToolInputSchema = void 0;
633
- (function (ToolInputSchema) {
634
- ToolInputSchema.visit = (value, visitor) => {
635
- if (value.json !== undefined)
636
- return visitor.json(value.json);
637
- return visitor._(value.$unknown[0], value.$unknown[1]);
638
- };
639
- })(exports.ToolInputSchema || (exports.ToolInputSchema = {}));
640
- exports.Tool = void 0;
641
- (function (Tool) {
642
- Tool.visit = (value, visitor) => {
643
- if (value.toolSpec !== undefined)
644
- return visitor.toolSpec(value.toolSpec);
645
- if (value.systemTool !== undefined)
646
- return visitor.systemTool(value.systemTool);
647
- if (value.cachePoint !== undefined)
648
- return visitor.cachePoint(value.cachePoint);
649
- return visitor._(value.$unknown[0], value.$unknown[1]);
650
- };
651
- })(exports.Tool || (exports.Tool = {}));
652
- exports.ConverseOutput = void 0;
653
- (function (ConverseOutput) {
654
- ConverseOutput.visit = (value, visitor) => {
655
- if (value.message !== undefined)
656
- return visitor.message(value.message);
657
- return visitor._(value.$unknown[0], value.$unknown[1]);
658
- };
659
- })(exports.ConverseOutput || (exports.ConverseOutput = {}));
660
412
  const StopReason = {
661
413
  CONTENT_FILTERED: "content_filtered",
662
414
  END_TURN: "end_turn",
@@ -711,52 +463,6 @@ const GuardrailStreamProcessingMode = {
711
463
  ASYNC: "async",
712
464
  SYNC: "sync",
713
465
  };
714
- exports.ReasoningContentBlockDelta = void 0;
715
- (function (ReasoningContentBlockDelta) {
716
- ReasoningContentBlockDelta.visit = (value, visitor) => {
717
- if (value.text !== undefined)
718
- return visitor.text(value.text);
719
- if (value.redactedContent !== undefined)
720
- return visitor.redactedContent(value.redactedContent);
721
- if (value.signature !== undefined)
722
- return visitor.signature(value.signature);
723
- return visitor._(value.$unknown[0], value.$unknown[1]);
724
- };
725
- })(exports.ReasoningContentBlockDelta || (exports.ReasoningContentBlockDelta = {}));
726
- exports.ToolResultBlockDelta = void 0;
727
- (function (ToolResultBlockDelta) {
728
- ToolResultBlockDelta.visit = (value, visitor) => {
729
- if (value.text !== undefined)
730
- return visitor.text(value.text);
731
- return visitor._(value.$unknown[0], value.$unknown[1]);
732
- };
733
- })(exports.ToolResultBlockDelta || (exports.ToolResultBlockDelta = {}));
734
- exports.ContentBlockDelta = void 0;
735
- (function (ContentBlockDelta) {
736
- ContentBlockDelta.visit = (value, visitor) => {
737
- if (value.text !== undefined)
738
- return visitor.text(value.text);
739
- if (value.toolUse !== undefined)
740
- return visitor.toolUse(value.toolUse);
741
- if (value.toolResult !== undefined)
742
- return visitor.toolResult(value.toolResult);
743
- if (value.reasoningContent !== undefined)
744
- return visitor.reasoningContent(value.reasoningContent);
745
- if (value.citation !== undefined)
746
- return visitor.citation(value.citation);
747
- return visitor._(value.$unknown[0], value.$unknown[1]);
748
- };
749
- })(exports.ContentBlockDelta || (exports.ContentBlockDelta = {}));
750
- exports.ContentBlockStart = void 0;
751
- (function (ContentBlockStart) {
752
- ContentBlockStart.visit = (value, visitor) => {
753
- if (value.toolUse !== undefined)
754
- return visitor.toolUse(value.toolUse);
755
- if (value.toolResult !== undefined)
756
- return visitor.toolResult(value.toolResult);
757
- return visitor._(value.$unknown[0], value.$unknown[1]);
758
- };
759
- })(exports.ContentBlockStart || (exports.ContentBlockStart = {}));
760
466
  let ModelStreamErrorException$1 = class ModelStreamErrorException extends BedrockRuntimeServiceException$1 {
761
467
  name = "ModelStreamErrorException";
762
468
  $fault = "client";
@@ -773,97 +479,11 @@ let ModelStreamErrorException$1 = class ModelStreamErrorException extends Bedroc
773
479
  this.originalMessage = opts.originalMessage;
774
480
  }
775
481
  };
776
- exports.ConverseStreamOutput = void 0;
777
- (function (ConverseStreamOutput) {
778
- ConverseStreamOutput.visit = (value, visitor) => {
779
- if (value.messageStart !== undefined)
780
- return visitor.messageStart(value.messageStart);
781
- if (value.contentBlockStart !== undefined)
782
- return visitor.contentBlockStart(value.contentBlockStart);
783
- if (value.contentBlockDelta !== undefined)
784
- return visitor.contentBlockDelta(value.contentBlockDelta);
785
- if (value.contentBlockStop !== undefined)
786
- return visitor.contentBlockStop(value.contentBlockStop);
787
- if (value.messageStop !== undefined)
788
- return visitor.messageStop(value.messageStop);
789
- if (value.metadata !== undefined)
790
- return visitor.metadata(value.metadata);
791
- if (value.internalServerException !== undefined)
792
- return visitor.internalServerException(value.internalServerException);
793
- if (value.modelStreamErrorException !== undefined)
794
- return visitor.modelStreamErrorException(value.modelStreamErrorException);
795
- if (value.validationException !== undefined)
796
- return visitor.validationException(value.validationException);
797
- if (value.throttlingException !== undefined)
798
- return visitor.throttlingException(value.throttlingException);
799
- if (value.serviceUnavailableException !== undefined)
800
- return visitor.serviceUnavailableException(value.serviceUnavailableException);
801
- return visitor._(value.$unknown[0], value.$unknown[1]);
802
- };
803
- })(exports.ConverseStreamOutput || (exports.ConverseStreamOutput = {}));
804
482
  const Trace = {
805
483
  DISABLED: "DISABLED",
806
484
  ENABLED: "ENABLED",
807
485
  ENABLED_FULL: "ENABLED_FULL",
808
486
  };
809
- exports.InvokeModelWithBidirectionalStreamInput = void 0;
810
- (function (InvokeModelWithBidirectionalStreamInput) {
811
- InvokeModelWithBidirectionalStreamInput.visit = (value, visitor) => {
812
- if (value.chunk !== undefined)
813
- return visitor.chunk(value.chunk);
814
- return visitor._(value.$unknown[0], value.$unknown[1]);
815
- };
816
- })(exports.InvokeModelWithBidirectionalStreamInput || (exports.InvokeModelWithBidirectionalStreamInput = {}));
817
- exports.InvokeModelWithBidirectionalStreamOutput = void 0;
818
- (function (InvokeModelWithBidirectionalStreamOutput) {
819
- InvokeModelWithBidirectionalStreamOutput.visit = (value, visitor) => {
820
- if (value.chunk !== undefined)
821
- return visitor.chunk(value.chunk);
822
- if (value.internalServerException !== undefined)
823
- return visitor.internalServerException(value.internalServerException);
824
- if (value.modelStreamErrorException !== undefined)
825
- return visitor.modelStreamErrorException(value.modelStreamErrorException);
826
- if (value.validationException !== undefined)
827
- return visitor.validationException(value.validationException);
828
- if (value.throttlingException !== undefined)
829
- return visitor.throttlingException(value.throttlingException);
830
- if (value.modelTimeoutException !== undefined)
831
- return visitor.modelTimeoutException(value.modelTimeoutException);
832
- if (value.serviceUnavailableException !== undefined)
833
- return visitor.serviceUnavailableException(value.serviceUnavailableException);
834
- return visitor._(value.$unknown[0], value.$unknown[1]);
835
- };
836
- })(exports.InvokeModelWithBidirectionalStreamOutput || (exports.InvokeModelWithBidirectionalStreamOutput = {}));
837
- exports.ResponseStream = void 0;
838
- (function (ResponseStream) {
839
- ResponseStream.visit = (value, visitor) => {
840
- if (value.chunk !== undefined)
841
- return visitor.chunk(value.chunk);
842
- if (value.internalServerException !== undefined)
843
- return visitor.internalServerException(value.internalServerException);
844
- if (value.modelStreamErrorException !== undefined)
845
- return visitor.modelStreamErrorException(value.modelStreamErrorException);
846
- if (value.validationException !== undefined)
847
- return visitor.validationException(value.validationException);
848
- if (value.throttlingException !== undefined)
849
- return visitor.throttlingException(value.throttlingException);
850
- if (value.modelTimeoutException !== undefined)
851
- return visitor.modelTimeoutException(value.modelTimeoutException);
852
- if (value.serviceUnavailableException !== undefined)
853
- return visitor.serviceUnavailableException(value.serviceUnavailableException);
854
- return visitor._(value.$unknown[0], value.$unknown[1]);
855
- };
856
- })(exports.ResponseStream || (exports.ResponseStream = {}));
857
- exports.CountTokensInput = void 0;
858
- (function (CountTokensInput) {
859
- CountTokensInput.visit = (value, visitor) => {
860
- if (value.invokeModel !== undefined)
861
- return visitor.invokeModel(value.invokeModel);
862
- if (value.converse !== undefined)
863
- return visitor.converse(value.converse);
864
- return visitor._(value.$unknown[0], value.$unknown[1]);
865
- };
866
- })(exports.CountTokensInput || (exports.CountTokensInput = {}));
867
487
 
868
488
  const _A = "Accept";
869
489
  const _ADE = "AccessDeniedException";