Module: Aws::BedrockRuntime::Types

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

Defined Under Namespace

Classes: AccessDeniedException, AnyToolChoice, AutoToolChoice, ContentBlock, ContentBlockDelta, ContentBlockDeltaEvent, ContentBlockStart, ContentBlockStartEvent, ContentBlockStopEvent, ConverseMetrics, ConverseOutput, ConverseRequest, ConverseResponse, ConverseStreamMetadataEvent, ConverseStreamMetrics, ConverseStreamOutput, ConverseStreamRequest, ConverseStreamResponse, ConverseStreamTrace, ConverseTrace, GuardrailAssessment, GuardrailConfiguration, GuardrailContentFilter, GuardrailContentPolicyAssessment, GuardrailConverseContentBlock, GuardrailConverseTextBlock, GuardrailCustomWord, GuardrailManagedWord, GuardrailPiiEntityFilter, GuardrailRegexFilter, GuardrailSensitiveInformationPolicyAssessment, GuardrailStreamConfiguration, GuardrailTopic, GuardrailTopicPolicyAssessment, GuardrailTraceAssessment, GuardrailWordPolicyAssessment, ImageBlock, ImageSource, InferenceConfiguration, InternalServerException, InvokeModelRequest, InvokeModelResponse, InvokeModelWithResponseStreamRequest, InvokeModelWithResponseStreamResponse, Message, MessageStartEvent, MessageStopEvent, ModelErrorException, ModelNotReadyException, ModelStreamErrorException, ModelTimeoutException, PayloadPart, ResourceNotFoundException, ResponseStream, ServiceQuotaExceededException, SpecificToolChoice, SystemContentBlock, ThrottlingException, TokenUsage, Tool, ToolChoice, ToolConfiguration, ToolInputSchema, ToolResultBlock, ToolResultContentBlock, ToolSpecification, ToolUseBlock, ToolUseBlockDelta, ToolUseBlockStart, ValidationException

Instance Attribute Summary collapse

Instance Attribute Details

#additional_model_response_fieldsHash, ...

The additional model response fields.

Returns:

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


1333
1334
1335
1336
1337
1338
1339
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 1333

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).



1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 1591

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.



1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 1591

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

Base64-encoded bytes of payload data.

Returns:

  • (String)


963
964
965
966
967
968
969
970
971
972
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 963

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

  class Bytes < ImageSource; end
  class Unknown < ImageSource; end
end

#content_block_indexInteger

The index for a content block.

Returns:

  • (Integer)


140
141
142
143
144
145
146
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 140

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.



140
141
142
143
144
145
146
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 140

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

#guard_contentTypes::GuardrailConverseContentBlock

A content block to assess with the guardrail. Use with the Converse API (Converse and ConverseStream).

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



82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 82

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

  class Text < ContentBlock; end
  class Image < 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:



82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 82

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

  class Text < ContentBlock; end
  class Image < 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)


1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 1645

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)


236
237
238
239
240
241
242
243
244
245
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 236

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.



406
407
408
409
410
411
412
413
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 406

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

#original_messageString

The original message.

Returns:

  • (String)


1393
1394
1395
1396
1397
1398
1399
1400
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 1393

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)


1393
1394
1395
1396
1397
1398
1399
1400
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 1393

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

#roleString

The role for the message.

Returns:

  • (String)


1314
1315
1316
1317
1318
1319
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 1314

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

#startTypes::ContentBlockStart

Start information about a content block start event.



181
182
183
184
185
186
187
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 181

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)


1333
1334
1335
1336
1337
1338
1339
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 1333

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)


82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 82

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

  class Text < ContentBlock; end
  class Image < 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.



1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 1591

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.



82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 82

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

  class Text < ContentBlock; end
  class Image < 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.



1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 1558

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.



82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 82

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

  class Text < ContentBlock; end
  class Image < 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.



406
407
408
409
410
411
412
413
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 406

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

#usageTypes::TokenUsage

Usage information for the conversation stream event.

Returns:



406
407
408
409
410
411
412
413
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 406

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