Module: Aws::BedrockRuntime::Types

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

Defined Under Namespace

Classes: AccessDeniedException, AnyToolChoice, ApplyGuardrailRequest, ApplyGuardrailResponse, AutoToolChoice, ContentBlock, ContentBlockDelta, ContentBlockDeltaEvent, ContentBlockStart, ContentBlockStartEvent, ContentBlockStopEvent, ConverseMetrics, ConverseOutput, ConverseRequest, ConverseResponse, ConverseStreamMetadataEvent, ConverseStreamMetrics, ConverseStreamOutput, ConverseStreamRequest, ConverseStreamResponse, ConverseStreamTrace, ConverseTrace, DocumentBlock, DocumentSource, 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, Message, MessageStartEvent, MessageStopEvent, ModelErrorException, ModelNotReadyException, ModelStreamErrorException, ModelTimeoutException, PayloadPart, ResourceNotFoundException, ResponseStream, ServiceQuotaExceededException, ServiceUnavailableException, 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)


1752
1753
1754
1755
1756
1757
1758
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 1752

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



2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 2053

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.



2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 2053

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)


723
724
725
726
727
728
729
730
731
732
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 723

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)


210
211
212
213
214
215
216
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 210

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.



210
211
212
213
214
215
216
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 210

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

#documentTypes::DocumentBlock

A tool result that is a document.



150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 150

class ContentBlock < Struct.new(
  :text,
  :image,
  :document,
  :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 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



150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 150

class ContentBlock < Struct.new(
  :text,
  :image,
  :document,
  :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 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:



150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 150

class ContentBlock < Struct.new(
  :text,
  :image,
  :document,
  :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 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)


2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 2113

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)


306
307
308
309
310
311
312
313
314
315
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 306

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.



490
491
492
493
494
495
496
497
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 490

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

#original_messageString

The original message.

Returns:

  • (String)


1818
1819
1820
1821
1822
1823
1824
1825
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 1818

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)


1818
1819
1820
1821
1822
1823
1824
1825
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 1818

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)


1733
1734
1735
1736
1737
1738
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 1733

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

#startTypes::ContentBlockStart

Start information about a content block start event.



251
252
253
254
255
256
257
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 251

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)


1752
1753
1754
1755
1756
1757
1758
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 1752

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)


150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 150

class ContentBlock < Struct.new(
  :text,
  :image,
  :document,
  :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 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.



2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 2053

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.



150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 150

class ContentBlock < Struct.new(
  :text,
  :image,
  :document,
  :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 ToolUse < ContentBlock; end
  class ToolResult < ContentBlock; end
  class GuardContent < ContentBlock; end
  class Unknown < ContentBlock; end
end

#tool_specTypes::ToolSpecification

The specfication for the tool.



2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 2020

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.



150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 150

class ContentBlock < Struct.new(
  :text,
  :image,
  :document,
  :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 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



490
491
492
493
494
495
496
497
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 490

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

#usageTypes::TokenUsage

Usage information for the conversation stream event.

Returns:



490
491
492
493
494
495
496
497
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 490

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