Documentation ¶
Overview ¶
Package bedrockruntime provides the client and types for making API requests to Amazon Bedrock Runtime.
Describes the API operations for running inference using Amazon Bedrock models.
See https://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30 for more information on this service.
See bedrockruntime package documentation for more information. https://docs.aws.amazon.com/sdk-for-go/api/service/bedrockruntime/
Using the Client ¶
To contact Amazon Bedrock Runtime with the SDK use the New function to create a new service client. With that client you can make API requests to the service. These clients are safe to use concurrently.
See the SDK's documentation for more information on how to use the SDK. https://docs.aws.amazon.com/sdk-for-go/api/
See aws.Config documentation for more information on configuring SDK clients. https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
See the Amazon Bedrock Runtime client BedrockRuntime for more information on creating client for this service. https://docs.aws.amazon.com/sdk-for-go/api/service/bedrockruntime/#New
Index ¶
- Constants
- func ConversationRole_Values() []string
- func DocumentFormat_Values() []string
- func GuardrailAction_Values() []string
- func GuardrailContentFilterConfidence_Values() []string
- func GuardrailContentFilterType_Values() []string
- func GuardrailContentPolicyAction_Values() []string
- func GuardrailContentQualifier_Values() []string
- func GuardrailContentSource_Values() []string
- func GuardrailContextualGroundingFilterType_Values() []string
- func GuardrailContextualGroundingPolicyAction_Values() []string
- func GuardrailConverseContentQualifier_Values() []string
- func GuardrailManagedWordType_Values() []string
- func GuardrailPiiEntityType_Values() []string
- func GuardrailSensitiveInformationPolicyAction_Values() []string
- func GuardrailStreamProcessingMode_Values() []string
- func GuardrailTopicPolicyAction_Values() []string
- func GuardrailTopicType_Values() []string
- func GuardrailTrace_Values() []string
- func GuardrailWordPolicyAction_Values() []string
- func ImageFormat_Values() []string
- func StopReason_Values() []string
- func ToolResultStatus_Values() []string
- func Trace_Values() []string
- type AccessDeniedException
- func (s *AccessDeniedException) Code() string
- func (s *AccessDeniedException) Error() string
- func (s AccessDeniedException) GoString() string
- func (s *AccessDeniedException) Message() string
- func (s *AccessDeniedException) OrigErr() error
- func (s *AccessDeniedException) RequestID() string
- func (s *AccessDeniedException) StatusCode() int
- func (s AccessDeniedException) String() string
- type AnyToolChoice
- type ApplyGuardrailInput
- func (s ApplyGuardrailInput) GoString() string
- func (s *ApplyGuardrailInput) SetContent(v []*GuardrailContentBlock) *ApplyGuardrailInput
- func (s *ApplyGuardrailInput) SetGuardrailIdentifier(v string) *ApplyGuardrailInput
- func (s *ApplyGuardrailInput) SetGuardrailVersion(v string) *ApplyGuardrailInput
- func (s *ApplyGuardrailInput) SetSource(v string) *ApplyGuardrailInput
- func (s ApplyGuardrailInput) String() string
- func (s *ApplyGuardrailInput) Validate() error
- type ApplyGuardrailOutput
- func (s ApplyGuardrailOutput) GoString() string
- func (s *ApplyGuardrailOutput) SetAction(v string) *ApplyGuardrailOutput
- func (s *ApplyGuardrailOutput) SetAssessments(v []*GuardrailAssessment) *ApplyGuardrailOutput
- func (s *ApplyGuardrailOutput) SetOutputs(v []*GuardrailOutputContent) *ApplyGuardrailOutput
- func (s *ApplyGuardrailOutput) SetUsage(v *GuardrailUsage) *ApplyGuardrailOutput
- func (s ApplyGuardrailOutput) String() string
- type AutoToolChoice
- type BedrockRuntime
- func (c *BedrockRuntime) ApplyGuardrail(input *ApplyGuardrailInput) (*ApplyGuardrailOutput, error)
- func (c *BedrockRuntime) ApplyGuardrailRequest(input *ApplyGuardrailInput) (req *request.Request, output *ApplyGuardrailOutput)
- func (c *BedrockRuntime) ApplyGuardrailWithContext(ctx aws.Context, input *ApplyGuardrailInput, opts ...request.Option) (*ApplyGuardrailOutput, error)
- func (c *BedrockRuntime) Converse(input *ConverseInput) (*ConverseOutput, error)
- func (c *BedrockRuntime) ConverseRequest(input *ConverseInput) (req *request.Request, output *ConverseOutput)
- func (c *BedrockRuntime) ConverseStream(input *ConverseStreamInput) (*ConverseStreamOutput, error)
- func (c *BedrockRuntime) ConverseStreamRequest(input *ConverseStreamInput) (req *request.Request, output *ConverseStreamOutput)
- func (c *BedrockRuntime) ConverseStreamWithContext(ctx aws.Context, input *ConverseStreamInput, opts ...request.Option) (*ConverseStreamOutput, error)
- func (c *BedrockRuntime) ConverseWithContext(ctx aws.Context, input *ConverseInput, opts ...request.Option) (*ConverseOutput, error)
- func (c *BedrockRuntime) InvokeModel(input *InvokeModelInput) (*InvokeModelOutput, error)
- func (c *BedrockRuntime) InvokeModelRequest(input *InvokeModelInput) (req *request.Request, output *InvokeModelOutput)
- func (c *BedrockRuntime) InvokeModelWithContext(ctx aws.Context, input *InvokeModelInput, opts ...request.Option) (*InvokeModelOutput, error)
- func (c *BedrockRuntime) InvokeModelWithResponseStream(input *InvokeModelWithResponseStreamInput) (*InvokeModelWithResponseStreamOutput, error)
- func (c *BedrockRuntime) InvokeModelWithResponseStreamRequest(input *InvokeModelWithResponseStreamInput) (req *request.Request, output *InvokeModelWithResponseStreamOutput)
- func (c *BedrockRuntime) InvokeModelWithResponseStreamWithContext(ctx aws.Context, input *InvokeModelWithResponseStreamInput, ...) (*InvokeModelWithResponseStreamOutput, error)
- type ContentBlock
- func (s ContentBlock) GoString() string
- func (s *ContentBlock) SetDocument(v *DocumentBlock) *ContentBlock
- func (s *ContentBlock) SetGuardContent(v *GuardrailConverseContentBlock) *ContentBlock
- func (s *ContentBlock) SetImage(v *ImageBlock) *ContentBlock
- func (s *ContentBlock) SetText(v string) *ContentBlock
- func (s *ContentBlock) SetToolResult(v *ToolResultBlock) *ContentBlock
- func (s ContentBlock) String() string
- func (s *ContentBlock) Validate() error
- type ContentBlockDelta
- type ContentBlockDeltaEvent
- func (s ContentBlockDeltaEvent) GoString() string
- func (s *ContentBlockDeltaEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error)
- func (s *ContentBlockDeltaEvent) SetContentBlockIndex(v int64) *ContentBlockDeltaEvent
- func (s *ContentBlockDeltaEvent) SetDelta(v *ContentBlockDelta) *ContentBlockDeltaEvent
- func (s ContentBlockDeltaEvent) String() string
- func (s *ContentBlockDeltaEvent) UnmarshalEvent(payloadUnmarshaler protocol.PayloadUnmarshaler, msg eventstream.Message) error
- type ContentBlockStart
- type ContentBlockStartEvent
- func (s ContentBlockStartEvent) GoString() string
- func (s *ContentBlockStartEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error)
- func (s *ContentBlockStartEvent) SetContentBlockIndex(v int64) *ContentBlockStartEvent
- func (s *ContentBlockStartEvent) SetStart(v *ContentBlockStart) *ContentBlockStartEvent
- func (s ContentBlockStartEvent) String() string
- func (s *ContentBlockStartEvent) UnmarshalEvent(payloadUnmarshaler protocol.PayloadUnmarshaler, msg eventstream.Message) error
- type ContentBlockStopEvent
- func (s ContentBlockStopEvent) GoString() string
- func (s *ContentBlockStopEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error)
- func (s *ContentBlockStopEvent) SetContentBlockIndex(v int64) *ContentBlockStopEvent
- func (s ContentBlockStopEvent) String() string
- func (s *ContentBlockStopEvent) UnmarshalEvent(payloadUnmarshaler protocol.PayloadUnmarshaler, msg eventstream.Message) error
- type ConverseInput
- func (s ConverseInput) GoString() string
- func (s *ConverseInput) SetAdditionalModelResponseFieldPaths(v []*string) *ConverseInput
- func (s *ConverseInput) SetGuardrailConfig(v *GuardrailConfiguration) *ConverseInput
- func (s *ConverseInput) SetInferenceConfig(v *InferenceConfiguration) *ConverseInput
- func (s *ConverseInput) SetMessages(v []*Message) *ConverseInput
- func (s *ConverseInput) SetModelId(v string) *ConverseInput
- func (s *ConverseInput) SetSystem(v []*SystemContentBlock) *ConverseInput
- func (s *ConverseInput) SetToolConfig(v *ToolConfiguration) *ConverseInput
- func (s ConverseInput) String() string
- func (s *ConverseInput) Validate() error
- type ConverseMetrics
- type ConverseOutput
- func (s ConverseOutput) GoString() string
- func (s *ConverseOutput) SetMetrics(v *ConverseMetrics) *ConverseOutput
- func (s *ConverseOutput) SetOutput(v *ConverseOutput_) *ConverseOutput
- func (s *ConverseOutput) SetStopReason(v string) *ConverseOutput
- func (s *ConverseOutput) SetTrace(v *ConverseTrace) *ConverseOutput
- func (s *ConverseOutput) SetUsage(v *TokenUsage) *ConverseOutput
- func (s ConverseOutput) String() string
- type ConverseOutput_
- type ConverseStreamEventStream
- type ConverseStreamInput
- func (s ConverseStreamInput) GoString() string
- func (s *ConverseStreamInput) SetAdditionalModelResponseFieldPaths(v []*string) *ConverseStreamInput
- func (s *ConverseStreamInput) SetGuardrailConfig(v *GuardrailStreamConfiguration) *ConverseStreamInput
- func (s *ConverseStreamInput) SetInferenceConfig(v *InferenceConfiguration) *ConverseStreamInput
- func (s *ConverseStreamInput) SetMessages(v []*Message) *ConverseStreamInput
- func (s *ConverseStreamInput) SetModelId(v string) *ConverseStreamInput
- func (s *ConverseStreamInput) SetSystem(v []*SystemContentBlock) *ConverseStreamInput
- func (s *ConverseStreamInput) SetToolConfig(v *ToolConfiguration) *ConverseStreamInput
- func (s ConverseStreamInput) String() string
- func (s *ConverseStreamInput) Validate() error
- type ConverseStreamMetadataEvent
- func (s ConverseStreamMetadataEvent) GoString() string
- func (s *ConverseStreamMetadataEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error)
- func (s *ConverseStreamMetadataEvent) SetMetrics(v *ConverseStreamMetrics) *ConverseStreamMetadataEvent
- func (s *ConverseStreamMetadataEvent) SetTrace(v *ConverseStreamTrace) *ConverseStreamMetadataEvent
- func (s *ConverseStreamMetadataEvent) SetUsage(v *TokenUsage) *ConverseStreamMetadataEvent
- func (s ConverseStreamMetadataEvent) String() string
- func (s *ConverseStreamMetadataEvent) UnmarshalEvent(payloadUnmarshaler protocol.PayloadUnmarshaler, msg eventstream.Message) error
- type ConverseStreamMetrics
- type ConverseStreamOutput
- type ConverseStreamOutput_Event
- type ConverseStreamOutput_Reader
- type ConverseStreamOutput_UnknownEvent
- type ConverseStreamTrace
- type ConverseTrace
- type DocumentBlock
- func (s DocumentBlock) GoString() string
- func (s *DocumentBlock) SetFormat(v string) *DocumentBlock
- func (s *DocumentBlock) SetName(v string) *DocumentBlock
- func (s *DocumentBlock) SetSource(v *DocumentSource) *DocumentBlock
- func (s DocumentBlock) String() string
- func (s *DocumentBlock) Validate() error
- type DocumentSource
- type GuardrailAssessment
- func (s GuardrailAssessment) GoString() string
- func (s *GuardrailAssessment) SetContentPolicy(v *GuardrailContentPolicyAssessment) *GuardrailAssessment
- func (s *GuardrailAssessment) SetContextualGroundingPolicy(v *GuardrailContextualGroundingPolicyAssessment) *GuardrailAssessment
- func (s *GuardrailAssessment) SetSensitiveInformationPolicy(v *GuardrailSensitiveInformationPolicyAssessment) *GuardrailAssessment
- func (s *GuardrailAssessment) SetTopicPolicy(v *GuardrailTopicPolicyAssessment) *GuardrailAssessment
- func (s *GuardrailAssessment) SetWordPolicy(v *GuardrailWordPolicyAssessment) *GuardrailAssessment
- func (s GuardrailAssessment) String() string
- type GuardrailConfiguration
- func (s GuardrailConfiguration) GoString() string
- func (s *GuardrailConfiguration) SetGuardrailIdentifier(v string) *GuardrailConfiguration
- func (s *GuardrailConfiguration) SetGuardrailVersion(v string) *GuardrailConfiguration
- func (s *GuardrailConfiguration) SetTrace(v string) *GuardrailConfiguration
- func (s GuardrailConfiguration) String() string
- func (s *GuardrailConfiguration) Validate() error
- type GuardrailContentBlock
- type GuardrailContentFilter
- func (s GuardrailContentFilter) GoString() string
- func (s *GuardrailContentFilter) SetAction(v string) *GuardrailContentFilter
- func (s *GuardrailContentFilter) SetConfidence(v string) *GuardrailContentFilter
- func (s *GuardrailContentFilter) SetType(v string) *GuardrailContentFilter
- func (s GuardrailContentFilter) String() string
- type GuardrailContentPolicyAssessment
- type GuardrailContextualGroundingFilter
- func (s GuardrailContextualGroundingFilter) GoString() string
- func (s *GuardrailContextualGroundingFilter) SetAction(v string) *GuardrailContextualGroundingFilter
- func (s *GuardrailContextualGroundingFilter) SetScore(v float64) *GuardrailContextualGroundingFilter
- func (s *GuardrailContextualGroundingFilter) SetThreshold(v float64) *GuardrailContextualGroundingFilter
- func (s *GuardrailContextualGroundingFilter) SetType(v string) *GuardrailContextualGroundingFilter
- func (s GuardrailContextualGroundingFilter) String() string
- type GuardrailContextualGroundingPolicyAssessment
- type GuardrailConverseContentBlock
- type GuardrailConverseTextBlock
- func (s GuardrailConverseTextBlock) GoString() string
- func (s *GuardrailConverseTextBlock) SetQualifiers(v []*string) *GuardrailConverseTextBlock
- func (s *GuardrailConverseTextBlock) SetText(v string) *GuardrailConverseTextBlock
- func (s GuardrailConverseTextBlock) String() string
- func (s *GuardrailConverseTextBlock) Validate() error
- type GuardrailCustomWord
- type GuardrailManagedWord
- func (s GuardrailManagedWord) GoString() string
- func (s *GuardrailManagedWord) SetAction(v string) *GuardrailManagedWord
- func (s *GuardrailManagedWord) SetMatch(v string) *GuardrailManagedWord
- func (s *GuardrailManagedWord) SetType(v string) *GuardrailManagedWord
- func (s GuardrailManagedWord) String() string
- type GuardrailOutputContent
- type GuardrailPiiEntityFilter
- func (s GuardrailPiiEntityFilter) GoString() string
- func (s *GuardrailPiiEntityFilter) SetAction(v string) *GuardrailPiiEntityFilter
- func (s *GuardrailPiiEntityFilter) SetMatch(v string) *GuardrailPiiEntityFilter
- func (s *GuardrailPiiEntityFilter) SetType(v string) *GuardrailPiiEntityFilter
- func (s GuardrailPiiEntityFilter) String() string
- type GuardrailRegexFilter
- func (s GuardrailRegexFilter) GoString() string
- func (s *GuardrailRegexFilter) SetAction(v string) *GuardrailRegexFilter
- func (s *GuardrailRegexFilter) SetMatch(v string) *GuardrailRegexFilter
- func (s *GuardrailRegexFilter) SetName(v string) *GuardrailRegexFilter
- func (s *GuardrailRegexFilter) SetRegex(v string) *GuardrailRegexFilter
- func (s GuardrailRegexFilter) String() string
- type GuardrailSensitiveInformationPolicyAssessment
- func (s GuardrailSensitiveInformationPolicyAssessment) GoString() string
- func (s *GuardrailSensitiveInformationPolicyAssessment) SetPiiEntities(v []*GuardrailPiiEntityFilter) *GuardrailSensitiveInformationPolicyAssessment
- func (s *GuardrailSensitiveInformationPolicyAssessment) SetRegexes(v []*GuardrailRegexFilter) *GuardrailSensitiveInformationPolicyAssessment
- func (s GuardrailSensitiveInformationPolicyAssessment) String() string
- type GuardrailStreamConfiguration
- func (s GuardrailStreamConfiguration) GoString() string
- func (s *GuardrailStreamConfiguration) SetGuardrailIdentifier(v string) *GuardrailStreamConfiguration
- func (s *GuardrailStreamConfiguration) SetGuardrailVersion(v string) *GuardrailStreamConfiguration
- func (s *GuardrailStreamConfiguration) SetStreamProcessingMode(v string) *GuardrailStreamConfiguration
- func (s *GuardrailStreamConfiguration) SetTrace(v string) *GuardrailStreamConfiguration
- func (s GuardrailStreamConfiguration) String() string
- func (s *GuardrailStreamConfiguration) Validate() error
- type GuardrailTextBlock
- type GuardrailTopic
- type GuardrailTopicPolicyAssessment
- type GuardrailTraceAssessment
- func (s GuardrailTraceAssessment) GoString() string
- func (s *GuardrailTraceAssessment) SetInputAssessment(v map[string]*GuardrailAssessment) *GuardrailTraceAssessment
- func (s *GuardrailTraceAssessment) SetModelOutput(v []*string) *GuardrailTraceAssessment
- func (s *GuardrailTraceAssessment) SetOutputAssessments(v map[string][]*GuardrailAssessment) *GuardrailTraceAssessment
- func (s GuardrailTraceAssessment) String() string
- type GuardrailUsage
- func (s GuardrailUsage) GoString() string
- func (s *GuardrailUsage) SetContentPolicyUnits(v int64) *GuardrailUsage
- func (s *GuardrailUsage) SetContextualGroundingPolicyUnits(v int64) *GuardrailUsage
- func (s *GuardrailUsage) SetSensitiveInformationPolicyFreeUnits(v int64) *GuardrailUsage
- func (s *GuardrailUsage) SetSensitiveInformationPolicyUnits(v int64) *GuardrailUsage
- func (s *GuardrailUsage) SetTopicPolicyUnits(v int64) *GuardrailUsage
- func (s *GuardrailUsage) SetWordPolicyUnits(v int64) *GuardrailUsage
- func (s GuardrailUsage) String() string
- type GuardrailWordPolicyAssessment
- func (s GuardrailWordPolicyAssessment) GoString() string
- func (s *GuardrailWordPolicyAssessment) SetCustomWords(v []*GuardrailCustomWord) *GuardrailWordPolicyAssessment
- func (s *GuardrailWordPolicyAssessment) SetManagedWordLists(v []*GuardrailManagedWord) *GuardrailWordPolicyAssessment
- func (s GuardrailWordPolicyAssessment) String() string
- type ImageBlock
- type ImageSource
- type InferenceConfiguration
- func (s InferenceConfiguration) GoString() string
- func (s *InferenceConfiguration) SetMaxTokens(v int64) *InferenceConfiguration
- func (s *InferenceConfiguration) SetStopSequences(v []*string) *InferenceConfiguration
- func (s *InferenceConfiguration) SetTemperature(v float64) *InferenceConfiguration
- func (s *InferenceConfiguration) SetTopP(v float64) *InferenceConfiguration
- func (s InferenceConfiguration) String() string
- func (s *InferenceConfiguration) Validate() error
- type InternalServerException
- func (s *InternalServerException) Code() string
- func (s *InternalServerException) Error() string
- func (s InternalServerException) GoString() string
- func (s *InternalServerException) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error)
- func (s *InternalServerException) Message() string
- func (s *InternalServerException) OrigErr() error
- func (s *InternalServerException) RequestID() string
- func (s *InternalServerException) StatusCode() int
- func (s InternalServerException) String() string
- func (s *InternalServerException) UnmarshalEvent(payloadUnmarshaler protocol.PayloadUnmarshaler, msg eventstream.Message) error
- type InvokeModelInput
- func (s InvokeModelInput) GoString() string
- func (s *InvokeModelInput) SetAccept(v string) *InvokeModelInput
- func (s *InvokeModelInput) SetBody(v []byte) *InvokeModelInput
- func (s *InvokeModelInput) SetContentType(v string) *InvokeModelInput
- func (s *InvokeModelInput) SetGuardrailIdentifier(v string) *InvokeModelInput
- func (s *InvokeModelInput) SetGuardrailVersion(v string) *InvokeModelInput
- func (s *InvokeModelInput) SetModelId(v string) *InvokeModelInput
- func (s *InvokeModelInput) SetTrace(v string) *InvokeModelInput
- func (s InvokeModelInput) String() string
- func (s *InvokeModelInput) Validate() error
- type InvokeModelOutput
- type InvokeModelWithResponseStreamEventStream
- type InvokeModelWithResponseStreamInput
- func (s InvokeModelWithResponseStreamInput) GoString() string
- func (s *InvokeModelWithResponseStreamInput) SetAccept(v string) *InvokeModelWithResponseStreamInput
- func (s *InvokeModelWithResponseStreamInput) SetBody(v []byte) *InvokeModelWithResponseStreamInput
- func (s *InvokeModelWithResponseStreamInput) SetContentType(v string) *InvokeModelWithResponseStreamInput
- func (s *InvokeModelWithResponseStreamInput) SetGuardrailIdentifier(v string) *InvokeModelWithResponseStreamInput
- func (s *InvokeModelWithResponseStreamInput) SetGuardrailVersion(v string) *InvokeModelWithResponseStreamInput
- func (s *InvokeModelWithResponseStreamInput) SetModelId(v string) *InvokeModelWithResponseStreamInput
- func (s *InvokeModelWithResponseStreamInput) SetTrace(v string) *InvokeModelWithResponseStreamInput
- func (s InvokeModelWithResponseStreamInput) String() string
- func (s *InvokeModelWithResponseStreamInput) Validate() error
- type InvokeModelWithResponseStreamOutput
- func (s *InvokeModelWithResponseStreamOutput) GetStream() *InvokeModelWithResponseStreamEventStream
- func (s InvokeModelWithResponseStreamOutput) GoString() string
- func (s *InvokeModelWithResponseStreamOutput) SetContentType(v string) *InvokeModelWithResponseStreamOutput
- func (s InvokeModelWithResponseStreamOutput) String() string
- type Message
- type MessageStartEvent
- func (s MessageStartEvent) GoString() string
- func (s *MessageStartEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error)
- func (s *MessageStartEvent) SetRole(v string) *MessageStartEvent
- func (s MessageStartEvent) String() string
- func (s *MessageStartEvent) UnmarshalEvent(payloadUnmarshaler protocol.PayloadUnmarshaler, msg eventstream.Message) error
- type MessageStopEvent
- func (s MessageStopEvent) GoString() string
- func (s *MessageStopEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error)
- func (s *MessageStopEvent) SetStopReason(v string) *MessageStopEvent
- func (s MessageStopEvent) String() string
- func (s *MessageStopEvent) UnmarshalEvent(payloadUnmarshaler protocol.PayloadUnmarshaler, msg eventstream.Message) error
- type ModelErrorException
- func (s *ModelErrorException) Code() string
- func (s *ModelErrorException) Error() string
- func (s ModelErrorException) GoString() string
- func (s *ModelErrorException) Message() string
- func (s *ModelErrorException) OrigErr() error
- func (s *ModelErrorException) RequestID() string
- func (s *ModelErrorException) StatusCode() int
- func (s ModelErrorException) String() string
- type ModelNotReadyException
- func (s *ModelNotReadyException) Code() string
- func (s *ModelNotReadyException) Error() string
- func (s ModelNotReadyException) GoString() string
- func (s *ModelNotReadyException) Message() string
- func (s *ModelNotReadyException) OrigErr() error
- func (s *ModelNotReadyException) RequestID() string
- func (s *ModelNotReadyException) StatusCode() int
- func (s ModelNotReadyException) String() string
- type ModelStreamErrorException
- func (s *ModelStreamErrorException) Code() string
- func (s *ModelStreamErrorException) Error() string
- func (s ModelStreamErrorException) GoString() string
- func (s *ModelStreamErrorException) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error)
- func (s *ModelStreamErrorException) Message() string
- func (s *ModelStreamErrorException) OrigErr() error
- func (s *ModelStreamErrorException) RequestID() string
- func (s *ModelStreamErrorException) StatusCode() int
- func (s ModelStreamErrorException) String() string
- func (s *ModelStreamErrorException) UnmarshalEvent(payloadUnmarshaler protocol.PayloadUnmarshaler, msg eventstream.Message) error
- type ModelTimeoutException
- func (s *ModelTimeoutException) Code() string
- func (s *ModelTimeoutException) Error() string
- func (s ModelTimeoutException) GoString() string
- func (s *ModelTimeoutException) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error)
- func (s *ModelTimeoutException) Message() string
- func (s *ModelTimeoutException) OrigErr() error
- func (s *ModelTimeoutException) RequestID() string
- func (s *ModelTimeoutException) StatusCode() int
- func (s ModelTimeoutException) String() string
- func (s *ModelTimeoutException) UnmarshalEvent(payloadUnmarshaler protocol.PayloadUnmarshaler, msg eventstream.Message) error
- type PayloadPart
- func (s PayloadPart) GoString() string
- func (s *PayloadPart) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error)
- func (s *PayloadPart) SetBytes(v []byte) *PayloadPart
- func (s PayloadPart) String() string
- func (s *PayloadPart) UnmarshalEvent(payloadUnmarshaler protocol.PayloadUnmarshaler, msg eventstream.Message) error
- type ResourceNotFoundException
- func (s *ResourceNotFoundException) Code() string
- func (s *ResourceNotFoundException) Error() string
- func (s ResourceNotFoundException) GoString() string
- func (s *ResourceNotFoundException) Message() string
- func (s *ResourceNotFoundException) OrigErr() error
- func (s *ResourceNotFoundException) RequestID() string
- func (s *ResourceNotFoundException) StatusCode() int
- func (s ResourceNotFoundException) String() string
- type ResponseStreamEvent
- type ResponseStreamReader
- type ResponseStreamUnknownEvent
- type ServiceQuotaExceededException
- func (s *ServiceQuotaExceededException) Code() string
- func (s *ServiceQuotaExceededException) Error() string
- func (s ServiceQuotaExceededException) GoString() string
- func (s *ServiceQuotaExceededException) Message() string
- func (s *ServiceQuotaExceededException) OrigErr() error
- func (s *ServiceQuotaExceededException) RequestID() string
- func (s *ServiceQuotaExceededException) StatusCode() int
- func (s ServiceQuotaExceededException) String() string
- type ServiceUnavailableException
- func (s *ServiceUnavailableException) Code() string
- func (s *ServiceUnavailableException) Error() string
- func (s ServiceUnavailableException) GoString() string
- func (s *ServiceUnavailableException) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error)
- func (s *ServiceUnavailableException) Message() string
- func (s *ServiceUnavailableException) OrigErr() error
- func (s *ServiceUnavailableException) RequestID() string
- func (s *ServiceUnavailableException) StatusCode() int
- func (s ServiceUnavailableException) String() string
- func (s *ServiceUnavailableException) UnmarshalEvent(payloadUnmarshaler protocol.PayloadUnmarshaler, msg eventstream.Message) error
- type SpecificToolChoice
- type SystemContentBlock
- func (s SystemContentBlock) GoString() string
- func (s *SystemContentBlock) SetGuardContent(v *GuardrailConverseContentBlock) *SystemContentBlock
- func (s *SystemContentBlock) SetText(v string) *SystemContentBlock
- func (s SystemContentBlock) String() string
- func (s *SystemContentBlock) Validate() error
- type ThrottlingException
- func (s *ThrottlingException) Code() string
- func (s *ThrottlingException) Error() string
- func (s ThrottlingException) GoString() string
- func (s *ThrottlingException) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error)
- func (s *ThrottlingException) Message() string
- func (s *ThrottlingException) OrigErr() error
- func (s *ThrottlingException) RequestID() string
- func (s *ThrottlingException) StatusCode() int
- func (s ThrottlingException) String() string
- func (s *ThrottlingException) UnmarshalEvent(payloadUnmarshaler protocol.PayloadUnmarshaler, msg eventstream.Message) error
- type TokenUsage
- type Tool
- type ToolChoice
- type ToolConfiguration
- type ToolInputSchema
- type ToolResultBlock
- func (s ToolResultBlock) GoString() string
- func (s *ToolResultBlock) SetContent(v []*ToolResultContentBlock) *ToolResultBlock
- func (s *ToolResultBlock) SetStatus(v string) *ToolResultBlock
- func (s *ToolResultBlock) SetToolUseId(v string) *ToolResultBlock
- func (s ToolResultBlock) String() string
- func (s *ToolResultBlock) Validate() error
- type ToolResultContentBlock
- func (s ToolResultContentBlock) GoString() string
- func (s *ToolResultContentBlock) SetDocument(v *DocumentBlock) *ToolResultContentBlock
- func (s *ToolResultContentBlock) SetImage(v *ImageBlock) *ToolResultContentBlock
- func (s *ToolResultContentBlock) SetText(v string) *ToolResultContentBlock
- func (s ToolResultContentBlock) String() string
- func (s *ToolResultContentBlock) Validate() error
- type ToolSpecification
- func (s ToolSpecification) GoString() string
- func (s *ToolSpecification) SetDescription(v string) *ToolSpecification
- func (s *ToolSpecification) SetInputSchema(v *ToolInputSchema) *ToolSpecification
- func (s *ToolSpecification) SetName(v string) *ToolSpecification
- func (s ToolSpecification) String() string
- func (s *ToolSpecification) Validate() error
- type ToolUseBlockDelta
- type ToolUseBlockStart
- type ValidationException
- func (s *ValidationException) Code() string
- func (s *ValidationException) Error() string
- func (s ValidationException) GoString() string
- func (s *ValidationException) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error)
- func (s *ValidationException) Message() string
- func (s *ValidationException) OrigErr() error
- func (s *ValidationException) RequestID() string
- func (s *ValidationException) StatusCode() int
- func (s ValidationException) String() string
- func (s *ValidationException) UnmarshalEvent(payloadUnmarshaler protocol.PayloadUnmarshaler, msg eventstream.Message) error
Constants ¶
const ( // ConversationRoleUser is a ConversationRole enum value ConversationRoleUser = "user" // ConversationRoleAssistant is a ConversationRole enum value ConversationRoleAssistant = "assistant" )
const ( // DocumentFormatPdf is a DocumentFormat enum value DocumentFormatPdf = "pdf" // DocumentFormatCsv is a DocumentFormat enum value DocumentFormatCsv = "csv" // DocumentFormatDoc is a DocumentFormat enum value DocumentFormatDoc = "doc" // DocumentFormatDocx is a DocumentFormat enum value DocumentFormatDocx = "docx" // DocumentFormatXls is a DocumentFormat enum value DocumentFormatXls = "xls" // DocumentFormatXlsx is a DocumentFormat enum value DocumentFormatXlsx = "xlsx" // DocumentFormatHtml is a DocumentFormat enum value DocumentFormatHtml = "html" // DocumentFormatTxt is a DocumentFormat enum value DocumentFormatTxt = "txt" // DocumentFormatMd is a DocumentFormat enum value DocumentFormatMd = "md" )
const ( // GuardrailActionNone is a GuardrailAction enum value GuardrailActionNone = "NONE" // GuardrailActionGuardrailIntervened is a GuardrailAction enum value GuardrailActionGuardrailIntervened = "GUARDRAIL_INTERVENED" )
const ( // GuardrailContentFilterConfidenceNone is a GuardrailContentFilterConfidence enum value GuardrailContentFilterConfidenceNone = "NONE" // GuardrailContentFilterConfidenceLow is a GuardrailContentFilterConfidence enum value GuardrailContentFilterConfidenceLow = "LOW" // GuardrailContentFilterConfidenceMedium is a GuardrailContentFilterConfidence enum value GuardrailContentFilterConfidenceMedium = "MEDIUM" // GuardrailContentFilterConfidenceHigh is a GuardrailContentFilterConfidence enum value GuardrailContentFilterConfidenceHigh = "HIGH" )
const ( // GuardrailContentFilterTypeInsults is a GuardrailContentFilterType enum value GuardrailContentFilterTypeInsults = "INSULTS" // GuardrailContentFilterTypeHate is a GuardrailContentFilterType enum value GuardrailContentFilterTypeHate = "HATE" // GuardrailContentFilterTypeSexual is a GuardrailContentFilterType enum value GuardrailContentFilterTypeSexual = "SEXUAL" // GuardrailContentFilterTypeViolence is a GuardrailContentFilterType enum value GuardrailContentFilterTypeViolence = "VIOLENCE" // GuardrailContentFilterTypeMisconduct is a GuardrailContentFilterType enum value GuardrailContentFilterTypeMisconduct = "MISCONDUCT" // GuardrailContentFilterTypePromptAttack is a GuardrailContentFilterType enum value GuardrailContentFilterTypePromptAttack = "PROMPT_ATTACK" )
const ( // GuardrailContentQualifierGroundingSource is a GuardrailContentQualifier enum value GuardrailContentQualifierGroundingSource = "grounding_source" // GuardrailContentQualifierQuery is a GuardrailContentQualifier enum value GuardrailContentQualifierQuery = "query" // GuardrailContentQualifierGuardContent is a GuardrailContentQualifier enum value GuardrailContentQualifierGuardContent = "guard_content" )
const ( // GuardrailContentSourceInput is a GuardrailContentSource enum value GuardrailContentSourceInput = "INPUT" // GuardrailContentSourceOutput is a GuardrailContentSource enum value GuardrailContentSourceOutput = "OUTPUT" )
const ( // GuardrailContextualGroundingFilterTypeGrounding is a GuardrailContextualGroundingFilterType enum value GuardrailContextualGroundingFilterTypeGrounding = "GROUNDING" // GuardrailContextualGroundingFilterTypeRelevance is a GuardrailContextualGroundingFilterType enum value GuardrailContextualGroundingFilterTypeRelevance = "RELEVANCE" )
const ( // GuardrailContextualGroundingPolicyActionBlocked is a GuardrailContextualGroundingPolicyAction enum value GuardrailContextualGroundingPolicyActionBlocked = "BLOCKED" // GuardrailContextualGroundingPolicyActionNone is a GuardrailContextualGroundingPolicyAction enum value GuardrailContextualGroundingPolicyActionNone = "NONE" )
const ( // GuardrailConverseContentQualifierGroundingSource is a GuardrailConverseContentQualifier enum value GuardrailConverseContentQualifierGroundingSource = "grounding_source" // GuardrailConverseContentQualifierQuery is a GuardrailConverseContentQualifier enum value GuardrailConverseContentQualifierQuery = "query" // GuardrailConverseContentQualifierGuardContent is a GuardrailConverseContentQualifier enum value GuardrailConverseContentQualifierGuardContent = "guard_content" )
const ( // GuardrailPiiEntityTypeAddress is a GuardrailPiiEntityType enum value GuardrailPiiEntityTypeAddress = "ADDRESS" // GuardrailPiiEntityTypeAge is a GuardrailPiiEntityType enum value GuardrailPiiEntityTypeAge = "AGE" // GuardrailPiiEntityTypeAwsAccessKey is a GuardrailPiiEntityType enum value GuardrailPiiEntityTypeAwsAccessKey = "AWS_ACCESS_KEY" // GuardrailPiiEntityTypeAwsSecretKey is a GuardrailPiiEntityType enum value GuardrailPiiEntityTypeAwsSecretKey = "AWS_SECRET_KEY" // GuardrailPiiEntityTypeCaHealthNumber is a GuardrailPiiEntityType enum value GuardrailPiiEntityTypeCaHealthNumber = "CA_HEALTH_NUMBER" // GuardrailPiiEntityTypeCaSocialInsuranceNumber is a GuardrailPiiEntityType enum value GuardrailPiiEntityTypeCaSocialInsuranceNumber = "CA_SOCIAL_INSURANCE_NUMBER" // GuardrailPiiEntityTypeCreditDebitCardCvv is a GuardrailPiiEntityType enum value GuardrailPiiEntityTypeCreditDebitCardCvv = "CREDIT_DEBIT_CARD_CVV" // GuardrailPiiEntityTypeCreditDebitCardExpiry is a GuardrailPiiEntityType enum value GuardrailPiiEntityTypeCreditDebitCardExpiry = "CREDIT_DEBIT_CARD_EXPIRY" // GuardrailPiiEntityTypeCreditDebitCardNumber is a GuardrailPiiEntityType enum value GuardrailPiiEntityTypeCreditDebitCardNumber = "CREDIT_DEBIT_CARD_NUMBER" // GuardrailPiiEntityTypeDriverId is a GuardrailPiiEntityType enum value GuardrailPiiEntityTypeDriverId = "DRIVER_ID" // GuardrailPiiEntityTypeEmail is a GuardrailPiiEntityType enum value GuardrailPiiEntityTypeEmail = "EMAIL" // GuardrailPiiEntityTypeInternationalBankAccountNumber is a GuardrailPiiEntityType enum value GuardrailPiiEntityTypeInternationalBankAccountNumber = "INTERNATIONAL_BANK_ACCOUNT_NUMBER" // GuardrailPiiEntityTypeIpAddress is a GuardrailPiiEntityType enum value GuardrailPiiEntityTypeIpAddress = "IP_ADDRESS" // GuardrailPiiEntityTypeLicensePlate is a GuardrailPiiEntityType enum value GuardrailPiiEntityTypeLicensePlate = "LICENSE_PLATE" // GuardrailPiiEntityTypeMacAddress is a GuardrailPiiEntityType enum value GuardrailPiiEntityTypeMacAddress = "MAC_ADDRESS" // GuardrailPiiEntityTypeName is a GuardrailPiiEntityType enum value GuardrailPiiEntityTypeName = "NAME" // GuardrailPiiEntityTypePassword is a GuardrailPiiEntityType enum value GuardrailPiiEntityTypePassword = "PASSWORD" // GuardrailPiiEntityTypePhone is a GuardrailPiiEntityType enum value GuardrailPiiEntityTypePhone = "PHONE" // GuardrailPiiEntityTypePin is a GuardrailPiiEntityType enum value GuardrailPiiEntityTypePin = "PIN" // GuardrailPiiEntityTypeSwiftCode is a GuardrailPiiEntityType enum value GuardrailPiiEntityTypeSwiftCode = "SWIFT_CODE" // GuardrailPiiEntityTypeUkNationalHealthServiceNumber is a GuardrailPiiEntityType enum value GuardrailPiiEntityTypeUkNationalHealthServiceNumber = "UK_NATIONAL_HEALTH_SERVICE_NUMBER" // GuardrailPiiEntityTypeUkNationalInsuranceNumber is a GuardrailPiiEntityType enum value GuardrailPiiEntityTypeUkNationalInsuranceNumber = "UK_NATIONAL_INSURANCE_NUMBER" // GuardrailPiiEntityTypeUkUniqueTaxpayerReferenceNumber is a GuardrailPiiEntityType enum value GuardrailPiiEntityTypeUkUniqueTaxpayerReferenceNumber = "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER" // GuardrailPiiEntityTypeUrl is a GuardrailPiiEntityType enum value GuardrailPiiEntityTypeUrl = "URL" // GuardrailPiiEntityTypeUsername is a GuardrailPiiEntityType enum value GuardrailPiiEntityTypeUsername = "USERNAME" // GuardrailPiiEntityTypeUsBankAccountNumber is a GuardrailPiiEntityType enum value GuardrailPiiEntityTypeUsBankAccountNumber = "US_BANK_ACCOUNT_NUMBER" // GuardrailPiiEntityTypeUsBankRoutingNumber is a GuardrailPiiEntityType enum value GuardrailPiiEntityTypeUsBankRoutingNumber = "US_BANK_ROUTING_NUMBER" // GuardrailPiiEntityTypeUsIndividualTaxIdentificationNumber is a GuardrailPiiEntityType enum value GuardrailPiiEntityTypeUsIndividualTaxIdentificationNumber = "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER" // GuardrailPiiEntityTypeUsPassportNumber is a GuardrailPiiEntityType enum value GuardrailPiiEntityTypeUsPassportNumber = "US_PASSPORT_NUMBER" // GuardrailPiiEntityTypeUsSocialSecurityNumber is a GuardrailPiiEntityType enum value GuardrailPiiEntityTypeUsSocialSecurityNumber = "US_SOCIAL_SECURITY_NUMBER" // GuardrailPiiEntityTypeVehicleIdentificationNumber is a GuardrailPiiEntityType enum value GuardrailPiiEntityTypeVehicleIdentificationNumber = "VEHICLE_IDENTIFICATION_NUMBER" )
const ( // GuardrailSensitiveInformationPolicyActionAnonymized is a GuardrailSensitiveInformationPolicyAction enum value GuardrailSensitiveInformationPolicyActionAnonymized = "ANONYMIZED" // GuardrailSensitiveInformationPolicyActionBlocked is a GuardrailSensitiveInformationPolicyAction enum value GuardrailSensitiveInformationPolicyActionBlocked = "BLOCKED" )
const ( // GuardrailStreamProcessingModeSync is a GuardrailStreamProcessingMode enum value GuardrailStreamProcessingModeSync = "sync" // GuardrailStreamProcessingModeAsync is a GuardrailStreamProcessingMode enum value GuardrailStreamProcessingModeAsync = "async" )
const ( // GuardrailTraceEnabled is a GuardrailTrace enum value GuardrailTraceEnabled = "enabled" // GuardrailTraceDisabled is a GuardrailTrace enum value GuardrailTraceDisabled = "disabled" )
const ( // ImageFormatPng is a ImageFormat enum value ImageFormatPng = "png" // ImageFormatJpeg is a ImageFormat enum value ImageFormatJpeg = "jpeg" // ImageFormatGif is a ImageFormat enum value ImageFormatGif = "gif" // ImageFormatWebp is a ImageFormat enum value ImageFormatWebp = "webp" )
const ( // StopReasonEndTurn is a StopReason enum value StopReasonEndTurn = "end_turn" // StopReasonToolUse is a StopReason enum value StopReasonToolUse = "tool_use" // StopReasonMaxTokens is a StopReason enum value StopReasonMaxTokens = "max_tokens" // StopReasonStopSequence is a StopReason enum value StopReasonStopSequence = "stop_sequence" // StopReasonGuardrailIntervened is a StopReason enum value StopReasonGuardrailIntervened = "guardrail_intervened" // StopReasonContentFiltered is a StopReason enum value StopReasonContentFiltered = "content_filtered" )
const ( // ToolResultStatusSuccess is a ToolResultStatus enum value ToolResultStatusSuccess = "success" // ToolResultStatusError is a ToolResultStatus enum value ToolResultStatusError = "error" )
const ( // TraceEnabled is a Trace enum value TraceEnabled = "ENABLED" // TraceDisabled is a Trace enum value TraceDisabled = "DISABLED" )
const ( // ErrCodeAccessDeniedException for service response error code // "AccessDeniedException". // // The request is denied because of missing access permissions. ErrCodeAccessDeniedException = "AccessDeniedException" // ErrCodeInternalServerException for service response error code // "InternalServerException". // // An internal server error occurred. Retry your request. ErrCodeInternalServerException = "InternalServerException" // ErrCodeModelErrorException for service response error code // "ModelErrorException". // // The request failed due to an error while processing the model. ErrCodeModelErrorException = "ModelErrorException" // ErrCodeModelNotReadyException for service response error code // "ModelNotReadyException". // // The model specified in the request is not ready to serve inference requests. ErrCodeModelNotReadyException = "ModelNotReadyException" // ErrCodeModelStreamErrorException for service response error code // "ModelStreamErrorException". // // An error occurred while streaming the response. Retry your request. ErrCodeModelStreamErrorException = "ModelStreamErrorException" // ErrCodeModelTimeoutException for service response error code // "ModelTimeoutException". // // The request took too long to process. Processing time exceeded the model // timeout length. ErrCodeModelTimeoutException = "ModelTimeoutException" // ErrCodeResourceNotFoundException for service response error code // "ResourceNotFoundException". // // The specified resource ARN was not found. Check the ARN and try your request // again. ErrCodeResourceNotFoundException = "ResourceNotFoundException" // ErrCodeServiceQuotaExceededException for service response error code // "ServiceQuotaExceededException". // // Your request exceeds the service quota for your account. You can view your // quotas at Viewing service quotas (https://docs.aws.amazon.com/servicequotas/latest/userguide/gs-request-quota.html). // You can resubmit your request later. ErrCodeServiceQuotaExceededException = "ServiceQuotaExceededException" // "ServiceUnavailableException". // // The service isn't currently available. Try again later. ErrCodeServiceUnavailableException = "ServiceUnavailableException" // ErrCodeThrottlingException for service response error code // "ThrottlingException". // // Your request was throttled because of service-wide limitations. Resubmit // your request later or in a different region. You can also purchase Provisioned // Throughput (https://docs.aws.amazon.com/bedrock/latest/userguide/prov-throughput.html) // to increase the rate or number of tokens you can process. ErrCodeThrottlingException = "ThrottlingException" // ErrCodeValidationException for service response error code // "ValidationException". // // Input validation failed. Check your request parameters and retry the request. ErrCodeValidationException = "ValidationException" )
const ( ServiceName = "Bedrock Runtime" // Name of service. EndpointsID = "bedrock-runtime" // ID to lookup a service endpoint with. ServiceID = "Bedrock Runtime" // ServiceID is a unique identifier of a specific service. )
Service information constants
const (
// GuardrailContentPolicyActionBlocked is a GuardrailContentPolicyAction enum value
GuardrailContentPolicyActionBlocked = "BLOCKED"
)
const (
// GuardrailManagedWordTypeProfanity is a GuardrailManagedWordType enum value
GuardrailManagedWordTypeProfanity = "PROFANITY"
)
const (
// GuardrailTopicPolicyActionBlocked is a GuardrailTopicPolicyAction enum value
GuardrailTopicPolicyActionBlocked = "BLOCKED"
)
const (
// GuardrailTopicTypeDeny is a GuardrailTopicType enum value
GuardrailTopicTypeDeny = "DENY"
)
const (
// GuardrailWordPolicyActionBlocked is a GuardrailWordPolicyAction enum value
GuardrailWordPolicyActionBlocked = "BLOCKED"
)
Variables ¶
This section is empty.
Functions ¶
func ConversationRole_Values ¶ added in v1.53.13
func ConversationRole_Values() []string
ConversationRole_Values returns all elements of the ConversationRole enum
func DocumentFormat_Values ¶ added in v1.54.6
func DocumentFormat_Values() []string
DocumentFormat_Values returns all elements of the DocumentFormat enum
func GuardrailAction_Values ¶ added in v1.54.18
func GuardrailAction_Values() []string
GuardrailAction_Values returns all elements of the GuardrailAction enum
func GuardrailContentFilterConfidence_Values ¶ added in v1.54.4
func GuardrailContentFilterConfidence_Values() []string
GuardrailContentFilterConfidence_Values returns all elements of the GuardrailContentFilterConfidence enum
func GuardrailContentFilterType_Values ¶ added in v1.54.4
func GuardrailContentFilterType_Values() []string
GuardrailContentFilterType_Values returns all elements of the GuardrailContentFilterType enum
func GuardrailContentPolicyAction_Values ¶ added in v1.54.4
func GuardrailContentPolicyAction_Values() []string
GuardrailContentPolicyAction_Values returns all elements of the GuardrailContentPolicyAction enum
func GuardrailContentQualifier_Values ¶ added in v1.54.18
func GuardrailContentQualifier_Values() []string
GuardrailContentQualifier_Values returns all elements of the GuardrailContentQualifier enum
func GuardrailContentSource_Values ¶ added in v1.54.18
func GuardrailContentSource_Values() []string
GuardrailContentSource_Values returns all elements of the GuardrailContentSource enum
func GuardrailContextualGroundingFilterType_Values ¶ added in v1.54.18
func GuardrailContextualGroundingFilterType_Values() []string
GuardrailContextualGroundingFilterType_Values returns all elements of the GuardrailContextualGroundingFilterType enum
func GuardrailContextualGroundingPolicyAction_Values ¶ added in v1.54.18
func GuardrailContextualGroundingPolicyAction_Values() []string
GuardrailContextualGroundingPolicyAction_Values returns all elements of the GuardrailContextualGroundingPolicyAction enum
func GuardrailConverseContentQualifier_Values ¶ added in v1.54.18
func GuardrailConverseContentQualifier_Values() []string
GuardrailConverseContentQualifier_Values returns all elements of the GuardrailConverseContentQualifier enum
func GuardrailManagedWordType_Values ¶ added in v1.54.4
func GuardrailManagedWordType_Values() []string
GuardrailManagedWordType_Values returns all elements of the GuardrailManagedWordType enum
func GuardrailPiiEntityType_Values ¶ added in v1.54.4
func GuardrailPiiEntityType_Values() []string
GuardrailPiiEntityType_Values returns all elements of the GuardrailPiiEntityType enum
func GuardrailSensitiveInformationPolicyAction_Values ¶ added in v1.54.4
func GuardrailSensitiveInformationPolicyAction_Values() []string
GuardrailSensitiveInformationPolicyAction_Values returns all elements of the GuardrailSensitiveInformationPolicyAction enum
func GuardrailStreamProcessingMode_Values ¶ added in v1.54.4
func GuardrailStreamProcessingMode_Values() []string
GuardrailStreamProcessingMode_Values returns all elements of the GuardrailStreamProcessingMode enum
func GuardrailTopicPolicyAction_Values ¶ added in v1.54.4
func GuardrailTopicPolicyAction_Values() []string
GuardrailTopicPolicyAction_Values returns all elements of the GuardrailTopicPolicyAction enum
func GuardrailTopicType_Values ¶ added in v1.54.4
func GuardrailTopicType_Values() []string
GuardrailTopicType_Values returns all elements of the GuardrailTopicType enum
func GuardrailTrace_Values ¶ added in v1.54.4
func GuardrailTrace_Values() []string
GuardrailTrace_Values returns all elements of the GuardrailTrace enum
func GuardrailWordPolicyAction_Values ¶ added in v1.54.4
func GuardrailWordPolicyAction_Values() []string
GuardrailWordPolicyAction_Values returns all elements of the GuardrailWordPolicyAction enum
func ImageFormat_Values ¶ added in v1.53.13
func ImageFormat_Values() []string
ImageFormat_Values returns all elements of the ImageFormat enum
func StopReason_Values ¶ added in v1.53.13
func StopReason_Values() []string
StopReason_Values returns all elements of the StopReason enum
func ToolResultStatus_Values ¶ added in v1.53.13
func ToolResultStatus_Values() []string
ToolResultStatus_Values returns all elements of the ToolResultStatus enum
func Trace_Values ¶ added in v1.51.27
func Trace_Values() []string
Trace_Values returns all elements of the Trace enum
Types ¶
type AccessDeniedException ¶
type AccessDeniedException struct { RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` // contains filtered or unexported fields }
The request is denied because of missing access permissions.
func (*AccessDeniedException) Code ¶
func (s *AccessDeniedException) Code() string
Code returns the exception type name.
func (*AccessDeniedException) Error ¶
func (s *AccessDeniedException) Error() string
func (AccessDeniedException) GoString ¶
func (s AccessDeniedException) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*AccessDeniedException) Message ¶
func (s *AccessDeniedException) Message() string
Message returns the exception's message.
func (*AccessDeniedException) OrigErr ¶
func (s *AccessDeniedException) OrigErr() error
OrigErr always returns nil, satisfies awserr.Error interface.
func (*AccessDeniedException) RequestID ¶
func (s *AccessDeniedException) RequestID() string
RequestID returns the service's response RequestID for request.
func (*AccessDeniedException) StatusCode ¶
func (s *AccessDeniedException) StatusCode() int
Status code returns the HTTP status code for the request's response error.
func (AccessDeniedException) String ¶
func (s AccessDeniedException) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
type AnyToolChoice ¶ added in v1.53.13
type AnyToolChoice struct {
// contains filtered or unexported fields
}
The model must request at least one tool (no text is generated). For example, {"any" : {}}.
func (AnyToolChoice) GoString ¶ added in v1.53.13
func (s AnyToolChoice) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (AnyToolChoice) String ¶ added in v1.53.13
func (s AnyToolChoice) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
type ApplyGuardrailInput ¶ added in v1.54.18
type ApplyGuardrailInput struct { // The content details used in the request to apply the guardrail. // // Content is a required field Content []*GuardrailContentBlock `locationName:"content" type:"list" required:"true"` // The guardrail identifier used in the request to apply the guardrail. // // GuardrailIdentifier is a required field GuardrailIdentifier *string `location:"uri" locationName:"guardrailIdentifier" type:"string" required:"true"` // The guardrail version used in the request to apply the guardrail. // // GuardrailVersion is a required field GuardrailVersion *string `location:"uri" locationName:"guardrailVersion" type:"string" required:"true"` // The source of data used in the request to apply the guardrail. // // Source is a required field Source *string `locationName:"source" type:"string" required:"true" enum:"GuardrailContentSource"` // contains filtered or unexported fields }
func (ApplyGuardrailInput) GoString ¶ added in v1.54.18
func (s ApplyGuardrailInput) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ApplyGuardrailInput) SetContent ¶ added in v1.54.18
func (s *ApplyGuardrailInput) SetContent(v []*GuardrailContentBlock) *ApplyGuardrailInput
SetContent sets the Content field's value.
func (*ApplyGuardrailInput) SetGuardrailIdentifier ¶ added in v1.54.18
func (s *ApplyGuardrailInput) SetGuardrailIdentifier(v string) *ApplyGuardrailInput
SetGuardrailIdentifier sets the GuardrailIdentifier field's value.
func (*ApplyGuardrailInput) SetGuardrailVersion ¶ added in v1.54.18
func (s *ApplyGuardrailInput) SetGuardrailVersion(v string) *ApplyGuardrailInput
SetGuardrailVersion sets the GuardrailVersion field's value.
func (*ApplyGuardrailInput) SetSource ¶ added in v1.54.18
func (s *ApplyGuardrailInput) SetSource(v string) *ApplyGuardrailInput
SetSource sets the Source field's value.
func (ApplyGuardrailInput) String ¶ added in v1.54.18
func (s ApplyGuardrailInput) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ApplyGuardrailInput) Validate ¶ added in v1.54.18
func (s *ApplyGuardrailInput) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type ApplyGuardrailOutput ¶ added in v1.54.18
type ApplyGuardrailOutput struct { // The action taken in the response from the guardrail. // // Action is a required field Action *string `locationName:"action" type:"string" required:"true" enum:"GuardrailAction"` // The assessment details in the response from the guardrail. // // Assessments is a required field Assessments []*GuardrailAssessment `locationName:"assessments" type:"list" required:"true"` // The output details in the response from the guardrail. // // Outputs is a required field Outputs []*GuardrailOutputContent `locationName:"outputs" type:"list" required:"true"` // The usage details in the response from the guardrail. // // Usage is a required field Usage *GuardrailUsage `locationName:"usage" type:"structure" required:"true"` // contains filtered or unexported fields }
func (ApplyGuardrailOutput) GoString ¶ added in v1.54.18
func (s ApplyGuardrailOutput) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ApplyGuardrailOutput) SetAction ¶ added in v1.54.18
func (s *ApplyGuardrailOutput) SetAction(v string) *ApplyGuardrailOutput
SetAction sets the Action field's value.
func (*ApplyGuardrailOutput) SetAssessments ¶ added in v1.54.18
func (s *ApplyGuardrailOutput) SetAssessments(v []*GuardrailAssessment) *ApplyGuardrailOutput
SetAssessments sets the Assessments field's value.
func (*ApplyGuardrailOutput) SetOutputs ¶ added in v1.54.18
func (s *ApplyGuardrailOutput) SetOutputs(v []*GuardrailOutputContent) *ApplyGuardrailOutput
SetOutputs sets the Outputs field's value.
func (*ApplyGuardrailOutput) SetUsage ¶ added in v1.54.18
func (s *ApplyGuardrailOutput) SetUsage(v *GuardrailUsage) *ApplyGuardrailOutput
SetUsage sets the Usage field's value.
func (ApplyGuardrailOutput) String ¶ added in v1.54.18
func (s ApplyGuardrailOutput) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
type AutoToolChoice ¶ added in v1.53.13
type AutoToolChoice struct {
// contains filtered or unexported fields
}
The Model automatically decides if a tool should be called or whether to generate text instead. For example, {"auto" : {}}.
func (AutoToolChoice) GoString ¶ added in v1.53.13
func (s AutoToolChoice) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (AutoToolChoice) String ¶ added in v1.53.13
func (s AutoToolChoice) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
type BedrockRuntime ¶
BedrockRuntime provides the API operation methods for making requests to Amazon Bedrock Runtime. See this package's package overview docs for details on the service.
BedrockRuntime methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.
func New ¶
func New(p client.ConfigProvider, cfgs ...*aws.Config) *BedrockRuntime
New creates a new instance of the BedrockRuntime client with a session. If additional configuration is needed for the client instance use the optional aws.Config parameter to add your extra config.
Example:
mySession := session.Must(session.NewSession()) // Create a BedrockRuntime client from just a session. svc := bedrockruntime.New(mySession) // Create a BedrockRuntime client with additional configuration svc := bedrockruntime.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func (*BedrockRuntime) ApplyGuardrail ¶ added in v1.54.18
func (c *BedrockRuntime) ApplyGuardrail(input *ApplyGuardrailInput) (*ApplyGuardrailOutput, error)
ApplyGuardrail API operation for Amazon Bedrock Runtime.
The action to apply a guardrail.
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Bedrock Runtime's API operation ApplyGuardrail for usage and error information.
Returned Error Types:
AccessDeniedException The request is denied because of missing access permissions.
ResourceNotFoundException The specified resource ARN was not found. Check the ARN and try your request again.
ThrottlingException Your request was throttled because of service-wide limitations. Resubmit your request later or in a different region. You can also purchase Provisioned Throughput (https://docs.aws.amazon.com/bedrock/latest/userguide/prov-throughput.html) to increase the rate or number of tokens you can process.
InternalServerException An internal server error occurred. Retry your request.
ValidationException Input validation failed. Check your request parameters and retry the request.
ServiceQuotaExceededException Your request exceeds the service quota for your account. You can view your quotas at Viewing service quotas (https://docs.aws.amazon.com/servicequotas/latest/userguide/gs-request-quota.html). You can resubmit your request later.
See also, https://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ApplyGuardrail
func (*BedrockRuntime) ApplyGuardrailRequest ¶ added in v1.54.18
func (c *BedrockRuntime) ApplyGuardrailRequest(input *ApplyGuardrailInput) (req *request.Request, output *ApplyGuardrailOutput)
ApplyGuardrailRequest generates a "aws/request.Request" representing the client's request for the ApplyGuardrail operation. The "output" return value will be populated with the request's response once the request completes successfully.
Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.
See ApplyGuardrail for more information on using the ApplyGuardrail API call, and error handling.
This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.
// Example sending a request using the ApplyGuardrailRequest method. req, resp := client.ApplyGuardrailRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }
See also, https://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ApplyGuardrail
func (*BedrockRuntime) ApplyGuardrailWithContext ¶ added in v1.54.18
func (c *BedrockRuntime) ApplyGuardrailWithContext(ctx aws.Context, input *ApplyGuardrailInput, opts ...request.Option) (*ApplyGuardrailOutput, error)
ApplyGuardrailWithContext is the same as ApplyGuardrail with the addition of the ability to pass a context and additional request options.
See ApplyGuardrail for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.
func (*BedrockRuntime) Converse ¶ added in v1.53.13
func (c *BedrockRuntime) Converse(input *ConverseInput) (*ConverseOutput, error)
Converse API operation for Amazon Bedrock Runtime.
Sends messages to the specified Amazon Bedrock model. Converse provides a consistent interface that works with all models that support messages. This allows you to write code once and use it with different models. If a model has unique inference parameters, you can also pass those unique parameters to the model.
Amazon Bedrock doesn't store any text, images, or documents that you provide as content. The data is only used to generate the response.
For information about the Converse API, see Use the Converse API in the Amazon Bedrock User Guide. To use a guardrail, see Use a guardrail with the Converse API in the Amazon Bedrock User Guide. To use a tool with a model, see Tool use (Function calling) in the Amazon Bedrock User Guide
For example code, see Converse API examples in the Amazon Bedrock User Guide.
This operation requires permission for the bedrock:InvokeModel action.
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Bedrock Runtime's API operation Converse for usage and error information.
Returned Error Types:
AccessDeniedException The request is denied because of missing access permissions.
ResourceNotFoundException The specified resource ARN was not found. Check the ARN and try your request again.
ThrottlingException Your request was throttled because of service-wide limitations. Resubmit your request later or in a different region. You can also purchase Provisioned Throughput (https://docs.aws.amazon.com/bedrock/latest/userguide/prov-throughput.html) to increase the rate or number of tokens you can process.
ModelTimeoutException The request took too long to process. Processing time exceeded the model timeout length.
InternalServerException An internal server error occurred. Retry your request.
ServiceUnavailableException The service isn't currently available. Try again later.
ValidationException Input validation failed. Check your request parameters and retry the request.
ModelNotReadyException The model specified in the request is not ready to serve inference requests.
ModelErrorException The request failed due to an error while processing the model.
See also, https://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/Converse
func (*BedrockRuntime) ConverseRequest ¶ added in v1.53.13
func (c *BedrockRuntime) ConverseRequest(input *ConverseInput) (req *request.Request, output *ConverseOutput)
ConverseRequest generates a "aws/request.Request" representing the client's request for the Converse operation. The "output" return value will be populated with the request's response once the request completes successfully.
Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.
See Converse for more information on using the Converse API call, and error handling.
This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.
// Example sending a request using the ConverseRequest method. req, resp := client.ConverseRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }
See also, https://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/Converse
func (*BedrockRuntime) ConverseStream ¶ added in v1.53.13
func (c *BedrockRuntime) ConverseStream(input *ConverseStreamInput) (*ConverseStreamOutput, error)
ConverseStream API operation for Amazon Bedrock Runtime.
Sends messages to the specified Amazon Bedrock model and returns the response in a stream. ConverseStream provides a consistent API that works with all Amazon Bedrock models that support messages. This allows you to write code once and use it with different models. Should a model have unique inference parameters, you can also pass those unique parameters to the model.
To find out if a model supports streaming, call GetFoundationModel (https://docs.aws.amazon.com/bedrock/latest/APIReference/API_GetFoundationModel.html) and check the responseStreamingSupported field in the response.
The CLI doesn't support streaming operations in Amazon Bedrock, including ConverseStream.
Amazon Bedrock doesn't store any text, images, or documents that you provide as content. The data is only used to generate the response.
For information about the Converse API, see Use the Converse API in the Amazon Bedrock User Guide. To use a guardrail, see Use a guardrail with the Converse API in the Amazon Bedrock User Guide. To use a tool with a model, see Tool use (Function calling) in the Amazon Bedrock User Guide
For example code, see Conversation streaming example in the Amazon Bedrock User Guide.
This operation requires permission for the bedrock:InvokeModelWithResponseStream action.
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Bedrock Runtime's API operation ConverseStream for usage and error information.
Returned Error Types:
AccessDeniedException The request is denied because of missing access permissions.
ResourceNotFoundException The specified resource ARN was not found. Check the ARN and try your request again.
ThrottlingException Your request was throttled because of service-wide limitations. Resubmit your request later or in a different region. You can also purchase Provisioned Throughput (https://docs.aws.amazon.com/bedrock/latest/userguide/prov-throughput.html) to increase the rate or number of tokens you can process.
ModelTimeoutException The request took too long to process. Processing time exceeded the model timeout length.
InternalServerException An internal server error occurred. Retry your request.
ServiceUnavailableException The service isn't currently available. Try again later.
ValidationException Input validation failed. Check your request parameters and retry the request.
ModelNotReadyException The model specified in the request is not ready to serve inference requests.
ModelErrorException The request failed due to an error while processing the model.
See also, https://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ConverseStream
func (*BedrockRuntime) ConverseStreamRequest ¶ added in v1.53.13
func (c *BedrockRuntime) ConverseStreamRequest(input *ConverseStreamInput) (req *request.Request, output *ConverseStreamOutput)
ConverseStreamRequest generates a "aws/request.Request" representing the client's request for the ConverseStream operation. The "output" return value will be populated with the request's response once the request completes successfully.
Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.
See ConverseStream for more information on using the ConverseStream API call, and error handling.
This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.
// Example sending a request using the ConverseStreamRequest method. req, resp := client.ConverseStreamRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }
See also, https://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ConverseStream
func (*BedrockRuntime) ConverseStreamWithContext ¶ added in v1.53.13
func (c *BedrockRuntime) ConverseStreamWithContext(ctx aws.Context, input *ConverseStreamInput, opts ...request.Option) (*ConverseStreamOutput, error)
ConverseStreamWithContext is the same as ConverseStream with the addition of the ability to pass a context and additional request options.
See ConverseStream for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.
func (*BedrockRuntime) ConverseWithContext ¶ added in v1.53.13
func (c *BedrockRuntime) ConverseWithContext(ctx aws.Context, input *ConverseInput, opts ...request.Option) (*ConverseOutput, error)
ConverseWithContext is the same as Converse with the addition of the ability to pass a context and additional request options.
See Converse for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.
func (*BedrockRuntime) InvokeModel ¶
func (c *BedrockRuntime) InvokeModel(input *InvokeModelInput) (*InvokeModelOutput, error)
InvokeModel API operation for Amazon Bedrock Runtime.
Invokes the specified Amazon Bedrock model to run inference using the prompt and inference parameters provided in the request body. You use model inference to generate text, images, and embeddings.
For example code, see Invoke model code examples in the Amazon Bedrock User Guide.
This operation requires permission for the bedrock:InvokeModel action.
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Bedrock Runtime's API operation InvokeModel for usage and error information.
Returned Error Types:
AccessDeniedException The request is denied because of missing access permissions.
ResourceNotFoundException The specified resource ARN was not found. Check the ARN and try your request again.
ThrottlingException Your request was throttled because of service-wide limitations. Resubmit your request later or in a different region. You can also purchase Provisioned Throughput (https://docs.aws.amazon.com/bedrock/latest/userguide/prov-throughput.html) to increase the rate or number of tokens you can process.
ModelTimeoutException The request took too long to process. Processing time exceeded the model timeout length.
InternalServerException An internal server error occurred. Retry your request.
ServiceUnavailableException The service isn't currently available. Try again later.
ValidationException Input validation failed. Check your request parameters and retry the request.
ModelNotReadyException The model specified in the request is not ready to serve inference requests.
ServiceQuotaExceededException Your request exceeds the service quota for your account. You can view your quotas at Viewing service quotas (https://docs.aws.amazon.com/servicequotas/latest/userguide/gs-request-quota.html). You can resubmit your request later.
ModelErrorException The request failed due to an error while processing the model.
See also, https://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/InvokeModel
func (*BedrockRuntime) InvokeModelRequest ¶
func (c *BedrockRuntime) InvokeModelRequest(input *InvokeModelInput) (req *request.Request, output *InvokeModelOutput)
InvokeModelRequest generates a "aws/request.Request" representing the client's request for the InvokeModel operation. The "output" return value will be populated with the request's response once the request completes successfully.
Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.
See InvokeModel for more information on using the InvokeModel API call, and error handling.
This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.
// Example sending a request using the InvokeModelRequest method. req, resp := client.InvokeModelRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }
See also, https://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/InvokeModel
func (*BedrockRuntime) InvokeModelWithContext ¶
func (c *BedrockRuntime) InvokeModelWithContext(ctx aws.Context, input *InvokeModelInput, opts ...request.Option) (*InvokeModelOutput, error)
InvokeModelWithContext is the same as InvokeModel with the addition of the ability to pass a context and additional request options.
See InvokeModel for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.
func (*BedrockRuntime) InvokeModelWithResponseStream ¶
func (c *BedrockRuntime) InvokeModelWithResponseStream(input *InvokeModelWithResponseStreamInput) (*InvokeModelWithResponseStreamOutput, error)
InvokeModelWithResponseStream API operation for Amazon Bedrock Runtime.
Invoke the specified Amazon Bedrock model to run inference using the prompt and inference parameters provided in the request body. The response is returned in a stream.
To see if a model supports streaming, call GetFoundationModel (https://docs.aws.amazon.com/bedrock/latest/APIReference/API_GetFoundationModel.html) and check the responseStreamingSupported field in the response.
The CLI doesn't support streaming operations in Amazon Bedrock, including InvokeModelWithResponseStream.
For example code, see Invoke model with streaming code example in the Amazon Bedrock User Guide.
This operation requires permissions to perform the bedrock:InvokeModelWithResponseStream action.
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Bedrock Runtime's API operation InvokeModelWithResponseStream for usage and error information.
Returned Error Types:
AccessDeniedException The request is denied because of missing access permissions.
ResourceNotFoundException The specified resource ARN was not found. Check the ARN and try your request again.
ThrottlingException Your request was throttled because of service-wide limitations. Resubmit your request later or in a different region. You can also purchase Provisioned Throughput (https://docs.aws.amazon.com/bedrock/latest/userguide/prov-throughput.html) to increase the rate or number of tokens you can process.
ModelTimeoutException The request took too long to process. Processing time exceeded the model timeout length.
InternalServerException An internal server error occurred. Retry your request.
ServiceUnavailableException The service isn't currently available. Try again later.
ModelStreamErrorException An error occurred while streaming the response. Retry your request.
ValidationException Input validation failed. Check your request parameters and retry the request.
ModelNotReadyException The model specified in the request is not ready to serve inference requests.
ServiceQuotaExceededException Your request exceeds the service quota for your account. You can view your quotas at Viewing service quotas (https://docs.aws.amazon.com/servicequotas/latest/userguide/gs-request-quota.html). You can resubmit your request later.
ModelErrorException The request failed due to an error while processing the model.
See also, https://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/InvokeModelWithResponseStream
func (*BedrockRuntime) InvokeModelWithResponseStreamRequest ¶
func (c *BedrockRuntime) InvokeModelWithResponseStreamRequest(input *InvokeModelWithResponseStreamInput) (req *request.Request, output *InvokeModelWithResponseStreamOutput)
InvokeModelWithResponseStreamRequest generates a "aws/request.Request" representing the client's request for the InvokeModelWithResponseStream operation. The "output" return value will be populated with the request's response once the request completes successfully.
Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.
See InvokeModelWithResponseStream for more information on using the InvokeModelWithResponseStream API call, and error handling.
This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.
// Example sending a request using the InvokeModelWithResponseStreamRequest method. req, resp := client.InvokeModelWithResponseStreamRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }
See also, https://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/InvokeModelWithResponseStream
func (*BedrockRuntime) InvokeModelWithResponseStreamWithContext ¶
func (c *BedrockRuntime) InvokeModelWithResponseStreamWithContext(ctx aws.Context, input *InvokeModelWithResponseStreamInput, opts ...request.Option) (*InvokeModelWithResponseStreamOutput, error)
InvokeModelWithResponseStreamWithContext is the same as InvokeModelWithResponseStream with the addition of the ability to pass a context and additional request options.
See InvokeModelWithResponseStream for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.
type ContentBlock ¶ added in v1.53.13
type ContentBlock struct { // A document to include in the message. Document *DocumentBlock `locationName:"document" type:"structure"` // Contains the content to assess with the guardrail. If you don't specify guardContent // in a call to the Converse API, the guardrail (if passed in the Converse API) // assesses the entire message. GuardContent *GuardrailConverseContentBlock `locationName:"guardContent" type:"structure"` // Image to include in the message. // // This field is only supported by Anthropic Claude 3 models. Image *ImageBlock `locationName:"image" type:"structure"` // Text to include in the message. Text *string `locationName:"text" type:"string"` // The result for a tool request that a model makes. ToolResult *ToolResultBlock `locationName:"toolResult" type:"structure"` // contains filtered or unexported fields }
A block of content for a message that you pass to, or receive from, a model with the Converse (https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html) or ConverseStream (https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html) API operations.
func (ContentBlock) GoString ¶ added in v1.53.13
func (s ContentBlock) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ContentBlock) SetDocument ¶ added in v1.54.6
func (s *ContentBlock) SetDocument(v *DocumentBlock) *ContentBlock
SetDocument sets the Document field's value.
func (*ContentBlock) SetGuardContent ¶ added in v1.54.4
func (s *ContentBlock) SetGuardContent(v *GuardrailConverseContentBlock) *ContentBlock
SetGuardContent sets the GuardContent field's value.
func (*ContentBlock) SetImage ¶ added in v1.53.13
func (s *ContentBlock) SetImage(v *ImageBlock) *ContentBlock
SetImage sets the Image field's value.
func (*ContentBlock) SetText ¶ added in v1.53.13
func (s *ContentBlock) SetText(v string) *ContentBlock
SetText sets the Text field's value.
func (*ContentBlock) SetToolResult ¶ added in v1.53.13
func (s *ContentBlock) SetToolResult(v *ToolResultBlock) *ContentBlock
SetToolResult sets the ToolResult field's value.
func (ContentBlock) String ¶ added in v1.53.13
func (s ContentBlock) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ContentBlock) Validate ¶ added in v1.53.13
func (s *ContentBlock) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type ContentBlockDelta ¶ added in v1.53.13
type ContentBlockDelta struct { // The content text. Text *string `locationName:"text" type:"string"` // Information about a tool that the model is requesting to use. ToolUse *ToolUseBlockDelta `locationName:"toolUse" type:"structure"` // contains filtered or unexported fields }
A bock of content in a streaming response.
func (ContentBlockDelta) GoString ¶ added in v1.53.13
func (s ContentBlockDelta) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ContentBlockDelta) SetText ¶ added in v1.53.13
func (s *ContentBlockDelta) SetText(v string) *ContentBlockDelta
SetText sets the Text field's value.
func (*ContentBlockDelta) SetToolUse ¶ added in v1.53.13
func (s *ContentBlockDelta) SetToolUse(v *ToolUseBlockDelta) *ContentBlockDelta
SetToolUse sets the ToolUse field's value.
func (ContentBlockDelta) String ¶ added in v1.53.13
func (s ContentBlockDelta) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
type ContentBlockDeltaEvent ¶ added in v1.53.13
type ContentBlockDeltaEvent struct { // The block index for a content block delta event. // // ContentBlockIndex is a required field ContentBlockIndex *int64 `locationName:"contentBlockIndex" type:"integer" required:"true"` // The delta for a content block delta event. // // Delta is a required field Delta *ContentBlockDelta `locationName:"delta" type:"structure" required:"true"` // contains filtered or unexported fields }
The content block delta event.
func (ContentBlockDeltaEvent) GoString ¶ added in v1.53.13
func (s ContentBlockDeltaEvent) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ContentBlockDeltaEvent) MarshalEvent ¶ added in v1.53.13
func (s *ContentBlockDeltaEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error)
MarshalEvent marshals the type into an stream event value. This method should only used internally within the SDK's EventStream handling.
func (*ContentBlockDeltaEvent) SetContentBlockIndex ¶ added in v1.53.13
func (s *ContentBlockDeltaEvent) SetContentBlockIndex(v int64) *ContentBlockDeltaEvent
SetContentBlockIndex sets the ContentBlockIndex field's value.
func (*ContentBlockDeltaEvent) SetDelta ¶ added in v1.53.13
func (s *ContentBlockDeltaEvent) SetDelta(v *ContentBlockDelta) *ContentBlockDeltaEvent
SetDelta sets the Delta field's value.
func (ContentBlockDeltaEvent) String ¶ added in v1.53.13
func (s ContentBlockDeltaEvent) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ContentBlockDeltaEvent) UnmarshalEvent ¶ added in v1.53.13
func (s *ContentBlockDeltaEvent) UnmarshalEvent( payloadUnmarshaler protocol.PayloadUnmarshaler, msg eventstream.Message, ) error
UnmarshalEvent unmarshals the EventStream Message into the ContentBlockDeltaEvent value. This method is only used internally within the SDK's EventStream handling.
type ContentBlockStart ¶ added in v1.53.13
type ContentBlockStart struct { // Information about a tool that the model is requesting to use. ToolUse *ToolUseBlockStart `locationName:"toolUse" type:"structure"` // contains filtered or unexported fields }
Content block start information.
func (ContentBlockStart) GoString ¶ added in v1.53.13
func (s ContentBlockStart) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ContentBlockStart) SetToolUse ¶ added in v1.53.13
func (s *ContentBlockStart) SetToolUse(v *ToolUseBlockStart) *ContentBlockStart
SetToolUse sets the ToolUse field's value.
func (ContentBlockStart) String ¶ added in v1.53.13
func (s ContentBlockStart) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
type ContentBlockStartEvent ¶ added in v1.53.13
type ContentBlockStartEvent struct { // The index for a content block start event. // // ContentBlockIndex is a required field ContentBlockIndex *int64 `locationName:"contentBlockIndex" type:"integer" required:"true"` // Start information about a content block start event. // // Start is a required field Start *ContentBlockStart `locationName:"start" type:"structure" required:"true"` // contains filtered or unexported fields }
Content block start event.
func (ContentBlockStartEvent) GoString ¶ added in v1.53.13
func (s ContentBlockStartEvent) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ContentBlockStartEvent) MarshalEvent ¶ added in v1.53.13
func (s *ContentBlockStartEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error)
MarshalEvent marshals the type into an stream event value. This method should only used internally within the SDK's EventStream handling.
func (*ContentBlockStartEvent) SetContentBlockIndex ¶ added in v1.53.13
func (s *ContentBlockStartEvent) SetContentBlockIndex(v int64) *ContentBlockStartEvent
SetContentBlockIndex sets the ContentBlockIndex field's value.
func (*ContentBlockStartEvent) SetStart ¶ added in v1.53.13
func (s *ContentBlockStartEvent) SetStart(v *ContentBlockStart) *ContentBlockStartEvent
SetStart sets the Start field's value.
func (ContentBlockStartEvent) String ¶ added in v1.53.13
func (s ContentBlockStartEvent) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ContentBlockStartEvent) UnmarshalEvent ¶ added in v1.53.13
func (s *ContentBlockStartEvent) UnmarshalEvent( payloadUnmarshaler protocol.PayloadUnmarshaler, msg eventstream.Message, ) error
UnmarshalEvent unmarshals the EventStream Message into the ContentBlockStartEvent value. This method is only used internally within the SDK's EventStream handling.
type ContentBlockStopEvent ¶ added in v1.53.13
type ContentBlockStopEvent struct { // The index for a content block. // // ContentBlockIndex is a required field ContentBlockIndex *int64 `locationName:"contentBlockIndex" type:"integer" required:"true"` // contains filtered or unexported fields }
A content block stop event.
func (ContentBlockStopEvent) GoString ¶ added in v1.53.13
func (s ContentBlockStopEvent) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ContentBlockStopEvent) MarshalEvent ¶ added in v1.53.13
func (s *ContentBlockStopEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error)
MarshalEvent marshals the type into an stream event value. This method should only used internally within the SDK's EventStream handling.
func (*ContentBlockStopEvent) SetContentBlockIndex ¶ added in v1.53.13
func (s *ContentBlockStopEvent) SetContentBlockIndex(v int64) *ContentBlockStopEvent
SetContentBlockIndex sets the ContentBlockIndex field's value.
func (ContentBlockStopEvent) String ¶ added in v1.53.13
func (s ContentBlockStopEvent) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ContentBlockStopEvent) UnmarshalEvent ¶ added in v1.53.13
func (s *ContentBlockStopEvent) UnmarshalEvent( payloadUnmarshaler protocol.PayloadUnmarshaler, msg eventstream.Message, ) error
UnmarshalEvent unmarshals the EventStream Message into the ContentBlockStopEvent value. This method is only used internally within the SDK's EventStream handling.
type ConverseInput ¶ added in v1.53.13
type ConverseInput struct { // Additional model parameters field paths to return in the response. Converse // returns the requested fields as a JSON Pointer object in the additionalModelResponseFields // field. The following is example JSON for additionalModelResponseFieldPaths. // // [ "/stop_sequence" ] // // For information about the JSON Pointer syntax, see the Internet Engineering // Task Force (IETF) (https://datatracker.ietf.org/doc/html/rfc6901) documentation. // // Converse rejects an empty JSON Pointer or incorrectly structured JSON Pointer // with a 400 error code. if the JSON Pointer is valid, but the requested field // is not in the model response, it is ignored by Converse. AdditionalModelResponseFieldPaths []*string `locationName:"additionalModelResponseFieldPaths" type:"list"` // Configuration information for a guardrail that you want to use in the request. GuardrailConfig *GuardrailConfiguration `locationName:"guardrailConfig" type:"structure"` // Inference parameters to pass to the model. Converse supports a base set of // inference parameters. If you need to pass additional parameters that the // model supports, use the additionalModelRequestFields request field. InferenceConfig *InferenceConfiguration `locationName:"inferenceConfig" type:"structure"` // The messages that you want to send to the model. // // Messages is a required field Messages []*Message `locationName:"messages" type:"list" required:"true"` // The identifier for the model that you want to call. // // The modelId to provide depends on the type of model that you use: // // * If you use a base model, specify the model ID or its ARN. For a list // of model IDs for base models, see Amazon Bedrock base model IDs (on-demand // throughput) (https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns) // in the Amazon Bedrock User Guide. // // * If you use a provisioned model, specify the ARN of the Provisioned Throughput. // For more information, see Run inference using a Provisioned Throughput // (https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html) // in the Amazon Bedrock User Guide. // // * If you use a custom model, first purchase Provisioned Throughput for // it. Then specify the ARN of the resulting provisioned model. For more // information, see Use a custom model in Amazon Bedrock (https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html) // in the Amazon Bedrock User Guide. // // ModelId is a required field ModelId *string `location:"uri" locationName:"modelId" min:"1" type:"string" required:"true"` // A system prompt to pass to the model. System []*SystemContentBlock `locationName:"system" type:"list"` // Configuration information for the tools that the model can use when generating // a response. // // This field is only supported by Anthropic Claude 3, Cohere Command R, Cohere // Command R+, and Mistral Large models. ToolConfig *ToolConfiguration `locationName:"toolConfig" type:"structure"` // contains filtered or unexported fields }
func (ConverseInput) GoString ¶ added in v1.53.13
func (s ConverseInput) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ConverseInput) SetAdditionalModelResponseFieldPaths ¶ added in v1.53.13
func (s *ConverseInput) SetAdditionalModelResponseFieldPaths(v []*string) *ConverseInput
SetAdditionalModelResponseFieldPaths sets the AdditionalModelResponseFieldPaths field's value.
func (*ConverseInput) SetGuardrailConfig ¶ added in v1.54.4
func (s *ConverseInput) SetGuardrailConfig(v *GuardrailConfiguration) *ConverseInput
SetGuardrailConfig sets the GuardrailConfig field's value.
func (*ConverseInput) SetInferenceConfig ¶ added in v1.53.13
func (s *ConverseInput) SetInferenceConfig(v *InferenceConfiguration) *ConverseInput
SetInferenceConfig sets the InferenceConfig field's value.
func (*ConverseInput) SetMessages ¶ added in v1.53.13
func (s *ConverseInput) SetMessages(v []*Message) *ConverseInput
SetMessages sets the Messages field's value.
func (*ConverseInput) SetModelId ¶ added in v1.53.13
func (s *ConverseInput) SetModelId(v string) *ConverseInput
SetModelId sets the ModelId field's value.
func (*ConverseInput) SetSystem ¶ added in v1.53.13
func (s *ConverseInput) SetSystem(v []*SystemContentBlock) *ConverseInput
SetSystem sets the System field's value.
func (*ConverseInput) SetToolConfig ¶ added in v1.53.13
func (s *ConverseInput) SetToolConfig(v *ToolConfiguration) *ConverseInput
SetToolConfig sets the ToolConfig field's value.
func (ConverseInput) String ¶ added in v1.53.13
func (s ConverseInput) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ConverseInput) Validate ¶ added in v1.53.13
func (s *ConverseInput) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type ConverseMetrics ¶ added in v1.53.13
type ConverseMetrics struct { // The latency of the call to Converse, in milliseconds. // // LatencyMs is a required field LatencyMs *int64 `locationName:"latencyMs" type:"long" required:"true"` // contains filtered or unexported fields }
Metrics for a call to Converse (https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html).
func (ConverseMetrics) GoString ¶ added in v1.53.13
func (s ConverseMetrics) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ConverseMetrics) SetLatencyMs ¶ added in v1.53.13
func (s *ConverseMetrics) SetLatencyMs(v int64) *ConverseMetrics
SetLatencyMs sets the LatencyMs field's value.
func (ConverseMetrics) String ¶ added in v1.53.13
func (s ConverseMetrics) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
type ConverseOutput ¶ added in v1.53.13
type ConverseOutput struct { // Metrics for the call to Converse. // // Metrics is a required field Metrics *ConverseMetrics `locationName:"metrics" type:"structure" required:"true"` // The result from the call to Converse. // // Output is a required field Output *ConverseOutput_ `locationName:"output" type:"structure" required:"true"` // The reason why the model stopped generating output. // // StopReason is a required field StopReason *string `locationName:"stopReason" type:"string" required:"true" enum:"StopReason"` // A trace object that contains information about the Guardrail behavior. Trace *ConverseTrace `locationName:"trace" type:"structure"` // The total number of tokens used in the call to Converse. The total includes // the tokens input to the model and the tokens generated by the model. // // Usage is a required field Usage *TokenUsage `locationName:"usage" type:"structure" required:"true"` // contains filtered or unexported fields }
func (ConverseOutput) GoString ¶ added in v1.53.13
func (s ConverseOutput) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ConverseOutput) SetMetrics ¶ added in v1.53.13
func (s *ConverseOutput) SetMetrics(v *ConverseMetrics) *ConverseOutput
SetMetrics sets the Metrics field's value.
func (*ConverseOutput) SetOutput ¶ added in v1.53.13
func (s *ConverseOutput) SetOutput(v *ConverseOutput_) *ConverseOutput
SetOutput sets the Output field's value.
func (*ConverseOutput) SetStopReason ¶ added in v1.53.13
func (s *ConverseOutput) SetStopReason(v string) *ConverseOutput
SetStopReason sets the StopReason field's value.
func (*ConverseOutput) SetTrace ¶ added in v1.54.4
func (s *ConverseOutput) SetTrace(v *ConverseTrace) *ConverseOutput
SetTrace sets the Trace field's value.
func (*ConverseOutput) SetUsage ¶ added in v1.53.13
func (s *ConverseOutput) SetUsage(v *TokenUsage) *ConverseOutput
SetUsage sets the Usage field's value.
func (ConverseOutput) String ¶ added in v1.53.13
func (s ConverseOutput) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
type ConverseOutput_ ¶ added in v1.53.13
type ConverseOutput_ struct { // The message that the model generates. Message *Message `locationName:"message" type:"structure"` // contains filtered or unexported fields }
The output from a call to Converse (https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html).
func (ConverseOutput_) GoString ¶ added in v1.53.13
func (s ConverseOutput_) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ConverseOutput_) SetMessage ¶ added in v1.53.13
func (s *ConverseOutput_) SetMessage(v *Message) *ConverseOutput_
SetMessage sets the Message field's value.
func (ConverseOutput_) String ¶ added in v1.53.13
func (s ConverseOutput_) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
type ConverseStreamEventStream ¶ added in v1.53.13
type ConverseStreamEventStream struct { // Reader is the EventStream reader for the ConverseStreamOutput_ // events. This value is automatically set by the SDK when the API call is made // Use this member when unit testing your code with the SDK to mock out the // EventStream Reader. // // Must not be nil. Reader ConverseStreamOutput_Reader // contains filtered or unexported fields }
ConverseStreamEventStream provides the event stream handling for the ConverseStream.
For testing and mocking the event stream this type should be initialized via the NewConverseStreamEventStream constructor function. Using the functional options to pass in nested mock behavior.
func NewConverseStreamEventStream ¶ added in v1.53.13
func NewConverseStreamEventStream(opts ...func(*ConverseStreamEventStream)) *ConverseStreamEventStream
NewConverseStreamEventStream initializes an ConverseStreamEventStream. This function should only be used for testing and mocking the ConverseStreamEventStream stream within your application.
The Reader member must be set before reading events from the stream.
es := NewConverseStreamEventStream(func(o *ConverseStreamEventStream){ es.Reader = myMockStreamReader })
func (*ConverseStreamEventStream) Close ¶ added in v1.53.13
func (es *ConverseStreamEventStream) Close() (err error)
Close closes the stream. This will also cause the stream to be closed. Close must be called when done using the stream API. Not calling Close may result in resource leaks.
You can use the closing of the Reader's Events channel to terminate your application's read from the API's stream.
func (*ConverseStreamEventStream) Err ¶ added in v1.53.13
func (es *ConverseStreamEventStream) Err() error
Err returns any error that occurred while reading or writing EventStream Events from the service API's response. Returns nil if there were no errors.
func (*ConverseStreamEventStream) Events ¶ added in v1.53.13
func (es *ConverseStreamEventStream) Events() <-chan ConverseStreamOutput_Event
Events returns a channel to read events from.
These events are:
- ContentBlockDeltaEvent
- ContentBlockStartEvent
- ContentBlockStopEvent
- MessageStartEvent
- MessageStopEvent
- ConverseStreamMetadataEvent
- ConverseStreamOutput_UnknownEvent
type ConverseStreamInput ¶ added in v1.53.13
type ConverseStreamInput struct { // Additional model parameters field paths to return in the response. ConverseStream // returns the requested fields as a JSON Pointer object in the additionalModelResponseFields // field. The following is example JSON for additionalModelResponseFieldPaths. // // [ "/stop_sequence" ] // // For information about the JSON Pointer syntax, see the Internet Engineering // Task Force (IETF) (https://datatracker.ietf.org/doc/html/rfc6901) documentation. // // ConverseStream rejects an empty JSON Pointer or incorrectly structured JSON // Pointer with a 400 error code. if the JSON Pointer is valid, but the requested // field is not in the model response, it is ignored by ConverseStream. AdditionalModelResponseFieldPaths []*string `locationName:"additionalModelResponseFieldPaths" type:"list"` // Configuration information for a guardrail that you want to use in the request. GuardrailConfig *GuardrailStreamConfiguration `locationName:"guardrailConfig" type:"structure"` // Inference parameters to pass to the model. ConverseStream supports a base // set of inference parameters. If you need to pass additional parameters that // the model supports, use the additionalModelRequestFields request field. InferenceConfig *InferenceConfiguration `locationName:"inferenceConfig" type:"structure"` // The messages that you want to send to the model. // // Messages is a required field Messages []*Message `locationName:"messages" type:"list" required:"true"` // The ID for the model. // // The modelId to provide depends on the type of model that you use: // // * If you use a base model, specify the model ID or its ARN. For a list // of model IDs for base models, see Amazon Bedrock base model IDs (on-demand // throughput) (https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns) // in the Amazon Bedrock User Guide. // // * If you use a provisioned model, specify the ARN of the Provisioned Throughput. // For more information, see Run inference using a Provisioned Throughput // (https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html) // in the Amazon Bedrock User Guide. // // * If you use a custom model, first purchase Provisioned Throughput for // it. Then specify the ARN of the resulting provisioned model. For more // information, see Use a custom model in Amazon Bedrock (https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html) // in the Amazon Bedrock User Guide. // // ModelId is a required field ModelId *string `location:"uri" locationName:"modelId" min:"1" type:"string" required:"true"` // A system prompt to send to the model. System []*SystemContentBlock `locationName:"system" type:"list"` // Configuration information for the tools that the model can use when generating // a response. // // This field is only supported by Anthropic Claude 3 models. ToolConfig *ToolConfiguration `locationName:"toolConfig" type:"structure"` // contains filtered or unexported fields }
func (ConverseStreamInput) GoString ¶ added in v1.53.13
func (s ConverseStreamInput) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ConverseStreamInput) SetAdditionalModelResponseFieldPaths ¶ added in v1.53.13
func (s *ConverseStreamInput) SetAdditionalModelResponseFieldPaths(v []*string) *ConverseStreamInput
SetAdditionalModelResponseFieldPaths sets the AdditionalModelResponseFieldPaths field's value.
func (*ConverseStreamInput) SetGuardrailConfig ¶ added in v1.54.4
func (s *ConverseStreamInput) SetGuardrailConfig(v *GuardrailStreamConfiguration) *ConverseStreamInput
SetGuardrailConfig sets the GuardrailConfig field's value.
func (*ConverseStreamInput) SetInferenceConfig ¶ added in v1.53.13
func (s *ConverseStreamInput) SetInferenceConfig(v *InferenceConfiguration) *ConverseStreamInput
SetInferenceConfig sets the InferenceConfig field's value.
func (*ConverseStreamInput) SetMessages ¶ added in v1.53.13
func (s *ConverseStreamInput) SetMessages(v []*Message) *ConverseStreamInput
SetMessages sets the Messages field's value.
func (*ConverseStreamInput) SetModelId ¶ added in v1.53.13
func (s *ConverseStreamInput) SetModelId(v string) *ConverseStreamInput
SetModelId sets the ModelId field's value.
func (*ConverseStreamInput) SetSystem ¶ added in v1.53.13
func (s *ConverseStreamInput) SetSystem(v []*SystemContentBlock) *ConverseStreamInput
SetSystem sets the System field's value.
func (*ConverseStreamInput) SetToolConfig ¶ added in v1.53.13
func (s *ConverseStreamInput) SetToolConfig(v *ToolConfiguration) *ConverseStreamInput
SetToolConfig sets the ToolConfig field's value.
func (ConverseStreamInput) String ¶ added in v1.53.13
func (s ConverseStreamInput) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ConverseStreamInput) Validate ¶ added in v1.53.13
func (s *ConverseStreamInput) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type ConverseStreamMetadataEvent ¶ added in v1.53.13
type ConverseStreamMetadataEvent struct { // The metrics for the conversation stream metadata event. // // Metrics is a required field Metrics *ConverseStreamMetrics `locationName:"metrics" type:"structure" required:"true"` // The trace object in the response from ConverseStream (https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html) // that contains information about the guardrail behavior. Trace *ConverseStreamTrace `locationName:"trace" type:"structure"` // Usage information for the conversation stream event. // // Usage is a required field Usage *TokenUsage `locationName:"usage" type:"structure" required:"true"` // contains filtered or unexported fields }
A conversation stream metadata event.
func (ConverseStreamMetadataEvent) GoString ¶ added in v1.53.13
func (s ConverseStreamMetadataEvent) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ConverseStreamMetadataEvent) MarshalEvent ¶ added in v1.53.13
func (s *ConverseStreamMetadataEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error)
MarshalEvent marshals the type into an stream event value. This method should only used internally within the SDK's EventStream handling.
func (*ConverseStreamMetadataEvent) SetMetrics ¶ added in v1.53.13
func (s *ConverseStreamMetadataEvent) SetMetrics(v *ConverseStreamMetrics) *ConverseStreamMetadataEvent
SetMetrics sets the Metrics field's value.
func (*ConverseStreamMetadataEvent) SetTrace ¶ added in v1.54.4
func (s *ConverseStreamMetadataEvent) SetTrace(v *ConverseStreamTrace) *ConverseStreamMetadataEvent
SetTrace sets the Trace field's value.
func (*ConverseStreamMetadataEvent) SetUsage ¶ added in v1.53.13
func (s *ConverseStreamMetadataEvent) SetUsage(v *TokenUsage) *ConverseStreamMetadataEvent
SetUsage sets the Usage field's value.
func (ConverseStreamMetadataEvent) String ¶ added in v1.53.13
func (s ConverseStreamMetadataEvent) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ConverseStreamMetadataEvent) UnmarshalEvent ¶ added in v1.53.13
func (s *ConverseStreamMetadataEvent) UnmarshalEvent( payloadUnmarshaler protocol.PayloadUnmarshaler, msg eventstream.Message, ) error
UnmarshalEvent unmarshals the EventStream Message into the ConverseStreamMetadataEvent value. This method is only used internally within the SDK's EventStream handling.
type ConverseStreamMetrics ¶ added in v1.53.13
type ConverseStreamMetrics struct { // The latency for the streaming request, in milliseconds. // // LatencyMs is a required field LatencyMs *int64 `locationName:"latencyMs" type:"long" required:"true"` // contains filtered or unexported fields }
Metrics for the stream.
func (ConverseStreamMetrics) GoString ¶ added in v1.53.13
func (s ConverseStreamMetrics) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ConverseStreamMetrics) SetLatencyMs ¶ added in v1.53.13
func (s *ConverseStreamMetrics) SetLatencyMs(v int64) *ConverseStreamMetrics
SetLatencyMs sets the LatencyMs field's value.
func (ConverseStreamMetrics) String ¶ added in v1.53.13
func (s ConverseStreamMetrics) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
type ConverseStreamOutput ¶ added in v1.53.13
type ConverseStreamOutput struct {
// contains filtered or unexported fields
}
func (*ConverseStreamOutput) GetStream ¶ added in v1.53.13
func (s *ConverseStreamOutput) GetStream() *ConverseStreamEventStream
GetStream returns the type to interact with the event stream.
func (ConverseStreamOutput) GoString ¶ added in v1.53.13
func (s ConverseStreamOutput) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (ConverseStreamOutput) String ¶ added in v1.53.13
func (s ConverseStreamOutput) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
type ConverseStreamOutput_Event ¶ added in v1.53.13
type ConverseStreamOutput_Event interface { eventstreamapi.Marshaler eventstreamapi.Unmarshaler // contains filtered or unexported methods }
ConverseStreamOutput_Event groups together all EventStream events writes for ConverseStreamOutput_.
These events are:
- ContentBlockDeltaEvent
- ContentBlockStartEvent
- ContentBlockStopEvent
- MessageStartEvent
- MessageStopEvent
- ConverseStreamMetadataEvent
type ConverseStreamOutput_Reader ¶ added in v1.53.13
type ConverseStreamOutput_Reader interface { // Returns a channel of events as they are read from the event stream. Events() <-chan ConverseStreamOutput_Event // Close will stop the reader reading events from the stream. Close() error // Returns any error that has occurred while reading from the event stream. Err() error }
ConverseStreamOutput_Reader provides the interface for reading to the stream. The default implementation for this interface will be ConverseStreamOutput_.
The reader's Close method must allow multiple concurrent calls.
These events are:
- ContentBlockDeltaEvent
- ContentBlockStartEvent
- ContentBlockStopEvent
- MessageStartEvent
- MessageStopEvent
- ConverseStreamMetadataEvent
- ConverseStreamOutput_UnknownEvent
type ConverseStreamOutput_UnknownEvent ¶ added in v1.53.13
type ConverseStreamOutput_UnknownEvent struct { Type string Message eventstream.Message }
ConverseStreamOutput_UnknownEvent provides a failsafe event for the ConverseStreamOutput_ group of events when an unknown event is received.
func (*ConverseStreamOutput_UnknownEvent) MarshalEvent ¶ added in v1.53.13
func (e *ConverseStreamOutput_UnknownEvent) MarshalEvent(pm protocol.PayloadMarshaler) ( msg eventstream.Message, err error, )
MarshalEvent marshals the type into an stream event value. This method should only used internally within the SDK's EventStream handling.
func (*ConverseStreamOutput_UnknownEvent) UnmarshalEvent ¶ added in v1.53.13
func (e *ConverseStreamOutput_UnknownEvent) UnmarshalEvent( payloadUnmarshaler protocol.PayloadUnmarshaler, msg eventstream.Message, ) error
UnmarshalEvent unmarshals the EventStream Message into the ConverseStreamOutput_ value. This method is only used internally within the SDK's EventStream handling.
type ConverseStreamTrace ¶ added in v1.54.4
type ConverseStreamTrace struct { // The guardrail trace object. Guardrail *GuardrailTraceAssessment `locationName:"guardrail" type:"structure"` // contains filtered or unexported fields }
The trace object in a response from ConverseStream (https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html). Currently, you can only trace guardrails.
func (ConverseStreamTrace) GoString ¶ added in v1.54.4
func (s ConverseStreamTrace) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ConverseStreamTrace) SetGuardrail ¶ added in v1.54.4
func (s *ConverseStreamTrace) SetGuardrail(v *GuardrailTraceAssessment) *ConverseStreamTrace
SetGuardrail sets the Guardrail field's value.
func (ConverseStreamTrace) String ¶ added in v1.54.4
func (s ConverseStreamTrace) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
type ConverseTrace ¶ added in v1.54.4
type ConverseTrace struct { // The guardrail trace object. Guardrail *GuardrailTraceAssessment `locationName:"guardrail" type:"structure"` // contains filtered or unexported fields }
The trace object in a response from Converse (https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html). Currently, you can only trace guardrails.
func (ConverseTrace) GoString ¶ added in v1.54.4
func (s ConverseTrace) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ConverseTrace) SetGuardrail ¶ added in v1.54.4
func (s *ConverseTrace) SetGuardrail(v *GuardrailTraceAssessment) *ConverseTrace
SetGuardrail sets the Guardrail field's value.
func (ConverseTrace) String ¶ added in v1.54.4
func (s ConverseTrace) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
type DocumentBlock ¶ added in v1.54.6
type DocumentBlock struct { // The format of a document, or its extension. // // Format is a required field Format *string `locationName:"format" type:"string" required:"true" enum:"DocumentFormat"` // A name for the document. The name can only contain the following characters: // // * Alphanumeric characters // // * Whitespace characters (no more than one in a row) // // * Hyphens // // * Parentheses // // * Square brackets // // This field is vulnerable to prompt injections, because the model might inadvertently // interpret it as instructions. Therefore, we recommend that you specify a // neutral name. // // Name is a required field Name *string `locationName:"name" min:"1" type:"string" required:"true"` // Contains the content of the document. // // Source is a required field Source *DocumentSource `locationName:"source" type:"structure" required:"true"` // contains filtered or unexported fields }
A document to include in a message.
func (DocumentBlock) GoString ¶ added in v1.54.6
func (s DocumentBlock) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*DocumentBlock) SetFormat ¶ added in v1.54.6
func (s *DocumentBlock) SetFormat(v string) *DocumentBlock
SetFormat sets the Format field's value.
func (*DocumentBlock) SetName ¶ added in v1.54.6
func (s *DocumentBlock) SetName(v string) *DocumentBlock
SetName sets the Name field's value.
func (*DocumentBlock) SetSource ¶ added in v1.54.6
func (s *DocumentBlock) SetSource(v *DocumentSource) *DocumentBlock
SetSource sets the Source field's value.
func (DocumentBlock) String ¶ added in v1.54.6
func (s DocumentBlock) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*DocumentBlock) Validate ¶ added in v1.54.6
func (s *DocumentBlock) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type DocumentSource ¶ added in v1.54.6
type DocumentSource struct { // The raw bytes for the document. If you use an Amazon Web Services SDK, you // don't need to encode the bytes in base64. // Bytes is automatically base64 encoded/decoded by the SDK. Bytes []byte `locationName:"bytes" min:"1" type:"blob"` // contains filtered or unexported fields }
Contains the content of a document.
func (DocumentSource) GoString ¶ added in v1.54.6
func (s DocumentSource) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*DocumentSource) SetBytes ¶ added in v1.54.6
func (s *DocumentSource) SetBytes(v []byte) *DocumentSource
SetBytes sets the Bytes field's value.
func (DocumentSource) String ¶ added in v1.54.6
func (s DocumentSource) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*DocumentSource) Validate ¶ added in v1.54.6
func (s *DocumentSource) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type GuardrailAssessment ¶ added in v1.54.4
type GuardrailAssessment struct { // The content policy. ContentPolicy *GuardrailContentPolicyAssessment `locationName:"contentPolicy" type:"structure"` // The contextual grounding policy used for the guardrail assessment. ContextualGroundingPolicy *GuardrailContextualGroundingPolicyAssessment `locationName:"contextualGroundingPolicy" type:"structure"` // The sensitive information policy. SensitiveInformationPolicy *GuardrailSensitiveInformationPolicyAssessment `locationName:"sensitiveInformationPolicy" type:"structure"` // The topic policy. TopicPolicy *GuardrailTopicPolicyAssessment `locationName:"topicPolicy" type:"structure"` // The word policy. WordPolicy *GuardrailWordPolicyAssessment `locationName:"wordPolicy" type:"structure"` // contains filtered or unexported fields }
A behavior assessment of the guardrail policies used in a call to the Converse API.
func (GuardrailAssessment) GoString ¶ added in v1.54.4
func (s GuardrailAssessment) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*GuardrailAssessment) SetContentPolicy ¶ added in v1.54.4
func (s *GuardrailAssessment) SetContentPolicy(v *GuardrailContentPolicyAssessment) *GuardrailAssessment
SetContentPolicy sets the ContentPolicy field's value.
func (*GuardrailAssessment) SetContextualGroundingPolicy ¶ added in v1.54.18
func (s *GuardrailAssessment) SetContextualGroundingPolicy(v *GuardrailContextualGroundingPolicyAssessment) *GuardrailAssessment
SetContextualGroundingPolicy sets the ContextualGroundingPolicy field's value.
func (*GuardrailAssessment) SetSensitiveInformationPolicy ¶ added in v1.54.4
func (s *GuardrailAssessment) SetSensitiveInformationPolicy(v *GuardrailSensitiveInformationPolicyAssessment) *GuardrailAssessment
SetSensitiveInformationPolicy sets the SensitiveInformationPolicy field's value.
func (*GuardrailAssessment) SetTopicPolicy ¶ added in v1.54.4
func (s *GuardrailAssessment) SetTopicPolicy(v *GuardrailTopicPolicyAssessment) *GuardrailAssessment
SetTopicPolicy sets the TopicPolicy field's value.
func (*GuardrailAssessment) SetWordPolicy ¶ added in v1.54.4
func (s *GuardrailAssessment) SetWordPolicy(v *GuardrailWordPolicyAssessment) *GuardrailAssessment
SetWordPolicy sets the WordPolicy field's value.
func (GuardrailAssessment) String ¶ added in v1.54.4
func (s GuardrailAssessment) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
type GuardrailConfiguration ¶ added in v1.54.4
type GuardrailConfiguration struct { // The identifier for the guardrail. // // GuardrailIdentifier is a required field GuardrailIdentifier *string `locationName:"guardrailIdentifier" type:"string" required:"true"` // The version of the guardrail. // // GuardrailVersion is a required field GuardrailVersion *string `locationName:"guardrailVersion" type:"string" required:"true"` // The trace behavior for the guardrail. Trace *string `locationName:"trace" type:"string" enum:"GuardrailTrace"` // contains filtered or unexported fields }
Configuration information for a guardrail that you use with the Converse (https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html) operation.
func (GuardrailConfiguration) GoString ¶ added in v1.54.4
func (s GuardrailConfiguration) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*GuardrailConfiguration) SetGuardrailIdentifier ¶ added in v1.54.4
func (s *GuardrailConfiguration) SetGuardrailIdentifier(v string) *GuardrailConfiguration
SetGuardrailIdentifier sets the GuardrailIdentifier field's value.
func (*GuardrailConfiguration) SetGuardrailVersion ¶ added in v1.54.4
func (s *GuardrailConfiguration) SetGuardrailVersion(v string) *GuardrailConfiguration
SetGuardrailVersion sets the GuardrailVersion field's value.
func (*GuardrailConfiguration) SetTrace ¶ added in v1.54.4
func (s *GuardrailConfiguration) SetTrace(v string) *GuardrailConfiguration
SetTrace sets the Trace field's value.
func (GuardrailConfiguration) String ¶ added in v1.54.4
func (s GuardrailConfiguration) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*GuardrailConfiguration) Validate ¶ added in v1.54.4
func (s *GuardrailConfiguration) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type GuardrailContentBlock ¶ added in v1.54.18
type GuardrailContentBlock struct { // Text within content block to be evaluated by the guardrail. Text *GuardrailTextBlock `locationName:"text" type:"structure"` // contains filtered or unexported fields }
The content block to be evaluated by the guardrail.
func (GuardrailContentBlock) GoString ¶ added in v1.54.18
func (s GuardrailContentBlock) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*GuardrailContentBlock) SetText ¶ added in v1.54.18
func (s *GuardrailContentBlock) SetText(v *GuardrailTextBlock) *GuardrailContentBlock
SetText sets the Text field's value.
func (GuardrailContentBlock) String ¶ added in v1.54.18
func (s GuardrailContentBlock) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*GuardrailContentBlock) Validate ¶ added in v1.54.18
func (s *GuardrailContentBlock) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type GuardrailContentFilter ¶ added in v1.54.4
type GuardrailContentFilter struct { // The guardrail action. // // Action is a required field Action *string `locationName:"action" type:"string" required:"true" enum:"GuardrailContentPolicyAction"` // The guardrail confidence. // // Confidence is a required field Confidence *string `locationName:"confidence" type:"string" required:"true" enum:"GuardrailContentFilterConfidence"` // The guardrail type. // // Type is a required field Type *string `locationName:"type" type:"string" required:"true" enum:"GuardrailContentFilterType"` // contains filtered or unexported fields }
The content filter for a guardrail.
func (GuardrailContentFilter) GoString ¶ added in v1.54.4
func (s GuardrailContentFilter) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*GuardrailContentFilter) SetAction ¶ added in v1.54.4
func (s *GuardrailContentFilter) SetAction(v string) *GuardrailContentFilter
SetAction sets the Action field's value.
func (*GuardrailContentFilter) SetConfidence ¶ added in v1.54.4
func (s *GuardrailContentFilter) SetConfidence(v string) *GuardrailContentFilter
SetConfidence sets the Confidence field's value.
func (*GuardrailContentFilter) SetType ¶ added in v1.54.4
func (s *GuardrailContentFilter) SetType(v string) *GuardrailContentFilter
SetType sets the Type field's value.
func (GuardrailContentFilter) String ¶ added in v1.54.4
func (s GuardrailContentFilter) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
type GuardrailContentPolicyAssessment ¶ added in v1.54.4
type GuardrailContentPolicyAssessment struct { // The content policy filters. // // Filters is a required field Filters []*GuardrailContentFilter `locationName:"filters" type:"list" required:"true"` // contains filtered or unexported fields }
An assessment of a content policy for a guardrail.
func (GuardrailContentPolicyAssessment) GoString ¶ added in v1.54.4
func (s GuardrailContentPolicyAssessment) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*GuardrailContentPolicyAssessment) SetFilters ¶ added in v1.54.4
func (s *GuardrailContentPolicyAssessment) SetFilters(v []*GuardrailContentFilter) *GuardrailContentPolicyAssessment
SetFilters sets the Filters field's value.
func (GuardrailContentPolicyAssessment) String ¶ added in v1.54.4
func (s GuardrailContentPolicyAssessment) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
type GuardrailContextualGroundingFilter ¶ added in v1.54.18
type GuardrailContextualGroundingFilter struct { // The action performed by the guardrails contextual grounding filter. // // Action is a required field Action *string `locationName:"action" type:"string" required:"true" enum:"GuardrailContextualGroundingPolicyAction"` // The score generated by contextual grounding filter. // // Score is a required field Score *float64 `locationName:"score" type:"double" required:"true"` // The threshold used by contextual grounding filter to determine whether the // content is grounded or not. // // Threshold is a required field Threshold *float64 `locationName:"threshold" type:"double" required:"true"` // The contextual grounding filter type. // // Type is a required field Type *string `locationName:"type" type:"string" required:"true" enum:"GuardrailContextualGroundingFilterType"` // contains filtered or unexported fields }
The details for the guardrails contextual grounding filter.
func (GuardrailContextualGroundingFilter) GoString ¶ added in v1.54.18
func (s GuardrailContextualGroundingFilter) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*GuardrailContextualGroundingFilter) SetAction ¶ added in v1.54.18
func (s *GuardrailContextualGroundingFilter) SetAction(v string) *GuardrailContextualGroundingFilter
SetAction sets the Action field's value.
func (*GuardrailContextualGroundingFilter) SetScore ¶ added in v1.54.18
func (s *GuardrailContextualGroundingFilter) SetScore(v float64) *GuardrailContextualGroundingFilter
SetScore sets the Score field's value.
func (*GuardrailContextualGroundingFilter) SetThreshold ¶ added in v1.54.18
func (s *GuardrailContextualGroundingFilter) SetThreshold(v float64) *GuardrailContextualGroundingFilter
SetThreshold sets the Threshold field's value.
func (*GuardrailContextualGroundingFilter) SetType ¶ added in v1.54.18
func (s *GuardrailContextualGroundingFilter) SetType(v string) *GuardrailContextualGroundingFilter
SetType sets the Type field's value.
func (GuardrailContextualGroundingFilter) String ¶ added in v1.54.18
func (s GuardrailContextualGroundingFilter) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
type GuardrailContextualGroundingPolicyAssessment ¶ added in v1.54.18
type GuardrailContextualGroundingPolicyAssessment struct { // The filter details for the guardrails contextual grounding filter. Filters []*GuardrailContextualGroundingFilter `locationName:"filters" type:"list"` // contains filtered or unexported fields }
The policy assessment details for the guardrails contextual grounding filter.
func (GuardrailContextualGroundingPolicyAssessment) GoString ¶ added in v1.54.18
func (s GuardrailContextualGroundingPolicyAssessment) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*GuardrailContextualGroundingPolicyAssessment) SetFilters ¶ added in v1.54.18
func (s *GuardrailContextualGroundingPolicyAssessment) SetFilters(v []*GuardrailContextualGroundingFilter) *GuardrailContextualGroundingPolicyAssessment
SetFilters sets the Filters field's value.
func (GuardrailContextualGroundingPolicyAssessment) String ¶ added in v1.54.18
func (s GuardrailContextualGroundingPolicyAssessment) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
type GuardrailConverseContentBlock ¶ added in v1.54.4
type GuardrailConverseContentBlock struct { // The text to guard. Text *GuardrailConverseTextBlock `locationName:"text" type:"structure"` // contains filtered or unexported fields }
A content block for selective guarding with the Converse (https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html) or ConverseStream (https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html) API operations.
func (GuardrailConverseContentBlock) GoString ¶ added in v1.54.4
func (s GuardrailConverseContentBlock) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*GuardrailConverseContentBlock) SetText ¶ added in v1.54.4
func (s *GuardrailConverseContentBlock) SetText(v *GuardrailConverseTextBlock) *GuardrailConverseContentBlock
SetText sets the Text field's value.
func (GuardrailConverseContentBlock) String ¶ added in v1.54.4
func (s GuardrailConverseContentBlock) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*GuardrailConverseContentBlock) Validate ¶ added in v1.54.4
func (s *GuardrailConverseContentBlock) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type GuardrailConverseTextBlock ¶ added in v1.54.4
type GuardrailConverseTextBlock struct { // The qualifier details for the guardrails contextual grounding filter. Qualifiers []*string `locationName:"qualifiers" type:"list" enum:"GuardrailConverseContentQualifier"` // The text that you want to guard. // // Text is a required field Text *string `locationName:"text" type:"string" required:"true"` // contains filtered or unexported fields }
A text block that contains text that you want to assess with a guardrail. For more information, see GuardrailConverseContentBlock.
func (GuardrailConverseTextBlock) GoString ¶ added in v1.54.4
func (s GuardrailConverseTextBlock) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*GuardrailConverseTextBlock) SetQualifiers ¶ added in v1.54.18
func (s *GuardrailConverseTextBlock) SetQualifiers(v []*string) *GuardrailConverseTextBlock
SetQualifiers sets the Qualifiers field's value.
func (*GuardrailConverseTextBlock) SetText ¶ added in v1.54.4
func (s *GuardrailConverseTextBlock) SetText(v string) *GuardrailConverseTextBlock
SetText sets the Text field's value.
func (GuardrailConverseTextBlock) String ¶ added in v1.54.4
func (s GuardrailConverseTextBlock) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*GuardrailConverseTextBlock) Validate ¶ added in v1.54.4
func (s *GuardrailConverseTextBlock) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type GuardrailCustomWord ¶ added in v1.54.4
type GuardrailCustomWord struct { // The action for the custom word. // // Action is a required field Action *string `locationName:"action" type:"string" required:"true" enum:"GuardrailWordPolicyAction"` // The match for the custom word. // // Match is a required field Match *string `locationName:"match" type:"string" required:"true"` // contains filtered or unexported fields }
A custom word configured in a guardrail.
func (GuardrailCustomWord) GoString ¶ added in v1.54.4
func (s GuardrailCustomWord) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*GuardrailCustomWord) SetAction ¶ added in v1.54.4
func (s *GuardrailCustomWord) SetAction(v string) *GuardrailCustomWord
SetAction sets the Action field's value.
func (*GuardrailCustomWord) SetMatch ¶ added in v1.54.4
func (s *GuardrailCustomWord) SetMatch(v string) *GuardrailCustomWord
SetMatch sets the Match field's value.
func (GuardrailCustomWord) String ¶ added in v1.54.4
func (s GuardrailCustomWord) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
type GuardrailManagedWord ¶ added in v1.54.4
type GuardrailManagedWord struct { // The action for the managed word. // // Action is a required field Action *string `locationName:"action" type:"string" required:"true" enum:"GuardrailWordPolicyAction"` // The match for the managed word. // // Match is a required field Match *string `locationName:"match" type:"string" required:"true"` // The type for the managed word. // // Type is a required field Type *string `locationName:"type" type:"string" required:"true" enum:"GuardrailManagedWordType"` // contains filtered or unexported fields }
A managed word configured in a guardrail.
func (GuardrailManagedWord) GoString ¶ added in v1.54.4
func (s GuardrailManagedWord) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*GuardrailManagedWord) SetAction ¶ added in v1.54.4
func (s *GuardrailManagedWord) SetAction(v string) *GuardrailManagedWord
SetAction sets the Action field's value.
func (*GuardrailManagedWord) SetMatch ¶ added in v1.54.4
func (s *GuardrailManagedWord) SetMatch(v string) *GuardrailManagedWord
SetMatch sets the Match field's value.
func (*GuardrailManagedWord) SetType ¶ added in v1.54.4
func (s *GuardrailManagedWord) SetType(v string) *GuardrailManagedWord
SetType sets the Type field's value.
func (GuardrailManagedWord) String ¶ added in v1.54.4
func (s GuardrailManagedWord) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
type GuardrailOutputContent ¶ added in v1.54.18
type GuardrailOutputContent struct { // The specific text for the output content produced by the guardrail. Text *string `locationName:"text" type:"string"` // contains filtered or unexported fields }
The output content produced by the guardrail.
func (GuardrailOutputContent) GoString ¶ added in v1.54.18
func (s GuardrailOutputContent) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*GuardrailOutputContent) SetText ¶ added in v1.54.18
func (s *GuardrailOutputContent) SetText(v string) *GuardrailOutputContent
SetText sets the Text field's value.
func (GuardrailOutputContent) String ¶ added in v1.54.18
func (s GuardrailOutputContent) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
type GuardrailPiiEntityFilter ¶ added in v1.54.4
type GuardrailPiiEntityFilter struct { // The PII entity filter action. // // Action is a required field Action *string `locationName:"action" type:"string" required:"true" enum:"GuardrailSensitiveInformationPolicyAction"` // The PII entity filter match. // // Match is a required field Match *string `locationName:"match" type:"string" required:"true"` // The PII entity filter type. // // Type is a required field Type *string `locationName:"type" type:"string" required:"true" enum:"GuardrailPiiEntityType"` // contains filtered or unexported fields }
A Personally Identifiable Information (PII) entity configured in a guardrail.
func (GuardrailPiiEntityFilter) GoString ¶ added in v1.54.4
func (s GuardrailPiiEntityFilter) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*GuardrailPiiEntityFilter) SetAction ¶ added in v1.54.4
func (s *GuardrailPiiEntityFilter) SetAction(v string) *GuardrailPiiEntityFilter
SetAction sets the Action field's value.
func (*GuardrailPiiEntityFilter) SetMatch ¶ added in v1.54.4
func (s *GuardrailPiiEntityFilter) SetMatch(v string) *GuardrailPiiEntityFilter
SetMatch sets the Match field's value.
func (*GuardrailPiiEntityFilter) SetType ¶ added in v1.54.4
func (s *GuardrailPiiEntityFilter) SetType(v string) *GuardrailPiiEntityFilter
SetType sets the Type field's value.
func (GuardrailPiiEntityFilter) String ¶ added in v1.54.4
func (s GuardrailPiiEntityFilter) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
type GuardrailRegexFilter ¶ added in v1.54.4
type GuardrailRegexFilter struct { // The region filter action. // // Action is a required field Action *string `locationName:"action" type:"string" required:"true" enum:"GuardrailSensitiveInformationPolicyAction"` // The regesx filter match. Match *string `locationName:"match" type:"string"` // The regex filter name. Name *string `locationName:"name" type:"string"` // The regex query. Regex *string `locationName:"regex" type:"string"` // contains filtered or unexported fields }
A Regex filter configured in a guardrail.
func (GuardrailRegexFilter) GoString ¶ added in v1.54.4
func (s GuardrailRegexFilter) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*GuardrailRegexFilter) SetAction ¶ added in v1.54.4
func (s *GuardrailRegexFilter) SetAction(v string) *GuardrailRegexFilter
SetAction sets the Action field's value.
func (*GuardrailRegexFilter) SetMatch ¶ added in v1.54.4
func (s *GuardrailRegexFilter) SetMatch(v string) *GuardrailRegexFilter
SetMatch sets the Match field's value.
func (*GuardrailRegexFilter) SetName ¶ added in v1.54.4
func (s *GuardrailRegexFilter) SetName(v string) *GuardrailRegexFilter
SetName sets the Name field's value.
func (*GuardrailRegexFilter) SetRegex ¶ added in v1.54.4
func (s *GuardrailRegexFilter) SetRegex(v string) *GuardrailRegexFilter
SetRegex sets the Regex field's value.
func (GuardrailRegexFilter) String ¶ added in v1.54.4
func (s GuardrailRegexFilter) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
type GuardrailSensitiveInformationPolicyAssessment ¶ added in v1.54.4
type GuardrailSensitiveInformationPolicyAssessment struct { // The PII entities in the assessment. // // PiiEntities is a required field PiiEntities []*GuardrailPiiEntityFilter `locationName:"piiEntities" type:"list" required:"true"` // The regex queries in the assessment. // // Regexes is a required field Regexes []*GuardrailRegexFilter `locationName:"regexes" type:"list" required:"true"` // contains filtered or unexported fields }
The assessment for aPersonally Identifiable Information (PII) policy.
func (GuardrailSensitiveInformationPolicyAssessment) GoString ¶ added in v1.54.4
func (s GuardrailSensitiveInformationPolicyAssessment) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*GuardrailSensitiveInformationPolicyAssessment) SetPiiEntities ¶ added in v1.54.4
func (s *GuardrailSensitiveInformationPolicyAssessment) SetPiiEntities(v []*GuardrailPiiEntityFilter) *GuardrailSensitiveInformationPolicyAssessment
SetPiiEntities sets the PiiEntities field's value.
func (*GuardrailSensitiveInformationPolicyAssessment) SetRegexes ¶ added in v1.54.4
func (s *GuardrailSensitiveInformationPolicyAssessment) SetRegexes(v []*GuardrailRegexFilter) *GuardrailSensitiveInformationPolicyAssessment
SetRegexes sets the Regexes field's value.
func (GuardrailSensitiveInformationPolicyAssessment) String ¶ added in v1.54.4
func (s GuardrailSensitiveInformationPolicyAssessment) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
type GuardrailStreamConfiguration ¶ added in v1.54.4
type GuardrailStreamConfiguration struct { // The identifier for the guardrail. // // GuardrailIdentifier is a required field GuardrailIdentifier *string `locationName:"guardrailIdentifier" type:"string" required:"true"` // The version of the guardrail. // // GuardrailVersion is a required field GuardrailVersion *string `locationName:"guardrailVersion" type:"string" required:"true"` // The processing mode. // // The processing mode. For more information, see Configure streaming response // behavior in the Amazon Bedrock User Guide. StreamProcessingMode *string `locationName:"streamProcessingMode" type:"string" enum:"GuardrailStreamProcessingMode"` // The trace behavior for the guardrail. Trace *string `locationName:"trace" type:"string" enum:"GuardrailTrace"` // contains filtered or unexported fields }
Configuration information for a guardrail that you use with the ConverseStream action.
func (GuardrailStreamConfiguration) GoString ¶ added in v1.54.4
func (s GuardrailStreamConfiguration) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*GuardrailStreamConfiguration) SetGuardrailIdentifier ¶ added in v1.54.4
func (s *GuardrailStreamConfiguration) SetGuardrailIdentifier(v string) *GuardrailStreamConfiguration
SetGuardrailIdentifier sets the GuardrailIdentifier field's value.
func (*GuardrailStreamConfiguration) SetGuardrailVersion ¶ added in v1.54.4
func (s *GuardrailStreamConfiguration) SetGuardrailVersion(v string) *GuardrailStreamConfiguration
SetGuardrailVersion sets the GuardrailVersion field's value.
func (*GuardrailStreamConfiguration) SetStreamProcessingMode ¶ added in v1.54.4
func (s *GuardrailStreamConfiguration) SetStreamProcessingMode(v string) *GuardrailStreamConfiguration
SetStreamProcessingMode sets the StreamProcessingMode field's value.
func (*GuardrailStreamConfiguration) SetTrace ¶ added in v1.54.4
func (s *GuardrailStreamConfiguration) SetTrace(v string) *GuardrailStreamConfiguration
SetTrace sets the Trace field's value.
func (GuardrailStreamConfiguration) String ¶ added in v1.54.4
func (s GuardrailStreamConfiguration) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*GuardrailStreamConfiguration) Validate ¶ added in v1.54.4
func (s *GuardrailStreamConfiguration) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type GuardrailTextBlock ¶ added in v1.54.18
type GuardrailTextBlock struct { // The qualifiers describing the text block. Qualifiers []*string `locationName:"qualifiers" type:"list" enum:"GuardrailContentQualifier"` // The input text details to be evaluated by the guardrail. // // Text is a required field Text *string `locationName:"text" type:"string" required:"true"` // contains filtered or unexported fields }
The text block to be evaluated by the guardrail.
func (GuardrailTextBlock) GoString ¶ added in v1.54.18
func (s GuardrailTextBlock) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*GuardrailTextBlock) SetQualifiers ¶ added in v1.54.18
func (s *GuardrailTextBlock) SetQualifiers(v []*string) *GuardrailTextBlock
SetQualifiers sets the Qualifiers field's value.
func (*GuardrailTextBlock) SetText ¶ added in v1.54.18
func (s *GuardrailTextBlock) SetText(v string) *GuardrailTextBlock
SetText sets the Text field's value.
func (GuardrailTextBlock) String ¶ added in v1.54.18
func (s GuardrailTextBlock) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*GuardrailTextBlock) Validate ¶ added in v1.54.18
func (s *GuardrailTextBlock) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type GuardrailTopic ¶ added in v1.54.4
type GuardrailTopic struct { // The action the guardrail should take when it intervenes on a topic. // // Action is a required field Action *string `locationName:"action" type:"string" required:"true" enum:"GuardrailTopicPolicyAction"` // The name for the guardrail. // // Name is a required field Name *string `locationName:"name" type:"string" required:"true"` // The type behavior that the guardrail should perform when the model detects // the topic. // // Type is a required field Type *string `locationName:"type" type:"string" required:"true" enum:"GuardrailTopicType"` // contains filtered or unexported fields }
Information about a topic guardrail.
func (GuardrailTopic) GoString ¶ added in v1.54.4
func (s GuardrailTopic) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*GuardrailTopic) SetAction ¶ added in v1.54.4
func (s *GuardrailTopic) SetAction(v string) *GuardrailTopic
SetAction sets the Action field's value.
func (*GuardrailTopic) SetName ¶ added in v1.54.4
func (s *GuardrailTopic) SetName(v string) *GuardrailTopic
SetName sets the Name field's value.
func (*GuardrailTopic) SetType ¶ added in v1.54.4
func (s *GuardrailTopic) SetType(v string) *GuardrailTopic
SetType sets the Type field's value.
func (GuardrailTopic) String ¶ added in v1.54.4
func (s GuardrailTopic) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
type GuardrailTopicPolicyAssessment ¶ added in v1.54.4
type GuardrailTopicPolicyAssessment struct { // The topics in the assessment. // // Topics is a required field Topics []*GuardrailTopic `locationName:"topics" type:"list" required:"true"` // contains filtered or unexported fields }
A behavior assessment of a topic policy.
func (GuardrailTopicPolicyAssessment) GoString ¶ added in v1.54.4
func (s GuardrailTopicPolicyAssessment) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*GuardrailTopicPolicyAssessment) SetTopics ¶ added in v1.54.4
func (s *GuardrailTopicPolicyAssessment) SetTopics(v []*GuardrailTopic) *GuardrailTopicPolicyAssessment
SetTopics sets the Topics field's value.
func (GuardrailTopicPolicyAssessment) String ¶ added in v1.54.4
func (s GuardrailTopicPolicyAssessment) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
type GuardrailTraceAssessment ¶ added in v1.54.4
type GuardrailTraceAssessment struct { // The input assessment. InputAssessment map[string]*GuardrailAssessment `locationName:"inputAssessment" type:"map"` // The output from the model. ModelOutput []*string `locationName:"modelOutput" type:"list"` // the output assessments. OutputAssessments map[string][]*GuardrailAssessment `locationName:"outputAssessments" type:"map"` // contains filtered or unexported fields }
A Top level guardrail trace object. For more information, see ConverseTrace.
func (GuardrailTraceAssessment) GoString ¶ added in v1.54.4
func (s GuardrailTraceAssessment) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*GuardrailTraceAssessment) SetInputAssessment ¶ added in v1.54.4
func (s *GuardrailTraceAssessment) SetInputAssessment(v map[string]*GuardrailAssessment) *GuardrailTraceAssessment
SetInputAssessment sets the InputAssessment field's value.
func (*GuardrailTraceAssessment) SetModelOutput ¶ added in v1.54.4
func (s *GuardrailTraceAssessment) SetModelOutput(v []*string) *GuardrailTraceAssessment
SetModelOutput sets the ModelOutput field's value.
func (*GuardrailTraceAssessment) SetOutputAssessments ¶ added in v1.54.4
func (s *GuardrailTraceAssessment) SetOutputAssessments(v map[string][]*GuardrailAssessment) *GuardrailTraceAssessment
SetOutputAssessments sets the OutputAssessments field's value.
func (GuardrailTraceAssessment) String ¶ added in v1.54.4
func (s GuardrailTraceAssessment) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
type GuardrailUsage ¶ added in v1.54.18
type GuardrailUsage struct { // The content policy units processed by the guardrail. // // ContentPolicyUnits is a required field ContentPolicyUnits *int64 `locationName:"contentPolicyUnits" type:"integer" required:"true"` // The contextual grounding policy units processed by the guardrail. // // ContextualGroundingPolicyUnits is a required field ContextualGroundingPolicyUnits *int64 `locationName:"contextualGroundingPolicyUnits" type:"integer" required:"true"` // The sensitive information policy free units processed by the guardrail. // // SensitiveInformationPolicyFreeUnits is a required field SensitiveInformationPolicyFreeUnits *int64 `locationName:"sensitiveInformationPolicyFreeUnits" type:"integer" required:"true"` // The sensitive information policy units processed by the guardrail. // // SensitiveInformationPolicyUnits is a required field SensitiveInformationPolicyUnits *int64 `locationName:"sensitiveInformationPolicyUnits" type:"integer" required:"true"` // The topic policy units processed by the guardrail. // // TopicPolicyUnits is a required field TopicPolicyUnits *int64 `locationName:"topicPolicyUnits" type:"integer" required:"true"` // The word policy units processed by the guardrail. // // WordPolicyUnits is a required field WordPolicyUnits *int64 `locationName:"wordPolicyUnits" type:"integer" required:"true"` // contains filtered or unexported fields }
The details on the use of the guardrail.
func (GuardrailUsage) GoString ¶ added in v1.54.18
func (s GuardrailUsage) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*GuardrailUsage) SetContentPolicyUnits ¶ added in v1.54.18
func (s *GuardrailUsage) SetContentPolicyUnits(v int64) *GuardrailUsage
SetContentPolicyUnits sets the ContentPolicyUnits field's value.
func (*GuardrailUsage) SetContextualGroundingPolicyUnits ¶ added in v1.54.18
func (s *GuardrailUsage) SetContextualGroundingPolicyUnits(v int64) *GuardrailUsage
SetContextualGroundingPolicyUnits sets the ContextualGroundingPolicyUnits field's value.
func (*GuardrailUsage) SetSensitiveInformationPolicyFreeUnits ¶ added in v1.54.18
func (s *GuardrailUsage) SetSensitiveInformationPolicyFreeUnits(v int64) *GuardrailUsage
SetSensitiveInformationPolicyFreeUnits sets the SensitiveInformationPolicyFreeUnits field's value.
func (*GuardrailUsage) SetSensitiveInformationPolicyUnits ¶ added in v1.54.18
func (s *GuardrailUsage) SetSensitiveInformationPolicyUnits(v int64) *GuardrailUsage
SetSensitiveInformationPolicyUnits sets the SensitiveInformationPolicyUnits field's value.
func (*GuardrailUsage) SetTopicPolicyUnits ¶ added in v1.54.18
func (s *GuardrailUsage) SetTopicPolicyUnits(v int64) *GuardrailUsage
SetTopicPolicyUnits sets the TopicPolicyUnits field's value.
func (*GuardrailUsage) SetWordPolicyUnits ¶ added in v1.54.18
func (s *GuardrailUsage) SetWordPolicyUnits(v int64) *GuardrailUsage
SetWordPolicyUnits sets the WordPolicyUnits field's value.
func (GuardrailUsage) String ¶ added in v1.54.18
func (s GuardrailUsage) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
type GuardrailWordPolicyAssessment ¶ added in v1.54.4
type GuardrailWordPolicyAssessment struct { // Custom words in the assessment. // // CustomWords is a required field CustomWords []*GuardrailCustomWord `locationName:"customWords" type:"list" required:"true"` // Managed word lists in the assessment. // // ManagedWordLists is a required field ManagedWordLists []*GuardrailManagedWord `locationName:"managedWordLists" type:"list" required:"true"` // contains filtered or unexported fields }
The word policy assessment.
func (GuardrailWordPolicyAssessment) GoString ¶ added in v1.54.4
func (s GuardrailWordPolicyAssessment) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*GuardrailWordPolicyAssessment) SetCustomWords ¶ added in v1.54.4
func (s *GuardrailWordPolicyAssessment) SetCustomWords(v []*GuardrailCustomWord) *GuardrailWordPolicyAssessment
SetCustomWords sets the CustomWords field's value.
func (*GuardrailWordPolicyAssessment) SetManagedWordLists ¶ added in v1.54.4
func (s *GuardrailWordPolicyAssessment) SetManagedWordLists(v []*GuardrailManagedWord) *GuardrailWordPolicyAssessment
SetManagedWordLists sets the ManagedWordLists field's value.
func (GuardrailWordPolicyAssessment) String ¶ added in v1.54.4
func (s GuardrailWordPolicyAssessment) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
type ImageBlock ¶ added in v1.53.13
type ImageBlock struct { // The format of the image. // // Format is a required field Format *string `locationName:"format" type:"string" required:"true" enum:"ImageFormat"` // The source for the image. // // Source is a required field Source *ImageSource `locationName:"source" type:"structure" required:"true"` // contains filtered or unexported fields }
Image content for a message.
func (ImageBlock) GoString ¶ added in v1.53.13
func (s ImageBlock) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ImageBlock) SetFormat ¶ added in v1.53.13
func (s *ImageBlock) SetFormat(v string) *ImageBlock
SetFormat sets the Format field's value.
func (*ImageBlock) SetSource ¶ added in v1.53.13
func (s *ImageBlock) SetSource(v *ImageSource) *ImageBlock
SetSource sets the Source field's value.
func (ImageBlock) String ¶ added in v1.53.13
func (s ImageBlock) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ImageBlock) Validate ¶ added in v1.53.13
func (s *ImageBlock) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type ImageSource ¶ added in v1.53.13
type ImageSource struct { // The raw image bytes for the image. If you use an AWS SDK, you don't need // to encode the image bytes in base64. // Bytes is automatically base64 encoded/decoded by the SDK. Bytes []byte `locationName:"bytes" min:"1" type:"blob"` // contains filtered or unexported fields }
The source for an image.
func (ImageSource) GoString ¶ added in v1.53.13
func (s ImageSource) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ImageSource) SetBytes ¶ added in v1.53.13
func (s *ImageSource) SetBytes(v []byte) *ImageSource
SetBytes sets the Bytes field's value.
func (ImageSource) String ¶ added in v1.53.13
func (s ImageSource) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ImageSource) Validate ¶ added in v1.53.13
func (s *ImageSource) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type InferenceConfiguration ¶ added in v1.53.13
type InferenceConfiguration struct { // The maximum number of tokens to allow in the generated response. The default // value is the maximum allowed value for the model that you are using. For // more information, see Inference parameters for foundation models (https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html). MaxTokens *int64 `locationName:"maxTokens" min:"1" type:"integer"` // A list of stop sequences. A stop sequence is a sequence of characters that // causes the model to stop generating the response. StopSequences []*string `locationName:"stopSequences" type:"list"` // The likelihood of the model selecting higher-probability options while generating // a response. A lower value makes the model more likely to choose higher-probability // options, while a higher value makes the model more likely to choose lower-probability // options. // // The default value is the default value for the model that you are using. // For more information, see Inference parameters for foundation models (https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html). Temperature *float64 `locationName:"temperature" type:"float"` // The percentage of most-likely candidates that the model considers for the // next token. For example, if you choose a value of 0.8 for topP, the model // selects from the top 80% of the probability distribution of tokens that could // be next in the sequence. // // The default value is the default value for the model that you are using. // For more information, see Inference parameters for foundation models (https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html). TopP *float64 `locationName:"topP" type:"float"` // contains filtered or unexported fields }
Base inference parameters to pass to a model in a call to Converse (https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html) or ConverseStream (https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html). For more information, see Inference parameters for foundation models (https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html).
If you need to pass additional parameters that the model supports, use the additionalModelRequestFields request field in the call to Converse or ConverseStream. For more information, see Model parameters (https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html).
func (InferenceConfiguration) GoString ¶ added in v1.53.13
func (s InferenceConfiguration) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*InferenceConfiguration) SetMaxTokens ¶ added in v1.53.13
func (s *InferenceConfiguration) SetMaxTokens(v int64) *InferenceConfiguration
SetMaxTokens sets the MaxTokens field's value.
func (*InferenceConfiguration) SetStopSequences ¶ added in v1.53.13
func (s *InferenceConfiguration) SetStopSequences(v []*string) *InferenceConfiguration
SetStopSequences sets the StopSequences field's value.
func (*InferenceConfiguration) SetTemperature ¶ added in v1.53.13
func (s *InferenceConfiguration) SetTemperature(v float64) *InferenceConfiguration
SetTemperature sets the Temperature field's value.
func (*InferenceConfiguration) SetTopP ¶ added in v1.53.13
func (s *InferenceConfiguration) SetTopP(v float64) *InferenceConfiguration
SetTopP sets the TopP field's value.
func (InferenceConfiguration) String ¶ added in v1.53.13
func (s InferenceConfiguration) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*InferenceConfiguration) Validate ¶ added in v1.53.13
func (s *InferenceConfiguration) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type InternalServerException ¶
type InternalServerException struct { RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` // contains filtered or unexported fields }
An internal server error occurred. Retry your request.
func (*InternalServerException) Code ¶
func (s *InternalServerException) Code() string
Code returns the exception type name.
func (*InternalServerException) Error ¶
func (s *InternalServerException) Error() string
func (InternalServerException) GoString ¶
func (s InternalServerException) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*InternalServerException) MarshalEvent ¶
func (s *InternalServerException) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error)
MarshalEvent marshals the type into an stream event value. This method should only used internally within the SDK's EventStream handling.
func (*InternalServerException) Message ¶
func (s *InternalServerException) Message() string
Message returns the exception's message.
func (*InternalServerException) OrigErr ¶
func (s *InternalServerException) OrigErr() error
OrigErr always returns nil, satisfies awserr.Error interface.
func (*InternalServerException) RequestID ¶
func (s *InternalServerException) RequestID() string
RequestID returns the service's response RequestID for request.
func (*InternalServerException) StatusCode ¶
func (s *InternalServerException) StatusCode() int
Status code returns the HTTP status code for the request's response error.
func (InternalServerException) String ¶
func (s InternalServerException) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*InternalServerException) UnmarshalEvent ¶
func (s *InternalServerException) UnmarshalEvent( payloadUnmarshaler protocol.PayloadUnmarshaler, msg eventstream.Message, ) error
UnmarshalEvent unmarshals the EventStream Message into the InternalServerException value. This method is only used internally within the SDK's EventStream handling.
type InvokeModelInput ¶
type InvokeModelInput struct { // The desired MIME type of the inference body in the response. The default // value is application/json. Accept *string `location:"header" locationName:"Accept" type:"string"` // The prompt and inference parameters in the format specified in the contentType // in the header. You must provide the body in JSON format. To see the format // and content of the request and response bodies for different models, refer // to Inference parameters (https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html). // For more information, see Run inference (https://docs.aws.amazon.com/bedrock/latest/userguide/api-methods-run.html) // in the Bedrock User Guide. // // Body is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by InvokeModelInput's // String and GoString methods. // // Body is a required field Body []byte `locationName:"body" type:"blob" required:"true" sensitive:"true"` // The MIME type of the input data in the request. You must specify application/json. ContentType *string `location:"header" locationName:"Content-Type" type:"string"` // The unique identifier of the guardrail that you want to use. If you don't // provide a value, no guardrail is applied to the invocation. // // An error will be thrown in the following situations. // // * You don't provide a guardrail identifier but you specify the amazon-bedrock-guardrailConfig // field in the request body. // // * You enable the guardrail but the contentType isn't application/json. // // * You provide a guardrail identifier, but guardrailVersion isn't specified. GuardrailIdentifier *string `location:"header" locationName:"X-Amzn-Bedrock-GuardrailIdentifier" type:"string"` // The version number for the guardrail. The value can also be DRAFT. GuardrailVersion *string `location:"header" locationName:"X-Amzn-Bedrock-GuardrailVersion" type:"string"` // The unique identifier of the model to invoke to run inference. // // The modelId to provide depends on the type of model that you use: // // * If you use a base model, specify the model ID or its ARN. For a list // of model IDs for base models, see Amazon Bedrock base model IDs (on-demand // throughput) (https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns) // in the Amazon Bedrock User Guide. // // * If you use a provisioned model, specify the ARN of the Provisioned Throughput. // For more information, see Run inference using a Provisioned Throughput // (https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html) // in the Amazon Bedrock User Guide. // // * If you use a custom model, first purchase Provisioned Throughput for // it. Then specify the ARN of the resulting provisioned model. For more // information, see Use a custom model in Amazon Bedrock (https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html) // in the Amazon Bedrock User Guide. // // ModelId is a required field ModelId *string `location:"uri" locationName:"modelId" min:"1" type:"string" required:"true"` // Specifies whether to enable or disable the Bedrock trace. If enabled, you // can see the full Bedrock trace. Trace *string `location:"header" locationName:"X-Amzn-Bedrock-Trace" type:"string" enum:"Trace"` // contains filtered or unexported fields }
func (InvokeModelInput) GoString ¶
func (s InvokeModelInput) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*InvokeModelInput) SetAccept ¶
func (s *InvokeModelInput) SetAccept(v string) *InvokeModelInput
SetAccept sets the Accept field's value.
func (*InvokeModelInput) SetBody ¶
func (s *InvokeModelInput) SetBody(v []byte) *InvokeModelInput
SetBody sets the Body field's value.
func (*InvokeModelInput) SetContentType ¶
func (s *InvokeModelInput) SetContentType(v string) *InvokeModelInput
SetContentType sets the ContentType field's value.
func (*InvokeModelInput) SetGuardrailIdentifier ¶ added in v1.51.27
func (s *InvokeModelInput) SetGuardrailIdentifier(v string) *InvokeModelInput
SetGuardrailIdentifier sets the GuardrailIdentifier field's value.
func (*InvokeModelInput) SetGuardrailVersion ¶ added in v1.51.27
func (s *InvokeModelInput) SetGuardrailVersion(v string) *InvokeModelInput
SetGuardrailVersion sets the GuardrailVersion field's value.
func (*InvokeModelInput) SetModelId ¶
func (s *InvokeModelInput) SetModelId(v string) *InvokeModelInput
SetModelId sets the ModelId field's value.
func (*InvokeModelInput) SetTrace ¶ added in v1.51.27
func (s *InvokeModelInput) SetTrace(v string) *InvokeModelInput
SetTrace sets the Trace field's value.
func (InvokeModelInput) String ¶
func (s InvokeModelInput) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*InvokeModelInput) Validate ¶
func (s *InvokeModelInput) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type InvokeModelOutput ¶
type InvokeModelOutput struct { // Inference response from the model in the format specified in the contentType // header. To see the format and content of the request and response bodies // for different models, refer to Inference parameters (https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html). // // Body is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by InvokeModelOutput's // String and GoString methods. // // Body is a required field Body []byte `locationName:"body" type:"blob" required:"true" sensitive:"true"` // The MIME type of the inference result. // // ContentType is a required field ContentType *string `location:"header" locationName:"Content-Type" type:"string" required:"true"` // contains filtered or unexported fields }
func (InvokeModelOutput) GoString ¶
func (s InvokeModelOutput) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*InvokeModelOutput) SetBody ¶
func (s *InvokeModelOutput) SetBody(v []byte) *InvokeModelOutput
SetBody sets the Body field's value.
func (*InvokeModelOutput) SetContentType ¶
func (s *InvokeModelOutput) SetContentType(v string) *InvokeModelOutput
SetContentType sets the ContentType field's value.
func (InvokeModelOutput) String ¶
func (s InvokeModelOutput) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
type InvokeModelWithResponseStreamEventStream ¶
type InvokeModelWithResponseStreamEventStream struct { // Reader is the EventStream reader for the ResponseStream // events. This value is automatically set by the SDK when the API call is made // Use this member when unit testing your code with the SDK to mock out the // EventStream Reader. // // Must not be nil. Reader ResponseStreamReader // contains filtered or unexported fields }
InvokeModelWithResponseStreamEventStream provides the event stream handling for the InvokeModelWithResponseStream.
For testing and mocking the event stream this type should be initialized via the NewInvokeModelWithResponseStreamEventStream constructor function. Using the functional options to pass in nested mock behavior.
func NewInvokeModelWithResponseStreamEventStream ¶
func NewInvokeModelWithResponseStreamEventStream(opts ...func(*InvokeModelWithResponseStreamEventStream)) *InvokeModelWithResponseStreamEventStream
NewInvokeModelWithResponseStreamEventStream initializes an InvokeModelWithResponseStreamEventStream. This function should only be used for testing and mocking the InvokeModelWithResponseStreamEventStream stream within your application.
The Reader member must be set before reading events from the stream.
es := NewInvokeModelWithResponseStreamEventStream(func(o *InvokeModelWithResponseStreamEventStream){ es.Reader = myMockStreamReader })
func (*InvokeModelWithResponseStreamEventStream) Close ¶
func (es *InvokeModelWithResponseStreamEventStream) Close() (err error)
Close closes the stream. This will also cause the stream to be closed. Close must be called when done using the stream API. Not calling Close may result in resource leaks.
You can use the closing of the Reader's Events channel to terminate your application's read from the API's stream.
func (*InvokeModelWithResponseStreamEventStream) Err ¶
func (es *InvokeModelWithResponseStreamEventStream) Err() error
Err returns any error that occurred while reading or writing EventStream Events from the service API's response. Returns nil if there were no errors.
func (*InvokeModelWithResponseStreamEventStream) Events ¶
func (es *InvokeModelWithResponseStreamEventStream) Events() <-chan ResponseStreamEvent
Events returns a channel to read events from.
These events are:
- PayloadPart
- ResponseStreamUnknownEvent
type InvokeModelWithResponseStreamInput ¶
type InvokeModelWithResponseStreamInput struct { // The desired MIME type of the inference body in the response. The default // value is application/json. Accept *string `location:"header" locationName:"X-Amzn-Bedrock-Accept" type:"string"` // The prompt and inference parameters in the format specified in the contentType // in the header. You must provide the body in JSON format. To see the format // and content of the request and response bodies for different models, refer // to Inference parameters (https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html). // For more information, see Run inference (https://docs.aws.amazon.com/bedrock/latest/userguide/api-methods-run.html) // in the Bedrock User Guide. // // Body is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by InvokeModelWithResponseStreamInput's // String and GoString methods. // // Body is a required field Body []byte `locationName:"body" type:"blob" required:"true" sensitive:"true"` // The MIME type of the input data in the request. You must specify application/json. ContentType *string `location:"header" locationName:"Content-Type" type:"string"` // The unique identifier of the guardrail that you want to use. If you don't // provide a value, no guardrail is applied to the invocation. // // An error is thrown in the following situations. // // * You don't provide a guardrail identifier but you specify the amazon-bedrock-guardrailConfig // field in the request body. // // * You enable the guardrail but the contentType isn't application/json. // // * You provide a guardrail identifier, but guardrailVersion isn't specified. GuardrailIdentifier *string `location:"header" locationName:"X-Amzn-Bedrock-GuardrailIdentifier" type:"string"` // The version number for the guardrail. The value can also be DRAFT. GuardrailVersion *string `location:"header" locationName:"X-Amzn-Bedrock-GuardrailVersion" type:"string"` // The unique identifier of the model to invoke to run inference. // // The modelId to provide depends on the type of model that you use: // // * If you use a base model, specify the model ID or its ARN. For a list // of model IDs for base models, see Amazon Bedrock base model IDs (on-demand // throughput) (https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns) // in the Amazon Bedrock User Guide. // // * If you use a provisioned model, specify the ARN of the Provisioned Throughput. // For more information, see Run inference using a Provisioned Throughput // (https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html) // in the Amazon Bedrock User Guide. // // * If you use a custom model, first purchase Provisioned Throughput for // it. Then specify the ARN of the resulting provisioned model. For more // information, see Use a custom model in Amazon Bedrock (https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html) // in the Amazon Bedrock User Guide. // // ModelId is a required field ModelId *string `location:"uri" locationName:"modelId" min:"1" type:"string" required:"true"` // Specifies whether to enable or disable the Bedrock trace. If enabled, you // can see the full Bedrock trace. Trace *string `location:"header" locationName:"X-Amzn-Bedrock-Trace" type:"string" enum:"Trace"` // contains filtered or unexported fields }
func (InvokeModelWithResponseStreamInput) GoString ¶
func (s InvokeModelWithResponseStreamInput) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*InvokeModelWithResponseStreamInput) SetAccept ¶
func (s *InvokeModelWithResponseStreamInput) SetAccept(v string) *InvokeModelWithResponseStreamInput
SetAccept sets the Accept field's value.
func (*InvokeModelWithResponseStreamInput) SetBody ¶
func (s *InvokeModelWithResponseStreamInput) SetBody(v []byte) *InvokeModelWithResponseStreamInput
SetBody sets the Body field's value.
func (*InvokeModelWithResponseStreamInput) SetContentType ¶
func (s *InvokeModelWithResponseStreamInput) SetContentType(v string) *InvokeModelWithResponseStreamInput
SetContentType sets the ContentType field's value.
func (*InvokeModelWithResponseStreamInput) SetGuardrailIdentifier ¶ added in v1.51.27
func (s *InvokeModelWithResponseStreamInput) SetGuardrailIdentifier(v string) *InvokeModelWithResponseStreamInput
SetGuardrailIdentifier sets the GuardrailIdentifier field's value.
func (*InvokeModelWithResponseStreamInput) SetGuardrailVersion ¶ added in v1.51.27
func (s *InvokeModelWithResponseStreamInput) SetGuardrailVersion(v string) *InvokeModelWithResponseStreamInput
SetGuardrailVersion sets the GuardrailVersion field's value.
func (*InvokeModelWithResponseStreamInput) SetModelId ¶
func (s *InvokeModelWithResponseStreamInput) SetModelId(v string) *InvokeModelWithResponseStreamInput
SetModelId sets the ModelId field's value.
func (*InvokeModelWithResponseStreamInput) SetTrace ¶ added in v1.51.27
func (s *InvokeModelWithResponseStreamInput) SetTrace(v string) *InvokeModelWithResponseStreamInput
SetTrace sets the Trace field's value.
func (InvokeModelWithResponseStreamInput) String ¶
func (s InvokeModelWithResponseStreamInput) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*InvokeModelWithResponseStreamInput) Validate ¶
func (s *InvokeModelWithResponseStreamInput) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type InvokeModelWithResponseStreamOutput ¶
type InvokeModelWithResponseStreamOutput struct { // The MIME type of the inference result. // // ContentType is a required field ContentType *string `location:"header" locationName:"X-Amzn-Bedrock-Content-Type" type:"string" required:"true"` // contains filtered or unexported fields }
func (*InvokeModelWithResponseStreamOutput) GetStream ¶
func (s *InvokeModelWithResponseStreamOutput) GetStream() *InvokeModelWithResponseStreamEventStream
GetStream returns the type to interact with the event stream.
func (InvokeModelWithResponseStreamOutput) GoString ¶
func (s InvokeModelWithResponseStreamOutput) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*InvokeModelWithResponseStreamOutput) SetContentType ¶
func (s *InvokeModelWithResponseStreamOutput) SetContentType(v string) *InvokeModelWithResponseStreamOutput
SetContentType sets the ContentType field's value.
func (InvokeModelWithResponseStreamOutput) String ¶
func (s InvokeModelWithResponseStreamOutput) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
type Message ¶ added in v1.53.13
type Message struct { // The message content. Note the following restrictions: // // * You can include up to 20 images. Each image's size, height, and width // must be no more than 3.75 MB, 8000 px, and 8000 px, respectively. // // * You can include up to five documents. Each document's size must be no // more than 4.5 MB. // // * If you include a ContentBlock with a document field in the array, you // must also include a ContentBlock with a text field. // // * You can only include images and documents if the role is user. // // Content is a required field Content []*ContentBlock `locationName:"content" type:"list" required:"true"` // The role that the message plays in the message. // // Role is a required field Role *string `locationName:"role" type:"string" required:"true" enum:"ConversationRole"` // contains filtered or unexported fields }
A message input, or returned from, a call to Converse (https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html) or ConverseStream (https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html).
func (Message) GoString ¶ added in v1.53.13
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*Message) SetContent ¶ added in v1.53.13
func (s *Message) SetContent(v []*ContentBlock) *Message
SetContent sets the Content field's value.
type MessageStartEvent ¶ added in v1.53.13
type MessageStartEvent struct { // The role for the message. // // Role is a required field Role *string `locationName:"role" type:"string" required:"true" enum:"ConversationRole"` // contains filtered or unexported fields }
The start of a message.
func (MessageStartEvent) GoString ¶ added in v1.53.13
func (s MessageStartEvent) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*MessageStartEvent) MarshalEvent ¶ added in v1.53.13
func (s *MessageStartEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error)
MarshalEvent marshals the type into an stream event value. This method should only used internally within the SDK's EventStream handling.
func (*MessageStartEvent) SetRole ¶ added in v1.53.13
func (s *MessageStartEvent) SetRole(v string) *MessageStartEvent
SetRole sets the Role field's value.
func (MessageStartEvent) String ¶ added in v1.53.13
func (s MessageStartEvent) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*MessageStartEvent) UnmarshalEvent ¶ added in v1.53.13
func (s *MessageStartEvent) UnmarshalEvent( payloadUnmarshaler protocol.PayloadUnmarshaler, msg eventstream.Message, ) error
UnmarshalEvent unmarshals the EventStream Message into the MessageStartEvent value. This method is only used internally within the SDK's EventStream handling.
type MessageStopEvent ¶ added in v1.53.13
type MessageStopEvent struct { // The reason why the model stopped generating output. // // StopReason is a required field StopReason *string `locationName:"stopReason" type:"string" required:"true" enum:"StopReason"` // contains filtered or unexported fields }
The stop event for a message.
func (MessageStopEvent) GoString ¶ added in v1.53.13
func (s MessageStopEvent) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*MessageStopEvent) MarshalEvent ¶ added in v1.53.13
func (s *MessageStopEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error)
MarshalEvent marshals the type into an stream event value. This method should only used internally within the SDK's EventStream handling.
func (*MessageStopEvent) SetStopReason ¶ added in v1.53.13
func (s *MessageStopEvent) SetStopReason(v string) *MessageStopEvent
SetStopReason sets the StopReason field's value.
func (MessageStopEvent) String ¶ added in v1.53.13
func (s MessageStopEvent) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*MessageStopEvent) UnmarshalEvent ¶ added in v1.53.13
func (s *MessageStopEvent) UnmarshalEvent( payloadUnmarshaler protocol.PayloadUnmarshaler, msg eventstream.Message, ) error
UnmarshalEvent unmarshals the EventStream Message into the MessageStopEvent value. This method is only used internally within the SDK's EventStream handling.
type ModelErrorException ¶
type ModelErrorException struct { RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` // The original status code. OriginalStatusCode *int64 `locationName:"originalStatusCode" min:"100" type:"integer"` // The resource name. ResourceName *string `locationName:"resourceName" type:"string"` // contains filtered or unexported fields }
The request failed due to an error while processing the model.
func (*ModelErrorException) Code ¶
func (s *ModelErrorException) Code() string
Code returns the exception type name.
func (*ModelErrorException) Error ¶
func (s *ModelErrorException) Error() string
func (ModelErrorException) GoString ¶
func (s ModelErrorException) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ModelErrorException) Message ¶
func (s *ModelErrorException) Message() string
Message returns the exception's message.
func (*ModelErrorException) OrigErr ¶
func (s *ModelErrorException) OrigErr() error
OrigErr always returns nil, satisfies awserr.Error interface.
func (*ModelErrorException) RequestID ¶
func (s *ModelErrorException) RequestID() string
RequestID returns the service's response RequestID for request.
func (*ModelErrorException) StatusCode ¶
func (s *ModelErrorException) StatusCode() int
Status code returns the HTTP status code for the request's response error.
func (ModelErrorException) String ¶
func (s ModelErrorException) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
type ModelNotReadyException ¶
type ModelNotReadyException struct { RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` // contains filtered or unexported fields }
The model specified in the request is not ready to serve inference requests.
func (*ModelNotReadyException) Code ¶
func (s *ModelNotReadyException) Code() string
Code returns the exception type name.
func (*ModelNotReadyException) Error ¶
func (s *ModelNotReadyException) Error() string
func (ModelNotReadyException) GoString ¶
func (s ModelNotReadyException) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ModelNotReadyException) Message ¶
func (s *ModelNotReadyException) Message() string
Message returns the exception's message.
func (*ModelNotReadyException) OrigErr ¶
func (s *ModelNotReadyException) OrigErr() error
OrigErr always returns nil, satisfies awserr.Error interface.
func (*ModelNotReadyException) RequestID ¶
func (s *ModelNotReadyException) RequestID() string
RequestID returns the service's response RequestID for request.
func (*ModelNotReadyException) StatusCode ¶
func (s *ModelNotReadyException) StatusCode() int
Status code returns the HTTP status code for the request's response error.
func (ModelNotReadyException) String ¶
func (s ModelNotReadyException) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
type ModelStreamErrorException ¶
type ModelStreamErrorException struct { RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` // The original message. OriginalMessage *string `locationName:"originalMessage" type:"string"` // The original status code. OriginalStatusCode *int64 `locationName:"originalStatusCode" min:"100" type:"integer"` // contains filtered or unexported fields }
An error occurred while streaming the response. Retry your request.
func (*ModelStreamErrorException) Code ¶
func (s *ModelStreamErrorException) Code() string
Code returns the exception type name.
func (*ModelStreamErrorException) Error ¶
func (s *ModelStreamErrorException) Error() string
func (ModelStreamErrorException) GoString ¶
func (s ModelStreamErrorException) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ModelStreamErrorException) MarshalEvent ¶
func (s *ModelStreamErrorException) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error)
MarshalEvent marshals the type into an stream event value. This method should only used internally within the SDK's EventStream handling.
func (*ModelStreamErrorException) Message ¶
func (s *ModelStreamErrorException) Message() string
Message returns the exception's message.
func (*ModelStreamErrorException) OrigErr ¶
func (s *ModelStreamErrorException) OrigErr() error
OrigErr always returns nil, satisfies awserr.Error interface.
func (*ModelStreamErrorException) RequestID ¶
func (s *ModelStreamErrorException) RequestID() string
RequestID returns the service's response RequestID for request.
func (*ModelStreamErrorException) StatusCode ¶
func (s *ModelStreamErrorException) StatusCode() int
Status code returns the HTTP status code for the request's response error.
func (ModelStreamErrorException) String ¶
func (s ModelStreamErrorException) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ModelStreamErrorException) UnmarshalEvent ¶
func (s *ModelStreamErrorException) UnmarshalEvent( payloadUnmarshaler protocol.PayloadUnmarshaler, msg eventstream.Message, ) error
UnmarshalEvent unmarshals the EventStream Message into the ModelStreamErrorException value. This method is only used internally within the SDK's EventStream handling.
type ModelTimeoutException ¶
type ModelTimeoutException struct { RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` // contains filtered or unexported fields }
The request took too long to process. Processing time exceeded the model timeout length.
func (*ModelTimeoutException) Code ¶
func (s *ModelTimeoutException) Code() string
Code returns the exception type name.
func (*ModelTimeoutException) Error ¶
func (s *ModelTimeoutException) Error() string
func (ModelTimeoutException) GoString ¶
func (s ModelTimeoutException) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ModelTimeoutException) MarshalEvent ¶ added in v1.45.20
func (s *ModelTimeoutException) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error)
MarshalEvent marshals the type into an stream event value. This method should only used internally within the SDK's EventStream handling.
func (*ModelTimeoutException) Message ¶
func (s *ModelTimeoutException) Message() string
Message returns the exception's message.
func (*ModelTimeoutException) OrigErr ¶
func (s *ModelTimeoutException) OrigErr() error
OrigErr always returns nil, satisfies awserr.Error interface.
func (*ModelTimeoutException) RequestID ¶
func (s *ModelTimeoutException) RequestID() string
RequestID returns the service's response RequestID for request.
func (*ModelTimeoutException) StatusCode ¶
func (s *ModelTimeoutException) StatusCode() int
Status code returns the HTTP status code for the request's response error.
func (ModelTimeoutException) String ¶
func (s ModelTimeoutException) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ModelTimeoutException) UnmarshalEvent ¶ added in v1.45.20
func (s *ModelTimeoutException) UnmarshalEvent( payloadUnmarshaler protocol.PayloadUnmarshaler, msg eventstream.Message, ) error
UnmarshalEvent unmarshals the EventStream Message into the ModelTimeoutException value. This method is only used internally within the SDK's EventStream handling.
type PayloadPart ¶
type PayloadPart struct { // Base64-encoded bytes of payload data. // // Bytes is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by PayloadPart's // String and GoString methods. // // Bytes is automatically base64 encoded/decoded by the SDK. Bytes []byte `locationName:"bytes" type:"blob" sensitive:"true"` // contains filtered or unexported fields }
Payload content included in the response.
func (PayloadPart) GoString ¶
func (s PayloadPart) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*PayloadPart) MarshalEvent ¶
func (s *PayloadPart) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error)
MarshalEvent marshals the type into an stream event value. This method should only used internally within the SDK's EventStream handling.
func (*PayloadPart) SetBytes ¶
func (s *PayloadPart) SetBytes(v []byte) *PayloadPart
SetBytes sets the Bytes field's value.
func (PayloadPart) String ¶
func (s PayloadPart) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*PayloadPart) UnmarshalEvent ¶
func (s *PayloadPart) UnmarshalEvent( payloadUnmarshaler protocol.PayloadUnmarshaler, msg eventstream.Message, ) error
UnmarshalEvent unmarshals the EventStream Message into the PayloadPart value. This method is only used internally within the SDK's EventStream handling.
type ResourceNotFoundException ¶
type ResourceNotFoundException struct { RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` // contains filtered or unexported fields }
The specified resource ARN was not found. Check the ARN and try your request again.
func (*ResourceNotFoundException) Code ¶
func (s *ResourceNotFoundException) Code() string
Code returns the exception type name.
func (*ResourceNotFoundException) Error ¶
func (s *ResourceNotFoundException) Error() string
func (ResourceNotFoundException) GoString ¶
func (s ResourceNotFoundException) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ResourceNotFoundException) Message ¶
func (s *ResourceNotFoundException) Message() string
Message returns the exception's message.
func (*ResourceNotFoundException) OrigErr ¶
func (s *ResourceNotFoundException) OrigErr() error
OrigErr always returns nil, satisfies awserr.Error interface.
func (*ResourceNotFoundException) RequestID ¶
func (s *ResourceNotFoundException) RequestID() string
RequestID returns the service's response RequestID for request.
func (*ResourceNotFoundException) StatusCode ¶
func (s *ResourceNotFoundException) StatusCode() int
Status code returns the HTTP status code for the request's response error.
func (ResourceNotFoundException) String ¶
func (s ResourceNotFoundException) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
type ResponseStreamEvent ¶
type ResponseStreamEvent interface { eventstreamapi.Marshaler eventstreamapi.Unmarshaler // contains filtered or unexported methods }
ResponseStreamEvent groups together all EventStream events writes for ResponseStream.
These events are:
- PayloadPart
type ResponseStreamReader ¶
type ResponseStreamReader interface { // Returns a channel of events as they are read from the event stream. Events() <-chan ResponseStreamEvent // Close will stop the reader reading events from the stream. Close() error // Returns any error that has occurred while reading from the event stream. Err() error }
ResponseStreamReader provides the interface for reading to the stream. The default implementation for this interface will be ResponseStream.
The reader's Close method must allow multiple concurrent calls.
These events are:
- PayloadPart
- ResponseStreamUnknownEvent
type ResponseStreamUnknownEvent ¶
type ResponseStreamUnknownEvent struct { Type string Message eventstream.Message }
ResponseStreamUnknownEvent provides a failsafe event for the ResponseStream group of events when an unknown event is received.
func (*ResponseStreamUnknownEvent) MarshalEvent ¶
func (e *ResponseStreamUnknownEvent) MarshalEvent(pm protocol.PayloadMarshaler) ( msg eventstream.Message, err error, )
MarshalEvent marshals the type into an stream event value. This method should only used internally within the SDK's EventStream handling.
func (*ResponseStreamUnknownEvent) UnmarshalEvent ¶
func (e *ResponseStreamUnknownEvent) UnmarshalEvent( payloadUnmarshaler protocol.PayloadUnmarshaler, msg eventstream.Message, ) error
UnmarshalEvent unmarshals the EventStream Message into the ResponseStream value. This method is only used internally within the SDK's EventStream handling.
type ServiceQuotaExceededException ¶
type ServiceQuotaExceededException struct { RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` // contains filtered or unexported fields }
Your request exceeds the service quota for your account. You can view your quotas at Viewing service quotas (https://docs.aws.amazon.com/servicequotas/latest/userguide/gs-request-quota.html). You can resubmit your request later.
func (*ServiceQuotaExceededException) Code ¶
func (s *ServiceQuotaExceededException) Code() string
Code returns the exception type name.
func (*ServiceQuotaExceededException) Error ¶
func (s *ServiceQuotaExceededException) Error() string
func (ServiceQuotaExceededException) GoString ¶
func (s ServiceQuotaExceededException) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ServiceQuotaExceededException) Message ¶
func (s *ServiceQuotaExceededException) Message() string
Message returns the exception's message.
func (*ServiceQuotaExceededException) OrigErr ¶
func (s *ServiceQuotaExceededException) OrigErr() error
OrigErr always returns nil, satisfies awserr.Error interface.
func (*ServiceQuotaExceededException) RequestID ¶
func (s *ServiceQuotaExceededException) RequestID() string
RequestID returns the service's response RequestID for request.
func (*ServiceQuotaExceededException) StatusCode ¶
func (s *ServiceQuotaExceededException) StatusCode() int
Status code returns the HTTP status code for the request's response error.
func (ServiceQuotaExceededException) String ¶
func (s ServiceQuotaExceededException) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
type ServiceUnavailableException ¶ added in v1.55.3
type ServiceUnavailableException struct { // contains filtered or unexported fields }
The service isn't currently available. Try again later.
func (*ServiceUnavailableException) Code ¶ added in v1.55.3
func (s *ServiceUnavailableException) Code() string
Code returns the exception type name.
func (*ServiceUnavailableException) Error ¶ added in v1.55.3
func (s *ServiceUnavailableException) Error() string
func (ServiceUnavailableException) GoString ¶ added in v1.55.3
func (s ServiceUnavailableException) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ServiceUnavailableException) MarshalEvent ¶ added in v1.55.3
func (s *ServiceUnavailableException) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error)
MarshalEvent marshals the type into an stream event value. This method should only used internally within the SDK's EventStream handling.
func (*ServiceUnavailableException) Message ¶ added in v1.55.3
func (s *ServiceUnavailableException) Message() string
Message returns the exception's message.
func (*ServiceUnavailableException) OrigErr ¶ added in v1.55.3
func (s *ServiceUnavailableException) OrigErr() error
OrigErr always returns nil, satisfies awserr.Error interface.
func (*ServiceUnavailableException) RequestID ¶ added in v1.55.3
func (s *ServiceUnavailableException) RequestID() string
RequestID returns the service's response RequestID for request.
func (*ServiceUnavailableException) StatusCode ¶ added in v1.55.3
func (s *ServiceUnavailableException) StatusCode() int
Status code returns the HTTP status code for the request's response error.
func (ServiceUnavailableException) String ¶ added in v1.55.3
func (s ServiceUnavailableException) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ServiceUnavailableException) UnmarshalEvent ¶ added in v1.55.3
func (s *ServiceUnavailableException) UnmarshalEvent( payloadUnmarshaler protocol.PayloadUnmarshaler, msg eventstream.Message, ) error
UnmarshalEvent unmarshals the EventStream Message into the ServiceUnavailableException value. This method is only used internally within the SDK's EventStream handling.
type SpecificToolChoice ¶ added in v1.53.13
type SpecificToolChoice struct { // The name of the tool that the model must request. // // Name is a required field Name *string `locationName:"name" min:"1" type:"string" required:"true"` // contains filtered or unexported fields }
The model must request a specific tool. For example, {"tool" : {"name" : "Your tool name"}}.
This field is only supported by Anthropic Claude 3 models.
func (SpecificToolChoice) GoString ¶ added in v1.53.13
func (s SpecificToolChoice) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*SpecificToolChoice) SetName ¶ added in v1.53.13
func (s *SpecificToolChoice) SetName(v string) *SpecificToolChoice
SetName sets the Name field's value.
func (SpecificToolChoice) String ¶ added in v1.53.13
func (s SpecificToolChoice) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*SpecificToolChoice) Validate ¶ added in v1.53.13
func (s *SpecificToolChoice) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type SystemContentBlock ¶ added in v1.53.13
type SystemContentBlock struct { // A content block to assess with the guardrail. Use with the Converse (https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html) // or ConverseStream (https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html) // API operations. // // For more information, see Use a guardrail with the Converse API in the Amazon // Bedrock User Guide. GuardContent *GuardrailConverseContentBlock `locationName:"guardContent" type:"structure"` // A system prompt for the model. Text *string `locationName:"text" min:"1" type:"string"` // contains filtered or unexported fields }
A system content block.
func (SystemContentBlock) GoString ¶ added in v1.53.13
func (s SystemContentBlock) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*SystemContentBlock) SetGuardContent ¶ added in v1.54.4
func (s *SystemContentBlock) SetGuardContent(v *GuardrailConverseContentBlock) *SystemContentBlock
SetGuardContent sets the GuardContent field's value.
func (*SystemContentBlock) SetText ¶ added in v1.53.13
func (s *SystemContentBlock) SetText(v string) *SystemContentBlock
SetText sets the Text field's value.
func (SystemContentBlock) String ¶ added in v1.53.13
func (s SystemContentBlock) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*SystemContentBlock) Validate ¶ added in v1.53.13
func (s *SystemContentBlock) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type ThrottlingException ¶
type ThrottlingException struct { RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` // contains filtered or unexported fields }
Your request was throttled because of service-wide limitations. Resubmit your request later or in a different region. You can also purchase Provisioned Throughput (https://docs.aws.amazon.com/bedrock/latest/userguide/prov-throughput.html) to increase the rate or number of tokens you can process.
func (*ThrottlingException) Code ¶
func (s *ThrottlingException) Code() string
Code returns the exception type name.
func (*ThrottlingException) Error ¶
func (s *ThrottlingException) Error() string
func (ThrottlingException) GoString ¶
func (s ThrottlingException) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ThrottlingException) MarshalEvent ¶
func (s *ThrottlingException) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error)
MarshalEvent marshals the type into an stream event value. This method should only used internally within the SDK's EventStream handling.
func (*ThrottlingException) Message ¶
func (s *ThrottlingException) Message() string
Message returns the exception's message.
func (*ThrottlingException) OrigErr ¶
func (s *ThrottlingException) OrigErr() error
OrigErr always returns nil, satisfies awserr.Error interface.
func (*ThrottlingException) RequestID ¶
func (s *ThrottlingException) RequestID() string
RequestID returns the service's response RequestID for request.
func (*ThrottlingException) StatusCode ¶
func (s *ThrottlingException) StatusCode() int
Status code returns the HTTP status code for the request's response error.
func (ThrottlingException) String ¶
func (s ThrottlingException) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ThrottlingException) UnmarshalEvent ¶
func (s *ThrottlingException) UnmarshalEvent( payloadUnmarshaler protocol.PayloadUnmarshaler, msg eventstream.Message, ) error
UnmarshalEvent unmarshals the EventStream Message into the ThrottlingException value. This method is only used internally within the SDK's EventStream handling.
type TokenUsage ¶ added in v1.53.13
type TokenUsage struct { // The number of tokens sent in the request to the model. // // InputTokens is a required field InputTokens *int64 `locationName:"inputTokens" type:"integer" required:"true"` // The number of tokens that the model generated for the request. // // OutputTokens is a required field OutputTokens *int64 `locationName:"outputTokens" type:"integer" required:"true"` // The total of input tokens and tokens generated by the model. // // TotalTokens is a required field TotalTokens *int64 `locationName:"totalTokens" type:"integer" required:"true"` // contains filtered or unexported fields }
The tokens used in a message API inference call.
func (TokenUsage) GoString ¶ added in v1.53.13
func (s TokenUsage) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*TokenUsage) SetInputTokens ¶ added in v1.53.13
func (s *TokenUsage) SetInputTokens(v int64) *TokenUsage
SetInputTokens sets the InputTokens field's value.
func (*TokenUsage) SetOutputTokens ¶ added in v1.53.13
func (s *TokenUsage) SetOutputTokens(v int64) *TokenUsage
SetOutputTokens sets the OutputTokens field's value.
func (*TokenUsage) SetTotalTokens ¶ added in v1.53.13
func (s *TokenUsage) SetTotalTokens(v int64) *TokenUsage
SetTotalTokens sets the TotalTokens field's value.
func (TokenUsage) String ¶ added in v1.53.13
func (s TokenUsage) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
type Tool ¶ added in v1.53.13
type Tool struct { // The specfication for the tool. ToolSpec *ToolSpecification `locationName:"toolSpec" type:"structure"` // contains filtered or unexported fields }
Information about a tool that you can use with the Converse API. For more information, see Tool use (function calling) (https://docs.aws.amazon.com/bedrock/latest/userguide/tool-use.html) in the Amazon Bedrock User Guide.
func (Tool) GoString ¶ added in v1.53.13
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*Tool) SetToolSpec ¶ added in v1.53.13
func (s *Tool) SetToolSpec(v *ToolSpecification) *Tool
SetToolSpec sets the ToolSpec field's value.
type ToolChoice ¶ added in v1.53.13
type ToolChoice struct { // The model must request at least one tool (no text is generated). Any *AnyToolChoice `locationName:"any" type:"structure"` // (Default). The Model automatically decides if a tool should be called or // whether to generate text instead. Auto *AutoToolChoice `locationName:"auto" type:"structure"` // The Model must request the specified tool. Only supported by Anthropic Claude // 3 models. Tool *SpecificToolChoice `locationName:"tool" type:"structure"` // contains filtered or unexported fields }
Determines which tools the model should request in a call to Converse or ConverseStream. ToolChoice is only supported by Anthropic Claude 3 models and by Mistral AI Mistral Large.
func (ToolChoice) GoString ¶ added in v1.53.13
func (s ToolChoice) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ToolChoice) SetAny ¶ added in v1.53.13
func (s *ToolChoice) SetAny(v *AnyToolChoice) *ToolChoice
SetAny sets the Any field's value.
func (*ToolChoice) SetAuto ¶ added in v1.53.13
func (s *ToolChoice) SetAuto(v *AutoToolChoice) *ToolChoice
SetAuto sets the Auto field's value.
func (*ToolChoice) SetTool ¶ added in v1.53.13
func (s *ToolChoice) SetTool(v *SpecificToolChoice) *ToolChoice
SetTool sets the Tool field's value.
func (ToolChoice) String ¶ added in v1.53.13
func (s ToolChoice) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ToolChoice) Validate ¶ added in v1.53.13
func (s *ToolChoice) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type ToolConfiguration ¶ added in v1.53.13
type ToolConfiguration struct { // If supported by model, forces the model to request a tool. ToolChoice *ToolChoice `locationName:"toolChoice" type:"structure"` // An array of tools that you want to pass to a model. // // Tools is a required field Tools []*Tool `locationName:"tools" min:"1" type:"list" required:"true"` // contains filtered or unexported fields }
Configuration information for the tools that you pass to a model. For more information, see Tool use (function calling) (https://docs.aws.amazon.com/bedrock/latest/userguide/tool-use.html) in the Amazon Bedrock User Guide.
This field is only supported by Anthropic Claude 3, Cohere Command R, Cohere Command R+, and Mistral Large models.
func (ToolConfiguration) GoString ¶ added in v1.53.13
func (s ToolConfiguration) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ToolConfiguration) SetToolChoice ¶ added in v1.53.13
func (s *ToolConfiguration) SetToolChoice(v *ToolChoice) *ToolConfiguration
SetToolChoice sets the ToolChoice field's value.
func (*ToolConfiguration) SetTools ¶ added in v1.53.13
func (s *ToolConfiguration) SetTools(v []*Tool) *ToolConfiguration
SetTools sets the Tools field's value.
func (ToolConfiguration) String ¶ added in v1.53.13
func (s ToolConfiguration) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ToolConfiguration) Validate ¶ added in v1.53.13
func (s *ToolConfiguration) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type ToolInputSchema ¶ added in v1.53.13
type ToolInputSchema struct {
// contains filtered or unexported fields
}
The schema for the tool. The top level schema type must be object.
func (ToolInputSchema) GoString ¶ added in v1.53.13
func (s ToolInputSchema) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (ToolInputSchema) String ¶ added in v1.53.13
func (s ToolInputSchema) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
type ToolResultBlock ¶ added in v1.53.13
type ToolResultBlock struct { // The content for tool result content block. // // Content is a required field Content []*ToolResultContentBlock `locationName:"content" type:"list" required:"true"` // The status for the tool result content block. // // This field is only supported Anthropic Claude 3 models. Status *string `locationName:"status" type:"string" enum:"ToolResultStatus"` // The ID of the tool request that this is the result for. // // ToolUseId is a required field ToolUseId *string `locationName:"toolUseId" min:"1" type:"string" required:"true"` // contains filtered or unexported fields }
A tool result block that contains the results for a tool request that the model previously made.
func (ToolResultBlock) GoString ¶ added in v1.53.13
func (s ToolResultBlock) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ToolResultBlock) SetContent ¶ added in v1.53.13
func (s *ToolResultBlock) SetContent(v []*ToolResultContentBlock) *ToolResultBlock
SetContent sets the Content field's value.
func (*ToolResultBlock) SetStatus ¶ added in v1.53.13
func (s *ToolResultBlock) SetStatus(v string) *ToolResultBlock
SetStatus sets the Status field's value.
func (*ToolResultBlock) SetToolUseId ¶ added in v1.53.13
func (s *ToolResultBlock) SetToolUseId(v string) *ToolResultBlock
SetToolUseId sets the ToolUseId field's value.
func (ToolResultBlock) String ¶ added in v1.53.13
func (s ToolResultBlock) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ToolResultBlock) Validate ¶ added in v1.53.13
func (s *ToolResultBlock) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type ToolResultContentBlock ¶ added in v1.53.13
type ToolResultContentBlock struct { // A tool result that is a document. Document *DocumentBlock `locationName:"document" type:"structure"` // A tool result that is an image. // // This field is only supported by Anthropic Claude 3 models. Image *ImageBlock `locationName:"image" type:"structure"` // A tool result that is text. Text *string `locationName:"text" type:"string"` // contains filtered or unexported fields }
The tool result content block.
func (ToolResultContentBlock) GoString ¶ added in v1.53.13
func (s ToolResultContentBlock) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ToolResultContentBlock) SetDocument ¶ added in v1.54.6
func (s *ToolResultContentBlock) SetDocument(v *DocumentBlock) *ToolResultContentBlock
SetDocument sets the Document field's value.
func (*ToolResultContentBlock) SetImage ¶ added in v1.53.13
func (s *ToolResultContentBlock) SetImage(v *ImageBlock) *ToolResultContentBlock
SetImage sets the Image field's value.
func (*ToolResultContentBlock) SetText ¶ added in v1.53.13
func (s *ToolResultContentBlock) SetText(v string) *ToolResultContentBlock
SetText sets the Text field's value.
func (ToolResultContentBlock) String ¶ added in v1.53.13
func (s ToolResultContentBlock) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ToolResultContentBlock) Validate ¶ added in v1.53.13
func (s *ToolResultContentBlock) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type ToolSpecification ¶ added in v1.53.13
type ToolSpecification struct { // The description for the tool. Description *string `locationName:"description" min:"1" type:"string"` // The input schema for the tool in JSON format. // // InputSchema is a required field InputSchema *ToolInputSchema `locationName:"inputSchema" type:"structure" required:"true"` // The name for the tool. // // Name is a required field Name *string `locationName:"name" min:"1" type:"string" required:"true"` // contains filtered or unexported fields }
The specification for the tool.
func (ToolSpecification) GoString ¶ added in v1.53.13
func (s ToolSpecification) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ToolSpecification) SetDescription ¶ added in v1.53.13
func (s *ToolSpecification) SetDescription(v string) *ToolSpecification
SetDescription sets the Description field's value.
func (*ToolSpecification) SetInputSchema ¶ added in v1.53.13
func (s *ToolSpecification) SetInputSchema(v *ToolInputSchema) *ToolSpecification
SetInputSchema sets the InputSchema field's value.
func (*ToolSpecification) SetName ¶ added in v1.53.13
func (s *ToolSpecification) SetName(v string) *ToolSpecification
SetName sets the Name field's value.
func (ToolSpecification) String ¶ added in v1.53.13
func (s ToolSpecification) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ToolSpecification) Validate ¶ added in v1.53.13
func (s *ToolSpecification) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type ToolUseBlockDelta ¶ added in v1.53.13
type ToolUseBlockDelta struct { // The input for a requested tool. // // Input is a required field Input *string `locationName:"input" type:"string" required:"true"` // contains filtered or unexported fields }
The delta for a tool use block.
func (ToolUseBlockDelta) GoString ¶ added in v1.53.13
func (s ToolUseBlockDelta) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ToolUseBlockDelta) SetInput ¶ added in v1.53.13
func (s *ToolUseBlockDelta) SetInput(v string) *ToolUseBlockDelta
SetInput sets the Input field's value.
func (ToolUseBlockDelta) String ¶ added in v1.53.13
func (s ToolUseBlockDelta) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
type ToolUseBlockStart ¶ added in v1.53.13
type ToolUseBlockStart struct { // The name of the tool that the model is requesting to use. // // Name is a required field Name *string `locationName:"name" min:"1" type:"string" required:"true"` // The ID for the tool request. // // ToolUseId is a required field ToolUseId *string `locationName:"toolUseId" min:"1" type:"string" required:"true"` // contains filtered or unexported fields }
The start of a tool use block.
func (ToolUseBlockStart) GoString ¶ added in v1.53.13
func (s ToolUseBlockStart) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ToolUseBlockStart) SetName ¶ added in v1.53.13
func (s *ToolUseBlockStart) SetName(v string) *ToolUseBlockStart
SetName sets the Name field's value.
func (*ToolUseBlockStart) SetToolUseId ¶ added in v1.53.13
func (s *ToolUseBlockStart) SetToolUseId(v string) *ToolUseBlockStart
SetToolUseId sets the ToolUseId field's value.
func (ToolUseBlockStart) String ¶ added in v1.53.13
func (s ToolUseBlockStart) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
type ValidationException ¶
type ValidationException struct { RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` // contains filtered or unexported fields }
Input validation failed. Check your request parameters and retry the request.
func (*ValidationException) Code ¶
func (s *ValidationException) Code() string
Code returns the exception type name.
func (*ValidationException) Error ¶
func (s *ValidationException) Error() string
func (ValidationException) GoString ¶
func (s ValidationException) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ValidationException) MarshalEvent ¶
func (s *ValidationException) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error)
MarshalEvent marshals the type into an stream event value. This method should only used internally within the SDK's EventStream handling.
func (*ValidationException) Message ¶
func (s *ValidationException) Message() string
Message returns the exception's message.
func (*ValidationException) OrigErr ¶
func (s *ValidationException) OrigErr() error
OrigErr always returns nil, satisfies awserr.Error interface.
func (*ValidationException) RequestID ¶
func (s *ValidationException) RequestID() string
RequestID returns the service's response RequestID for request.
func (*ValidationException) StatusCode ¶
func (s *ValidationException) StatusCode() int
Status code returns the HTTP status code for the request's response error.
func (ValidationException) String ¶
func (s ValidationException) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ValidationException) UnmarshalEvent ¶
func (s *ValidationException) UnmarshalEvent( payloadUnmarshaler protocol.PayloadUnmarshaler, msg eventstream.Message, ) error
UnmarshalEvent unmarshals the EventStream Message into the ValidationException value. This method is only used internally within the SDK's EventStream handling.
Directories ¶
Path | Synopsis |
---|---|
Package bedrockruntimeiface provides an interface to enable mocking the Amazon Bedrock Runtime service client for testing your code.
|
Package bedrockruntimeiface provides an interface to enable mocking the Amazon Bedrock Runtime service client for testing your code. |