Module: Aws::BedrockRuntime::Types

Defined in:
lib/aws-sdk-bedrockruntime/types.rb

Defined Under Namespace

Classes: AccessDeniedException, AnyToolChoice, ApplyGuardrailRequest, ApplyGuardrailResponse, AsyncInvokeOutputDataConfig, AsyncInvokeS3OutputDataConfig, AsyncInvokeSummary, AutoToolChoice, ConflictException, ContentBlock, ContentBlockDelta, ContentBlockDeltaEvent, ContentBlockStart, ContentBlockStartEvent, ContentBlockStopEvent, ConverseMetrics, ConverseOutput, ConverseRequest, ConverseResponse, ConverseStreamMetadataEvent, ConverseStreamMetrics, ConverseStreamOutput, ConverseStreamRequest, ConverseStreamResponse, ConverseStreamTrace, ConverseTrace, DocumentBlock, DocumentSource, GetAsyncInvokeRequest, GetAsyncInvokeResponse, GuardrailAssessment, GuardrailConfiguration, GuardrailContentBlock, GuardrailContentFilter, GuardrailContentPolicyAssessment, GuardrailContextualGroundingFilter, GuardrailContextualGroundingPolicyAssessment, GuardrailConverseContentBlock, GuardrailConverseTextBlock, GuardrailCoverage, GuardrailCustomWord, GuardrailInvocationMetrics, GuardrailManagedWord, GuardrailOutputContent, GuardrailPiiEntityFilter, GuardrailRegexFilter, GuardrailSensitiveInformationPolicyAssessment, GuardrailStreamConfiguration, GuardrailTextBlock, GuardrailTextCharactersCoverage, GuardrailTopic, GuardrailTopicPolicyAssessment, GuardrailTraceAssessment, GuardrailUsage, GuardrailWordPolicyAssessment, ImageBlock, ImageSource, InferenceConfiguration, InternalServerException, InvokeModelRequest, InvokeModelResponse, InvokeModelWithResponseStreamRequest, InvokeModelWithResponseStreamResponse, ListAsyncInvokesRequest, ListAsyncInvokesResponse, Message, MessageStartEvent, MessageStopEvent, ModelErrorException, ModelNotReadyException, ModelStreamErrorException, ModelTimeoutException, PayloadPart, PerformanceConfiguration, PromptVariableValues, ResourceNotFoundException, ResponseStream, S3Location, ServiceQuotaExceededException, ServiceUnavailableException, SpecificToolChoice, StartAsyncInvokeRequest, StartAsyncInvokeResponse, SystemContentBlock, Tag, ThrottlingException, TokenUsage, Tool, ToolChoice, ToolConfiguration, ToolInputSchema, ToolResultBlock, ToolResultContentBlock, ToolSpecification, ToolUseBlock, ToolUseBlockDelta, ToolUseBlockStart, ValidationException, VideoBlock, VideoSource

Instance Attribute Summary collapse

Instance Attribute Details

#additional_model_response_fieldsHash, ...

The additional model response fields.

Returns:

  • (Hash, Array, String, Numeric, Boolean)


2120
2121
2122
2123
2124
2125
2126
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 2120

class MessageStopEvent < Struct.new(
  :stop_reason,
  :additional_model_response_fields,
  :event_type)
  SENSITIVE = []
  include Aws::Structure
end

#anyTypes::AnyToolChoice

The model must request at least one tool (no text is generated).



2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 2558

class ToolChoice < Struct.new(
  :auto,
  :any,
  :tool,
  :unknown)
  SENSITIVE = []
  include Aws::Structure
  include Aws::Structure::Union

  class Auto < ToolChoice; end
  class Any < ToolChoice; end
  class Tool < ToolChoice; end
  class Unknown < ToolChoice; end
end

#autoTypes::AutoToolChoice

(Default). The Model automatically decides if a tool should be called or whether to generate text instead.



2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 2558

class ToolChoice < Struct.new(
  :auto,
  :any,
  :tool,
  :unknown)
  SENSITIVE = []
  include Aws::Structure
  include Aws::Structure::Union

  class Auto < ToolChoice; end
  class Any < ToolChoice; end
  class Tool < ToolChoice; end
  class Unknown < ToolChoice; end
end

#bytesString

Video content encoded in base64.

Returns:

  • (String)


927
928
929
930
931
932
933
934
935
936
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 927

class DocumentSource < Struct.new(
  :bytes,
  :unknown)
  SENSITIVE = []
  include Aws::Structure
  include Aws::Structure::Union

  class Bytes < DocumentSource; end
  class Unknown < DocumentSource; end
end

#content_block_indexInteger

The index for a content block.

Returns:

  • (Integer)


337
338
339
340
341
342
343
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 337

class ContentBlockDeltaEvent < Struct.new(
  :delta,
  :content_block_index,
  :event_type)
  SENSITIVE = []
  include Aws::Structure
end

#deltaTypes::ContentBlockDelta

The delta for a content block delta event.



337
338
339
340
341
342
343
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 337

class ContentBlockDeltaEvent < Struct.new(
  :delta,
  :content_block_index,
  :event_type)
  SENSITIVE = []
  include Aws::Structure
end

#documentTypes::DocumentBlock

A tool result that is a document.



275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 275

class ContentBlock < Struct.new(
  :text,
  :image,
  :document,
  :video,
  :tool_use,
  :tool_result,
  :guard_content,
  :unknown)
  SENSITIVE = []
  include Aws::Structure
  include Aws::Structure::Union

  class Text < ContentBlock; end
  class Image < ContentBlock; end
  class Document < ContentBlock; end
  class Video < ContentBlock; end
  class ToolUse < ContentBlock; end
  class ToolResult < ContentBlock; end
  class GuardContent < ContentBlock; end
  class Unknown < ContentBlock; end
end

#guard_contentTypes::GuardrailConverseContentBlock

A content block to assess with the guardrail. Use with the

Converse][1

or [ConverseStream] API operations.

For more information, see *Use a guardrail with the Converse API* in the *Amazon Bedrock User Guide*.

[1]: docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html [2]: docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html



275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 275

class ContentBlock < Struct.new(
  :text,
  :image,
  :document,
  :video,
  :tool_use,
  :tool_result,
  :guard_content,
  :unknown)
  SENSITIVE = []
  include Aws::Structure
  include Aws::Structure::Union

  class Text < ContentBlock; end
  class Image < ContentBlock; end
  class Document < ContentBlock; end
  class Video < ContentBlock; end
  class ToolUse < ContentBlock; end
  class ToolResult < ContentBlock; end
  class GuardContent < ContentBlock; end
  class Unknown < ContentBlock; end
end

#imageTypes::ImageBlock

A tool result that is an image.

<note markdown=“1”> This field is only supported by Anthropic Claude 3 models.

</note>

Returns:



275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 275

class ContentBlock < Struct.new(
  :text,
  :image,
  :document,
  :video,
  :tool_use,
  :tool_result,
  :guard_content,
  :unknown)
  SENSITIVE = []
  include Aws::Structure
  include Aws::Structure::Union

  class Text < ContentBlock; end
  class Image < ContentBlock; end
  class Document < ContentBlock; end
  class Video < ContentBlock; end
  class ToolUse < ContentBlock; end
  class ToolResult < ContentBlock; end
  class GuardContent < ContentBlock; end
  class Unknown < ContentBlock; end
end

#jsonHash, ...

A tool result that is JSON format data.

Returns:

  • (Hash, Array, String, Numeric, Boolean)


2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 2613

class ToolInputSchema < Struct.new(
  :json,
  :unknown)
  SENSITIVE = []
  include Aws::Structure
  include Aws::Structure::Union

  class Json < ToolInputSchema; end
  class Unknown < ToolInputSchema; end
end

#messageString

Returns:

  • (String)


433
434
435
436
437
438
439
440
441
442
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 433

class ConverseOutput < Struct.new(
  :message,
  :unknown)
  SENSITIVE = []
  include Aws::Structure
  include Aws::Structure::Union

  class Message < ConverseOutput; end
  class Unknown < ConverseOutput; end
end

#metricsTypes::ConverseStreamMetrics

The metrics for the conversation stream metadata event.



657
658
659
660
661
662
663
664
665
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 657

class ConverseStreamMetadataEvent < Struct.new(
  :usage,
  :metrics,
  :trace,
  :performance_config,
  :event_type)
  SENSITIVE = []
  include Aws::Structure
end

#original_messageString

The original message.

Returns:

  • (String)


2186
2187
2188
2189
2190
2191
2192
2193
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 2186

class ModelStreamErrorException < Struct.new(
  :message,
  :original_status_code,
  :original_message,
  :event_type)
  SENSITIVE = []
  include Aws::Structure
end

#original_status_codeInteger

The original status code.

Returns:

  • (Integer)


2186
2187
2188
2189
2190
2191
2192
2193
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 2186

class ModelStreamErrorException < Struct.new(
  :message,
  :original_status_code,
  :original_message,
  :event_type)
  SENSITIVE = []
  include Aws::Structure
end

#performance_configTypes::PerformanceConfiguration

Model performance configuration metadata for the conversation stream event.



657
658
659
660
661
662
663
664
665
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 657

class ConverseStreamMetadataEvent < Struct.new(
  :usage,
  :metrics,
  :trace,
  :performance_config,
  :event_type)
  SENSITIVE = []
  include Aws::Structure
end

#roleString

The role for the message.

Returns:

  • (String)


2101
2102
2103
2104
2105
2106
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 2101

class MessageStartEvent < Struct.new(
  :role,
  :event_type)
  SENSITIVE = []
  include Aws::Structure
end

#s3_locationTypes::S3Location

The location of a video object in an S3 bucket.

Returns:



2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 2844

class VideoSource < Struct.new(
  :bytes,
  :s3_location,
  :unknown)
  SENSITIVE = []
  include Aws::Structure
  include Aws::Structure::Union

  class Bytes < VideoSource; end
  class S3Location < VideoSource; end
  class Unknown < VideoSource; end
end

#s3_output_data_configTypes::AsyncInvokeS3OutputDataConfig

A storage location for the output data in an S3 bucket



112
113
114
115
116
117
118
119
120
121
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 112

class AsyncInvokeOutputDataConfig < Struct.new(
  :s3_output_data_config,
  :unknown)
  SENSITIVE = []
  include Aws::Structure
  include Aws::Structure::Union

  class S3OutputDataConfig < AsyncInvokeOutputDataConfig; end
  class Unknown < AsyncInvokeOutputDataConfig; end
end

#startTypes::ContentBlockStart

Start information about a content block start event.



378
379
380
381
382
383
384
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 378

class ContentBlockStartEvent < Struct.new(
  :start,
  :content_block_index,
  :event_type)
  SENSITIVE = []
  include Aws::Structure
end

#stop_reasonString

The reason why the model stopped generating output.

Returns:

  • (String)


2120
2121
2122
2123
2124
2125
2126
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 2120

class MessageStopEvent < Struct.new(
  :stop_reason,
  :additional_model_response_fields,
  :event_type)
  SENSITIVE = []
  include Aws::Structure
end

#textString

A tool result that is text.

Returns:

  • (String)


275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 275

class ContentBlock < Struct.new(
  :text,
  :image,
  :document,
  :video,
  :tool_use,
  :tool_result,
  :guard_content,
  :unknown)
  SENSITIVE = []
  include Aws::Structure
  include Aws::Structure::Union

  class Text < ContentBlock; end
  class Image < ContentBlock; end
  class Document < ContentBlock; end
  class Video < ContentBlock; end
  class ToolUse < ContentBlock; end
  class ToolResult < ContentBlock; end
  class GuardContent < ContentBlock; end
  class Unknown < ContentBlock; end
end

#toolTypes::SpecificToolChoice

The Model must request the specified tool. Only supported by Anthropic Claude 3 models.



2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 2558

class ToolChoice < Struct.new(
  :auto,
  :any,
  :tool,
  :unknown)
  SENSITIVE = []
  include Aws::Structure
  include Aws::Structure::Union

  class Auto < ToolChoice; end
  class Any < ToolChoice; end
  class Tool < ToolChoice; end
  class Unknown < ToolChoice; end
end

#tool_resultTypes::ToolResultBlock

The result for a tool request that a model makes.



275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 275

class ContentBlock < Struct.new(
  :text,
  :image,
  :document,
  :video,
  :tool_use,
  :tool_result,
  :guard_content,
  :unknown)
  SENSITIVE = []
  include Aws::Structure
  include Aws::Structure::Union

  class Text < ContentBlock; end
  class Image < ContentBlock; end
  class Document < ContentBlock; end
  class Video < ContentBlock; end
  class ToolUse < ContentBlock; end
  class ToolResult < ContentBlock; end
  class GuardContent < ContentBlock; end
  class Unknown < ContentBlock; end
end

#tool_specTypes::ToolSpecification

The specfication for the tool.



2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 2525

class Tool < Struct.new(
  :tool_spec,
  :unknown)
  SENSITIVE = []
  include Aws::Structure
  include Aws::Structure::Union

  class ToolSpec < Tool; end
  class Unknown < Tool; end
end

#tool_useTypes::ToolUseBlockStart

Information about a tool that the model is requesting to use.



275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 275

class ContentBlock < Struct.new(
  :text,
  :image,
  :document,
  :video,
  :tool_use,
  :tool_result,
  :guard_content,
  :unknown)
  SENSITIVE = []
  include Aws::Structure
  include Aws::Structure::Union

  class Text < ContentBlock; end
  class Image < ContentBlock; end
  class Document < ContentBlock; end
  class Video < ContentBlock; end
  class ToolUse < ContentBlock; end
  class ToolResult < ContentBlock; end
  class GuardContent < ContentBlock; end
  class Unknown < ContentBlock; end
end

#traceTypes::ConverseStreamTrace

The trace object in the response from [ConverseStream] that contains information about the guardrail behavior.

[1]: docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html



657
658
659
660
661
662
663
664
665
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 657

class ConverseStreamMetadataEvent < Struct.new(
  :usage,
  :metrics,
  :trace,
  :performance_config,
  :event_type)
  SENSITIVE = []
  include Aws::Structure
end

#usageTypes::TokenUsage

Usage information for the conversation stream event.

Returns:



657
658
659
660
661
662
663
664
665
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 657

class ConverseStreamMetadataEvent < Struct.new(
  :usage,
  :metrics,
  :trace,
  :performance_config,
  :event_type)
  SENSITIVE = []
  include Aws::Structure
end

#videoTypes::VideoBlock

A tool result that is video.

Returns:



275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 275

class ContentBlock < Struct.new(
  :text,
  :image,
  :document,
  :video,
  :tool_use,
  :tool_result,
  :guard_content,
  :unknown)
  SENSITIVE = []
  include Aws::Structure
  include Aws::Structure::Union

  class Text < ContentBlock; end
  class Image < ContentBlock; end
  class Document < ContentBlock; end
  class Video < ContentBlock; end
  class ToolUse < ContentBlock; end
  class ToolResult < ContentBlock; end
  class GuardContent < ContentBlock; end
  class Unknown < ContentBlock; end
end