Documentation ¶
Index ¶
- type AccessDeniedException
- type AnyToolChoice
- type AsyncInvokeOutputDataConfig
- type AsyncInvokeOutputDataConfigMemberS3OutputDataConfig
- type AsyncInvokeS3OutputDataConfig
- type AsyncInvokeStatus
- type AsyncInvokeSummary
- type AutoToolChoice
- type ConflictException
- type ContentBlock
- type ContentBlockDelta
- type ContentBlockDeltaEvent
- type ContentBlockDeltaMemberText
- type ContentBlockDeltaMemberToolUse
- type ContentBlockMemberDocument
- type ContentBlockMemberGuardContent
- type ContentBlockMemberImage
- type ContentBlockMemberText
- type ContentBlockMemberToolResult
- type ContentBlockMemberToolUse
- type ContentBlockMemberVideo
- type ContentBlockStart
- type ContentBlockStartEvent
- type ContentBlockStartMemberToolUse
- type ContentBlockStopEvent
- type ConversationRole
- type ConverseMetrics
- type ConverseOutput
- type ConverseOutputMemberMessage
- type ConverseStreamMetadataEvent
- type ConverseStreamMetrics
- type ConverseStreamOutput
- type ConverseStreamOutputMemberContentBlockDelta
- type ConverseStreamOutputMemberContentBlockStart
- type ConverseStreamOutputMemberContentBlockStop
- type ConverseStreamOutputMemberMessageStart
- type ConverseStreamOutputMemberMessageStop
- type ConverseStreamOutputMemberMetadata
- type ConverseStreamTrace
- type ConverseTrace
- type DocumentBlock
- type DocumentFormat
- type DocumentSource
- type DocumentSourceMemberBytes
- type GuardrailAction
- type GuardrailAssessment
- type GuardrailConfiguration
- type GuardrailContentBlock
- type GuardrailContentBlockMemberImage
- type GuardrailContentBlockMemberText
- type GuardrailContentFilter
- type GuardrailContentFilterConfidence
- type GuardrailContentFilterStrength
- type GuardrailContentFilterType
- type GuardrailContentPolicyAction
- type GuardrailContentPolicyAssessment
- type GuardrailContentQualifier
- type GuardrailContentSource
- type GuardrailContextualGroundingFilter
- type GuardrailContextualGroundingFilterType
- type GuardrailContextualGroundingPolicyAction
- type GuardrailContextualGroundingPolicyAssessment
- type GuardrailConverseContentBlock
- type GuardrailConverseContentBlockMemberImage
- type GuardrailConverseContentBlockMemberText
- type GuardrailConverseContentQualifier
- type GuardrailConverseImageBlock
- type GuardrailConverseImageFormat
- type GuardrailConverseImageSource
- type GuardrailConverseImageSourceMemberBytes
- type GuardrailConverseTextBlock
- type GuardrailCoverage
- type GuardrailCustomWord
- type GuardrailImageBlock
- type GuardrailImageCoverage
- type GuardrailImageFormat
- type GuardrailImageSource
- type GuardrailImageSourceMemberBytes
- type GuardrailInvocationMetrics
- type GuardrailManagedWord
- type GuardrailManagedWordType
- type GuardrailOutputContent
- type GuardrailPiiEntityFilter
- type GuardrailPiiEntityType
- type GuardrailRegexFilter
- type GuardrailSensitiveInformationPolicyAction
- type GuardrailSensitiveInformationPolicyAssessment
- type GuardrailStreamConfiguration
- type GuardrailStreamProcessingMode
- type GuardrailTextBlock
- type GuardrailTextCharactersCoverage
- type GuardrailTopic
- type GuardrailTopicPolicyAction
- type GuardrailTopicPolicyAssessment
- type GuardrailTopicType
- type GuardrailTrace
- type GuardrailTraceAssessment
- type GuardrailUsage
- type GuardrailWordPolicyAction
- type GuardrailWordPolicyAssessment
- type ImageBlock
- type ImageFormat
- type ImageSource
- type ImageSourceMemberBytes
- type InferenceConfiguration
- type InternalServerException
- type Message
- type MessageStartEvent
- type MessageStopEvent
- type ModelErrorException
- type ModelNotReadyException
- type ModelStreamErrorException
- type ModelTimeoutException
- type PayloadPart
- type PerformanceConfigLatency
- type PerformanceConfiguration
- type PromptRouterTrace
- type PromptVariableValues
- type PromptVariableValuesMemberText
- type ResourceNotFoundException
- type ResponseStream
- type ResponseStreamMemberChunk
- type S3Location
- type ServiceQuotaExceededException
- type ServiceUnavailableException
- type SortAsyncInvocationBy
- type SortOrder
- type SpecificToolChoice
- type StopReason
- type SystemContentBlock
- type SystemContentBlockMemberGuardContent
- type SystemContentBlockMemberText
- type Tag
- type ThrottlingException
- type TokenUsage
- type Tool
- type ToolChoice
- type ToolChoiceMemberAny
- type ToolChoiceMemberAuto
- type ToolChoiceMemberTool
- type ToolConfiguration
- type ToolInputSchema
- type ToolInputSchemaMemberJson
- type ToolMemberToolSpec
- type ToolResultBlock
- type ToolResultContentBlock
- type ToolResultContentBlockMemberDocument
- type ToolResultContentBlockMemberImage
- type ToolResultContentBlockMemberJson
- type ToolResultContentBlockMemberText
- type ToolResultContentBlockMemberVideo
- type ToolResultStatus
- type ToolSpecification
- type ToolUseBlock
- type ToolUseBlockDelta
- type ToolUseBlockStart
- type Trace
- type UnknownUnionMember
- type ValidationException
- type VideoBlock
- type VideoFormat
- type VideoSource
- type VideoSourceMemberBytes
- type VideoSourceMemberS3Location
Examples ¶
- AsyncInvokeOutputDataConfig (OutputUsage)
- ContentBlock (OutputUsage)
- ContentBlockDelta (OutputUsage)
- ContentBlockStart (OutputUsage)
- ConverseOutput (OutputUsage)
- ConverseStreamOutput (OutputUsage)
- DocumentSource (OutputUsage)
- GuardrailContentBlock (OutputUsage)
- GuardrailConverseContentBlock (OutputUsage)
- GuardrailConverseImageSource (OutputUsage)
- GuardrailImageSource (OutputUsage)
- ImageSource (OutputUsage)
- PromptVariableValues (OutputUsage)
- ResponseStream (OutputUsage)
- SystemContentBlock (OutputUsage)
- Tool (OutputUsage)
- ToolChoice (OutputUsage)
- ToolInputSchema (OutputUsage)
- ToolResultContentBlock (OutputUsage)
- VideoSource (OutputUsage)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessDeniedException ¶
type AccessDeniedException struct { Message *string ErrorCodeOverride *string // contains filtered or unexported fields }
The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error, see AccessDeniedExceptionin the Amazon Bedrock User Guide
func (*AccessDeniedException) Error ¶
func (e *AccessDeniedException) Error() string
func (*AccessDeniedException) ErrorCode ¶
func (e *AccessDeniedException) ErrorCode() string
func (*AccessDeniedException) ErrorFault ¶
func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault
func (*AccessDeniedException) ErrorMessage ¶
func (e *AccessDeniedException) ErrorMessage() string
type AnyToolChoice ¶ added in v1.9.0
type AnyToolChoice struct {
// contains filtered or unexported fields
}
The model must request at least one tool (no text is generated). For example, {"any" : {}} .
type AsyncInvokeOutputDataConfig ¶ added in v1.22.0
type AsyncInvokeOutputDataConfig interface {
// contains filtered or unexported methods
}
Asynchronous invocation output data settings.
The following types satisfy this interface:
AsyncInvokeOutputDataConfigMemberS3OutputDataConfig
Example (OutputUsage) ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/bedrockruntime/types" ) func main() { var union types.AsyncInvokeOutputDataConfig // type switches can be used to check the union value switch v := union.(type) { case *types.AsyncInvokeOutputDataConfigMemberS3OutputDataConfig: _ = v.Value // Value is types.AsyncInvokeS3OutputDataConfig case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) default: fmt.Println("union is nil or unknown type") } }
Output:
type AsyncInvokeOutputDataConfigMemberS3OutputDataConfig ¶ added in v1.22.0
type AsyncInvokeOutputDataConfigMemberS3OutputDataConfig struct { Value AsyncInvokeS3OutputDataConfig // contains filtered or unexported fields }
A storage location for the output data in an S3 bucket
type AsyncInvokeS3OutputDataConfig ¶ added in v1.22.0
type AsyncInvokeS3OutputDataConfig struct { // An object URI starting with s3:// . // // This member is required. S3Uri *string // If the bucket belongs to another AWS account, specify that account's ID. BucketOwner *string // A KMS encryption key ID. KmsKeyId *string // contains filtered or unexported fields }
Asynchronous invocation output data settings.
type AsyncInvokeStatus ¶ added in v1.22.0
type AsyncInvokeStatus string
const ( AsyncInvokeStatusInProgress AsyncInvokeStatus = "InProgress" AsyncInvokeStatusCompleted AsyncInvokeStatus = "Completed" AsyncInvokeStatusFailed AsyncInvokeStatus = "Failed" )
Enum values for AsyncInvokeStatus
func (AsyncInvokeStatus) Values ¶ added in v1.22.0
func (AsyncInvokeStatus) Values() []AsyncInvokeStatus
Values returns all known values for AsyncInvokeStatus. Note that this can be expanded in the future, and so it is only as up to date as the client.
The ordering of this slice is not guaranteed to be stable across updates.
type AsyncInvokeSummary ¶ added in v1.22.0
type AsyncInvokeSummary struct { // The invocation's ARN. // // This member is required. InvocationArn *string // The invoked model's ARN. // // This member is required. ModelArn *string // The invocation's output data settings. // // This member is required. OutputDataConfig AsyncInvokeOutputDataConfig // When the invocation was submitted. // // This member is required. SubmitTime *time.Time // The invocation's idempotency token. ClientRequestToken *string // When the invocation ended. EndTime *time.Time // An error message. FailureMessage *string // When the invocation was last modified. LastModifiedTime *time.Time // The invocation's status. Status AsyncInvokeStatus // contains filtered or unexported fields }
A summary of an asynchronous invocation.
type AutoToolChoice ¶ added in v1.9.0
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" : {}} .
type ConflictException ¶ added in v1.22.0
type ConflictException struct { Message *string ErrorCodeOverride *string // contains filtered or unexported fields }
Error occurred because of a conflict while performing an operation.
func (*ConflictException) Error ¶ added in v1.22.0
func (e *ConflictException) Error() string
func (*ConflictException) ErrorCode ¶ added in v1.22.0
func (e *ConflictException) ErrorCode() string
func (*ConflictException) ErrorFault ¶ added in v1.22.0
func (e *ConflictException) ErrorFault() smithy.ErrorFault
func (*ConflictException) ErrorMessage ¶ added in v1.22.0
func (e *ConflictException) ErrorMessage() string
type ContentBlock ¶ added in v1.9.0
type ContentBlock interface {
// contains filtered or unexported methods
}
A block of content for a message that you pass to, or receive from, a model with the Converseor ConverseStream API operations.
The following types satisfy this interface:
ContentBlockMemberDocument ContentBlockMemberGuardContent ContentBlockMemberImage ContentBlockMemberText ContentBlockMemberToolResult ContentBlockMemberToolUse ContentBlockMemberVideo
Example (OutputUsage) ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/bedrockruntime/types" ) func main() { var union types.ContentBlock // type switches can be used to check the union value switch v := union.(type) { case *types.ContentBlockMemberDocument: _ = v.Value // Value is types.DocumentBlock case *types.ContentBlockMemberGuardContent: _ = v.Value // Value is types.GuardrailConverseContentBlock case *types.ContentBlockMemberImage: _ = v.Value // Value is types.ImageBlock case *types.ContentBlockMemberText: _ = v.Value // Value is string case *types.ContentBlockMemberToolResult: _ = v.Value // Value is types.ToolResultBlock case *types.ContentBlockMemberToolUse: _ = v.Value // Value is types.ToolUseBlock case *types.ContentBlockMemberVideo: _ = v.Value // Value is types.VideoBlock case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) default: fmt.Println("union is nil or unknown type") } }
Output:
type ContentBlockDelta ¶ added in v1.9.0
type ContentBlockDelta interface {
// contains filtered or unexported methods
}
A bock of content in a streaming response.
The following types satisfy this interface:
ContentBlockDeltaMemberText ContentBlockDeltaMemberToolUse
Example (OutputUsage) ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/bedrockruntime/types" ) func main() { var union types.ContentBlockDelta // type switches can be used to check the union value switch v := union.(type) { case *types.ContentBlockDeltaMemberText: _ = v.Value // Value is string case *types.ContentBlockDeltaMemberToolUse: _ = v.Value // Value is types.ToolUseBlockDelta case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) default: fmt.Println("union is nil or unknown type") } }
Output:
type ContentBlockDeltaEvent ¶ added in v1.9.0
type ContentBlockDeltaEvent struct { // The block index for a content block delta event. // // This member is required. ContentBlockIndex *int32 // The delta for a content block delta event. // // This member is required. Delta ContentBlockDelta // contains filtered or unexported fields }
The content block delta event.
type ContentBlockDeltaMemberText ¶ added in v1.9.0
type ContentBlockDeltaMemberText struct { Value string // contains filtered or unexported fields }
The content text.
type ContentBlockDeltaMemberToolUse ¶ added in v1.9.0
type ContentBlockDeltaMemberToolUse struct { Value ToolUseBlockDelta // contains filtered or unexported fields }
Information about a tool that the model is requesting to use.
type ContentBlockMemberDocument ¶ added in v1.11.0
type ContentBlockMemberDocument struct { Value DocumentBlock // contains filtered or unexported fields }
A document to include in the message.
type ContentBlockMemberGuardContent ¶ added in v1.10.0
type ContentBlockMemberGuardContent struct { Value GuardrailConverseContentBlock // contains filtered or unexported fields }
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.
For more information, see Use a guardrail with the Converse API in the Amazon Bedrock User Guide.
type ContentBlockMemberImage ¶ added in v1.9.0
type ContentBlockMemberImage struct { Value ImageBlock // contains filtered or unexported fields }
Image to include in the message.
This field is only supported by Anthropic Claude 3 models.
type ContentBlockMemberText ¶ added in v1.9.0
type ContentBlockMemberText struct { Value string // contains filtered or unexported fields }
Text to include in the message.
type ContentBlockMemberToolResult ¶ added in v1.9.0
type ContentBlockMemberToolResult struct { Value ToolResultBlock // contains filtered or unexported fields }
The result for a tool request that a model makes.
type ContentBlockMemberToolUse ¶ added in v1.9.0
type ContentBlockMemberToolUse struct { Value ToolUseBlock // contains filtered or unexported fields }
Information about a tool use request from a model.
type ContentBlockMemberVideo ¶ added in v1.22.0
type ContentBlockMemberVideo struct { Value VideoBlock // contains filtered or unexported fields }
Video to include in the message.
type ContentBlockStart ¶ added in v1.9.0
type ContentBlockStart interface {
// contains filtered or unexported methods
}
Content block start information.
The following types satisfy this interface:
ContentBlockStartMemberToolUse
Example (OutputUsage) ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/bedrockruntime/types" ) func main() { var union types.ContentBlockStart // type switches can be used to check the union value switch v := union.(type) { case *types.ContentBlockStartMemberToolUse: _ = v.Value // Value is types.ToolUseBlockStart case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) default: fmt.Println("union is nil or unknown type") } }
Output:
type ContentBlockStartEvent ¶ added in v1.9.0
type ContentBlockStartEvent struct { // The index for a content block start event. // // This member is required. ContentBlockIndex *int32 // Start information about a content block start event. // // This member is required. Start ContentBlockStart // contains filtered or unexported fields }
Content block start event.
type ContentBlockStartMemberToolUse ¶ added in v1.9.0
type ContentBlockStartMemberToolUse struct { Value ToolUseBlockStart // contains filtered or unexported fields }
Information about a tool that the model is requesting to use.
type ContentBlockStopEvent ¶ added in v1.9.0
type ContentBlockStopEvent struct { // The index for a content block. // // This member is required. ContentBlockIndex *int32 // contains filtered or unexported fields }
A content block stop event.
type ConversationRole ¶ added in v1.9.0
type ConversationRole string
const ( ConversationRoleUser ConversationRole = "user" ConversationRoleAssistant ConversationRole = "assistant" )
Enum values for ConversationRole
func (ConversationRole) Values ¶ added in v1.9.0
func (ConversationRole) Values() []ConversationRole
Values returns all known values for ConversationRole. Note that this can be expanded in the future, and so it is only as up to date as the client.
The ordering of this slice is not guaranteed to be stable across updates.
type ConverseMetrics ¶ added in v1.9.0
type ConverseMetrics struct { // The latency of the call to Converse , in milliseconds. // // This member is required. LatencyMs *int64 // contains filtered or unexported fields }
Metrics for a call to Converse.
type ConverseOutput ¶ added in v1.9.0
type ConverseOutput interface {
// contains filtered or unexported methods
}
The output from a call to Converse.
The following types satisfy this interface:
ConverseOutputMemberMessage
Example (OutputUsage) ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/bedrockruntime/types" ) func main() { var union types.ConverseOutput // type switches can be used to check the union value switch v := union.(type) { case *types.ConverseOutputMemberMessage: _ = v.Value // Value is types.Message case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) default: fmt.Println("union is nil or unknown type") } }
Output:
type ConverseOutputMemberMessage ¶ added in v1.9.0
type ConverseOutputMemberMessage struct { Value Message // contains filtered or unexported fields }
The message that the model generates.
type ConverseStreamMetadataEvent ¶ added in v1.9.0
type ConverseStreamMetadataEvent struct { // The metrics for the conversation stream metadata event. // // This member is required. Metrics *ConverseStreamMetrics // Usage information for the conversation stream event. // // This member is required. Usage *TokenUsage // Model performance configuration metadata for the conversation stream event. PerformanceConfig *PerformanceConfiguration // The trace object in the response from [ConverseStream] that contains information about the // guardrail behavior. // // [ConverseStream]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html Trace *ConverseStreamTrace // contains filtered or unexported fields }
A conversation stream metadata event.
type ConverseStreamMetrics ¶ added in v1.9.0
type ConverseStreamMetrics struct { // The latency for the streaming request, in milliseconds. // // This member is required. LatencyMs *int64 // contains filtered or unexported fields }
Metrics for the stream.
type ConverseStreamOutput ¶ added in v1.9.0
type ConverseStreamOutput interface {
// contains filtered or unexported methods
}
The messages output stream
The following types satisfy this interface:
ConverseStreamOutputMemberContentBlockDelta ConverseStreamOutputMemberContentBlockStart ConverseStreamOutputMemberContentBlockStop ConverseStreamOutputMemberMessageStart ConverseStreamOutputMemberMessageStop ConverseStreamOutputMemberMetadata
Example (OutputUsage) ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/bedrockruntime/types" ) func main() { var union types.ConverseStreamOutput // type switches can be used to check the union value switch v := union.(type) { case *types.ConverseStreamOutputMemberContentBlockDelta: _ = v.Value // Value is types.ContentBlockDeltaEvent case *types.ConverseStreamOutputMemberContentBlockStart: _ = v.Value // Value is types.ContentBlockStartEvent case *types.ConverseStreamOutputMemberContentBlockStop: _ = v.Value // Value is types.ContentBlockStopEvent case *types.ConverseStreamOutputMemberMessageStart: _ = v.Value // Value is types.MessageStartEvent case *types.ConverseStreamOutputMemberMessageStop: _ = v.Value // Value is types.MessageStopEvent case *types.ConverseStreamOutputMemberMetadata: _ = v.Value // Value is types.ConverseStreamMetadataEvent case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) default: fmt.Println("union is nil or unknown type") } }
Output:
type ConverseStreamOutputMemberContentBlockDelta ¶ added in v1.9.0
type ConverseStreamOutputMemberContentBlockDelta struct { Value ContentBlockDeltaEvent // contains filtered or unexported fields }
The messages output content block delta.
type ConverseStreamOutputMemberContentBlockStart ¶ added in v1.9.0
type ConverseStreamOutputMemberContentBlockStart struct { Value ContentBlockStartEvent // contains filtered or unexported fields }
Start information for a content block.
type ConverseStreamOutputMemberContentBlockStop ¶ added in v1.9.0
type ConverseStreamOutputMemberContentBlockStop struct { Value ContentBlockStopEvent // contains filtered or unexported fields }
Stop information for a content block.
type ConverseStreamOutputMemberMessageStart ¶ added in v1.9.0
type ConverseStreamOutputMemberMessageStart struct { Value MessageStartEvent // contains filtered or unexported fields }
Message start information.
type ConverseStreamOutputMemberMessageStop ¶ added in v1.9.0
type ConverseStreamOutputMemberMessageStop struct { Value MessageStopEvent // contains filtered or unexported fields }
Message stop information.
type ConverseStreamOutputMemberMetadata ¶ added in v1.9.0
type ConverseStreamOutputMemberMetadata struct { Value ConverseStreamMetadataEvent // contains filtered or unexported fields }
Metadata for the converse output stream.
type ConverseStreamTrace ¶ added in v1.10.0
type ConverseStreamTrace struct { // The guardrail trace object. Guardrail *GuardrailTraceAssessment // The request's prompt router. PromptRouter *PromptRouterTrace // contains filtered or unexported fields }
The trace object in a response from ConverseStream. Currently, you can only trace guardrails.
type ConverseTrace ¶ added in v1.10.0
type ConverseTrace struct { // The guardrail trace object. Guardrail *GuardrailTraceAssessment // The request's prompt router. PromptRouter *PromptRouterTrace // contains filtered or unexported fields }
The trace object in a response from Converse. Currently, you can only trace guardrails.
type DocumentBlock ¶ added in v1.11.0
type DocumentBlock struct { // The format of a document, or its extension. // // This member is required. Format 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. // // This member is required. Name *string // Contains the content of the document. // // This member is required. Source DocumentSource // contains filtered or unexported fields }
A document to include in a message.
type DocumentFormat ¶ added in v1.11.0
type DocumentFormat string
const ( DocumentFormatPdf DocumentFormat = "pdf" DocumentFormatCsv DocumentFormat = "csv" DocumentFormatDoc DocumentFormat = "doc" DocumentFormatDocx DocumentFormat = "docx" DocumentFormatXls DocumentFormat = "xls" DocumentFormatXlsx DocumentFormat = "xlsx" DocumentFormatHtml DocumentFormat = "html" DocumentFormatTxt DocumentFormat = "txt" DocumentFormatMd DocumentFormat = "md" )
Enum values for DocumentFormat
func (DocumentFormat) Values ¶ added in v1.11.0
func (DocumentFormat) Values() []DocumentFormat
Values returns all known values for DocumentFormat. Note that this can be expanded in the future, and so it is only as up to date as the client.
The ordering of this slice is not guaranteed to be stable across updates.
type DocumentSource ¶ added in v1.11.0
type DocumentSource interface {
// contains filtered or unexported methods
}
Contains the content of a document.
The following types satisfy this interface:
DocumentSourceMemberBytes
Example (OutputUsage) ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/bedrockruntime/types" ) func main() { var union types.DocumentSource // type switches can be used to check the union value switch v := union.(type) { case *types.DocumentSourceMemberBytes: _ = v.Value // Value is []byte case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) default: fmt.Println("union is nil or unknown type") } }
Output:
type DocumentSourceMemberBytes ¶ added in v1.11.0
type DocumentSourceMemberBytes struct { Value []byte // contains filtered or unexported fields }
The raw bytes for the document. If you use an Amazon Web Services SDK, you don't need to encode the bytes in base64.
type GuardrailAction ¶ added in v1.13.0
type GuardrailAction string
const ( GuardrailActionNone GuardrailAction = "NONE" GuardrailActionGuardrailIntervened GuardrailAction = "GUARDRAIL_INTERVENED" )
Enum values for GuardrailAction
func (GuardrailAction) Values ¶ added in v1.13.0
func (GuardrailAction) Values() []GuardrailAction
Values returns all known values for GuardrailAction. Note that this can be expanded in the future, and so it is only as up to date as the client.
The ordering of this slice is not guaranteed to be stable across updates.
type GuardrailAssessment ¶ added in v1.10.0
type GuardrailAssessment struct { // The content policy. ContentPolicy *GuardrailContentPolicyAssessment // The contextual grounding policy used for the guardrail assessment. ContextualGroundingPolicy *GuardrailContextualGroundingPolicyAssessment // The invocation metrics for the guardrail assessment. InvocationMetrics *GuardrailInvocationMetrics // The sensitive information policy. SensitiveInformationPolicy *GuardrailSensitiveInformationPolicyAssessment // The topic policy. TopicPolicy *GuardrailTopicPolicyAssessment // The word policy. WordPolicy *GuardrailWordPolicyAssessment // contains filtered or unexported fields }
A behavior assessment of the guardrail policies used in a call to the Converse API.
type GuardrailConfiguration ¶ added in v1.10.0
type GuardrailConfiguration struct { // The identifier for the guardrail. // // This member is required. GuardrailIdentifier *string // The version of the guardrail. // // This member is required. GuardrailVersion *string // The trace behavior for the guardrail. Trace GuardrailTrace // contains filtered or unexported fields }
Configuration information for a guardrail that you use with the Converse operation.
type GuardrailContentBlock ¶ added in v1.13.0
type GuardrailContentBlock interface {
// contains filtered or unexported methods
}
The content block to be evaluated by the guardrail.
The following types satisfy this interface:
GuardrailContentBlockMemberImage GuardrailContentBlockMemberText
Example (OutputUsage) ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/bedrockruntime/types" ) func main() { var union types.GuardrailContentBlock // type switches can be used to check the union value switch v := union.(type) { case *types.GuardrailContentBlockMemberImage: _ = v.Value // Value is types.GuardrailImageBlock case *types.GuardrailContentBlockMemberText: _ = v.Value // Value is types.GuardrailTextBlock case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) default: fmt.Println("union is nil or unknown type") } }
Output:
type GuardrailContentBlockMemberImage ¶ added in v1.23.0
type GuardrailContentBlockMemberImage struct { Value GuardrailImageBlock // contains filtered or unexported fields }
Image within guardrail content block to be evaluated by the guardrail.
type GuardrailContentBlockMemberText ¶ added in v1.13.0
type GuardrailContentBlockMemberText struct { Value GuardrailTextBlock // contains filtered or unexported fields }
Text within content block to be evaluated by the guardrail.
type GuardrailContentFilter ¶ added in v1.10.0
type GuardrailContentFilter struct { // The guardrail action. // // This member is required. Action GuardrailContentPolicyAction // The guardrail confidence. // // This member is required. Confidence GuardrailContentFilterConfidence // The guardrail type. // // This member is required. Type GuardrailContentFilterType // The filter strength setting for the guardrail content filter. FilterStrength GuardrailContentFilterStrength // contains filtered or unexported fields }
The content filter for a guardrail.
type GuardrailContentFilterConfidence ¶ added in v1.10.0
type GuardrailContentFilterConfidence string
const ( GuardrailContentFilterConfidenceNone GuardrailContentFilterConfidence = "NONE" GuardrailContentFilterConfidenceLow GuardrailContentFilterConfidence = "LOW" GuardrailContentFilterConfidenceMedium GuardrailContentFilterConfidence = "MEDIUM" GuardrailContentFilterConfidenceHigh GuardrailContentFilterConfidence = "HIGH" )
Enum values for GuardrailContentFilterConfidence
func (GuardrailContentFilterConfidence) Values ¶ added in v1.10.0
func (GuardrailContentFilterConfidence) Values() []GuardrailContentFilterConfidence
Values returns all known values for GuardrailContentFilterConfidence. Note that this can be expanded in the future, and so it is only as up to date as the client.
The ordering of this slice is not guaranteed to be stable across updates.
type GuardrailContentFilterStrength ¶ added in v1.18.0
type GuardrailContentFilterStrength string
const ( GuardrailContentFilterStrengthNone GuardrailContentFilterStrength = "NONE" GuardrailContentFilterStrengthLow GuardrailContentFilterStrength = "LOW" GuardrailContentFilterStrengthMedium GuardrailContentFilterStrength = "MEDIUM" GuardrailContentFilterStrengthHigh GuardrailContentFilterStrength = "HIGH" )
Enum values for GuardrailContentFilterStrength
func (GuardrailContentFilterStrength) Values ¶ added in v1.18.0
func (GuardrailContentFilterStrength) Values() []GuardrailContentFilterStrength
Values returns all known values for GuardrailContentFilterStrength. Note that this can be expanded in the future, and so it is only as up to date as the client.
The ordering of this slice is not guaranteed to be stable across updates.
type GuardrailContentFilterType ¶ added in v1.10.0
type GuardrailContentFilterType string
const ( GuardrailContentFilterTypeInsults GuardrailContentFilterType = "INSULTS" GuardrailContentFilterTypeHate GuardrailContentFilterType = "HATE" GuardrailContentFilterTypeSexual GuardrailContentFilterType = "SEXUAL" GuardrailContentFilterTypeViolence GuardrailContentFilterType = "VIOLENCE" GuardrailContentFilterTypeMisconduct GuardrailContentFilterType = "MISCONDUCT" GuardrailContentFilterTypePromptAttack GuardrailContentFilterType = "PROMPT_ATTACK" )
Enum values for GuardrailContentFilterType
func (GuardrailContentFilterType) Values ¶ added in v1.10.0
func (GuardrailContentFilterType) Values() []GuardrailContentFilterType
Values returns all known values for GuardrailContentFilterType. Note that this can be expanded in the future, and so it is only as up to date as the client.
The ordering of this slice is not guaranteed to be stable across updates.
type GuardrailContentPolicyAction ¶ added in v1.10.0
type GuardrailContentPolicyAction string
const (
GuardrailContentPolicyActionBlocked GuardrailContentPolicyAction = "BLOCKED"
)
Enum values for GuardrailContentPolicyAction
func (GuardrailContentPolicyAction) Values ¶ added in v1.10.0
func (GuardrailContentPolicyAction) Values() []GuardrailContentPolicyAction
Values returns all known values for GuardrailContentPolicyAction. Note that this can be expanded in the future, and so it is only as up to date as the client.
The ordering of this slice is not guaranteed to be stable across updates.
type GuardrailContentPolicyAssessment ¶ added in v1.10.0
type GuardrailContentPolicyAssessment struct { // The content policy filters. // // This member is required. Filters []GuardrailContentFilter // contains filtered or unexported fields }
An assessment of a content policy for a guardrail.
type GuardrailContentQualifier ¶ added in v1.13.0
type GuardrailContentQualifier string
const ( GuardrailContentQualifierGroundingSource GuardrailContentQualifier = "grounding_source" GuardrailContentQualifierQuery GuardrailContentQualifier = "query" GuardrailContentQualifierGuardContent GuardrailContentQualifier = "guard_content" )
Enum values for GuardrailContentQualifier
func (GuardrailContentQualifier) Values ¶ added in v1.13.0
func (GuardrailContentQualifier) Values() []GuardrailContentQualifier
Values returns all known values for GuardrailContentQualifier. Note that this can be expanded in the future, and so it is only as up to date as the client.
The ordering of this slice is not guaranteed to be stable across updates.
type GuardrailContentSource ¶ added in v1.13.0
type GuardrailContentSource string
const ( GuardrailContentSourceInput GuardrailContentSource = "INPUT" GuardrailContentSourceOutput GuardrailContentSource = "OUTPUT" )
Enum values for GuardrailContentSource
func (GuardrailContentSource) Values ¶ added in v1.13.0
func (GuardrailContentSource) Values() []GuardrailContentSource
Values returns all known values for GuardrailContentSource. Note that this can be expanded in the future, and so it is only as up to date as the client.
The ordering of this slice is not guaranteed to be stable across updates.
type GuardrailContextualGroundingFilter ¶ added in v1.13.0
type GuardrailContextualGroundingFilter struct { // The action performed by the guardrails contextual grounding filter. // // This member is required. Action GuardrailContextualGroundingPolicyAction // The score generated by contextual grounding filter. // // This member is required. Score *float64 // The threshold used by contextual grounding filter to determine whether the // content is grounded or not. // // This member is required. Threshold *float64 // The contextual grounding filter type. // // This member is required. Type GuardrailContextualGroundingFilterType // contains filtered or unexported fields }
The details for the guardrails contextual grounding filter.
type GuardrailContextualGroundingFilterType ¶ added in v1.13.0
type GuardrailContextualGroundingFilterType string
const ( GuardrailContextualGroundingFilterTypeGrounding GuardrailContextualGroundingFilterType = "GROUNDING" GuardrailContextualGroundingFilterTypeRelevance GuardrailContextualGroundingFilterType = "RELEVANCE" )
Enum values for GuardrailContextualGroundingFilterType
func (GuardrailContextualGroundingFilterType) Values ¶ added in v1.13.0
func (GuardrailContextualGroundingFilterType) Values() []GuardrailContextualGroundingFilterType
Values returns all known values for GuardrailContextualGroundingFilterType. Note that this can be expanded in the future, and so it is only as up to date as the client.
The ordering of this slice is not guaranteed to be stable across updates.
type GuardrailContextualGroundingPolicyAction ¶ added in v1.13.0
type GuardrailContextualGroundingPolicyAction string
const ( GuardrailContextualGroundingPolicyActionBlocked GuardrailContextualGroundingPolicyAction = "BLOCKED" GuardrailContextualGroundingPolicyActionNone GuardrailContextualGroundingPolicyAction = "NONE" )
Enum values for GuardrailContextualGroundingPolicyAction
func (GuardrailContextualGroundingPolicyAction) Values ¶ added in v1.13.0
Values returns all known values for GuardrailContextualGroundingPolicyAction. Note that this can be expanded in the future, and so it is only as up to date as the client.
The ordering of this slice is not guaranteed to be stable across updates.
type GuardrailContextualGroundingPolicyAssessment ¶ added in v1.13.0
type GuardrailContextualGroundingPolicyAssessment struct { // The filter details for the guardrails contextual grounding filter. Filters []GuardrailContextualGroundingFilter // contains filtered or unexported fields }
The policy assessment details for the guardrails contextual grounding filter.
type GuardrailConverseContentBlock ¶ added in v1.10.0
type GuardrailConverseContentBlock interface {
// contains filtered or unexported methods
}
A content block for selective guarding with the Converse or ConverseStream API operations.
The following types satisfy this interface:
GuardrailConverseContentBlockMemberImage GuardrailConverseContentBlockMemberText
Example (OutputUsage) ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/bedrockruntime/types" ) func main() { var union types.GuardrailConverseContentBlock // type switches can be used to check the union value switch v := union.(type) { case *types.GuardrailConverseContentBlockMemberImage: _ = v.Value // Value is types.GuardrailConverseImageBlock case *types.GuardrailConverseContentBlockMemberText: _ = v.Value // Value is types.GuardrailConverseTextBlock case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) default: fmt.Println("union is nil or unknown type") } }
Output:
type GuardrailConverseContentBlockMemberImage ¶ added in v1.23.0
type GuardrailConverseContentBlockMemberImage struct { Value GuardrailConverseImageBlock // contains filtered or unexported fields }
Image within converse content block to be evaluated by the guardrail.
type GuardrailConverseContentBlockMemberText ¶ added in v1.10.0
type GuardrailConverseContentBlockMemberText struct { Value GuardrailConverseTextBlock // contains filtered or unexported fields }
The text to guard.
type GuardrailConverseContentQualifier ¶ added in v1.13.0
type GuardrailConverseContentQualifier string
const ( GuardrailConverseContentQualifierGroundingSource GuardrailConverseContentQualifier = "grounding_source" GuardrailConverseContentQualifierQuery GuardrailConverseContentQualifier = "query" GuardrailConverseContentQualifierGuardContent GuardrailConverseContentQualifier = "guard_content" )
Enum values for GuardrailConverseContentQualifier
func (GuardrailConverseContentQualifier) Values ¶ added in v1.13.0
func (GuardrailConverseContentQualifier) Values() []GuardrailConverseContentQualifier
Values returns all known values for GuardrailConverseContentQualifier. Note that this can be expanded in the future, and so it is only as up to date as the client.
The ordering of this slice is not guaranteed to be stable across updates.
type GuardrailConverseImageBlock ¶ added in v1.23.0
type GuardrailConverseImageBlock struct { // The format details for the image type of the guardrail converse image block. // // This member is required. Format GuardrailConverseImageFormat // The image source (image bytes) of the guardrail converse image block. // // This member is required. Source GuardrailConverseImageSource // contains filtered or unexported fields }
An image block that contains images that you want to assess with a guardrail.
type GuardrailConverseImageFormat ¶ added in v1.23.0
type GuardrailConverseImageFormat string
const ( GuardrailConverseImageFormatPng GuardrailConverseImageFormat = "png" GuardrailConverseImageFormatJpeg GuardrailConverseImageFormat = "jpeg" )
Enum values for GuardrailConverseImageFormat
func (GuardrailConverseImageFormat) Values ¶ added in v1.23.0
func (GuardrailConverseImageFormat) Values() []GuardrailConverseImageFormat
Values returns all known values for GuardrailConverseImageFormat. Note that this can be expanded in the future, and so it is only as up to date as the client.
The ordering of this slice is not guaranteed to be stable across updates.
type GuardrailConverseImageSource ¶ added in v1.23.0
type GuardrailConverseImageSource interface {
// contains filtered or unexported methods
}
The image source (image bytes) of the guardrail converse image source.
The following types satisfy this interface:
GuardrailConverseImageSourceMemberBytes
Example (OutputUsage) ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/bedrockruntime/types" ) func main() { var union types.GuardrailConverseImageSource // type switches can be used to check the union value switch v := union.(type) { case *types.GuardrailConverseImageSourceMemberBytes: _ = v.Value // Value is []byte case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) default: fmt.Println("union is nil or unknown type") } }
Output:
type GuardrailConverseImageSourceMemberBytes ¶ added in v1.23.0
type GuardrailConverseImageSourceMemberBytes struct { Value []byte // contains filtered or unexported fields }
The raw image bytes for the image.
type GuardrailConverseTextBlock ¶ added in v1.10.0
type GuardrailConverseTextBlock struct { // The text that you want to guard. // // This member is required. Text *string // The qualifier details for the guardrails contextual grounding filter. Qualifiers []GuardrailConverseContentQualifier // contains filtered or unexported fields }
A text block that contains text that you want to assess with a guardrail. For more information, see GuardrailConverseContentBlock.
type GuardrailCoverage ¶ added in v1.18.0
type GuardrailCoverage struct { // The guardrail coverage for images (the number of images that guardrails // guarded). Images *GuardrailImageCoverage // The text characters of the guardrail coverage details. TextCharacters *GuardrailTextCharactersCoverage // contains filtered or unexported fields }
The action of the guardrail coverage details.
type GuardrailCustomWord ¶ added in v1.10.0
type GuardrailCustomWord struct { // The action for the custom word. // // This member is required. Action GuardrailWordPolicyAction // The match for the custom word. // // This member is required. Match *string // contains filtered or unexported fields }
A custom word configured in a guardrail.
type GuardrailImageBlock ¶ added in v1.23.0
type GuardrailImageBlock struct { // The format details for the file type of the image blocked by the guardrail. // // This member is required. Format GuardrailImageFormat // The image source (image bytes) details of the image blocked by the guardrail. // // This member is required. Source GuardrailImageSource // contains filtered or unexported fields }
Contain an image which user wants guarded. This block is accepted by the guardrails independent API.
type GuardrailImageCoverage ¶ added in v1.23.0
type GuardrailImageCoverage struct { // The count (integer) of images guardrails guarded. Guarded *int32 // Represents the total number of images (integer) that were in the request // (guarded and unguarded). Total *int32 // contains filtered or unexported fields }
The details of the guardrail image coverage.
type GuardrailImageFormat ¶ added in v1.23.0
type GuardrailImageFormat string
const ( GuardrailImageFormatPng GuardrailImageFormat = "png" GuardrailImageFormatJpeg GuardrailImageFormat = "jpeg" )
Enum values for GuardrailImageFormat
func (GuardrailImageFormat) Values ¶ added in v1.23.0
func (GuardrailImageFormat) Values() []GuardrailImageFormat
Values returns all known values for GuardrailImageFormat. Note that this can be expanded in the future, and so it is only as up to date as the client.
The ordering of this slice is not guaranteed to be stable across updates.
type GuardrailImageSource ¶ added in v1.23.0
type GuardrailImageSource interface {
// contains filtered or unexported methods
}
The image source (image bytes) of the guardrail image source. Object used in independent api.
The following types satisfy this interface:
GuardrailImageSourceMemberBytes
Example (OutputUsage) ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/bedrockruntime/types" ) func main() { var union types.GuardrailImageSource // type switches can be used to check the union value switch v := union.(type) { case *types.GuardrailImageSourceMemberBytes: _ = v.Value // Value is []byte case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) default: fmt.Println("union is nil or unknown type") } }
Output:
type GuardrailImageSourceMemberBytes ¶ added in v1.23.0
type GuardrailImageSourceMemberBytes struct { Value []byte // contains filtered or unexported fields }
The bytes details of the guardrail image source. Object used in independent api.
type GuardrailInvocationMetrics ¶ added in v1.18.0
type GuardrailInvocationMetrics struct { // The coverage details for the guardrail invocation metrics. GuardrailCoverage *GuardrailCoverage // The processing latency details for the guardrail invocation metrics. GuardrailProcessingLatency *int64 // The usage details for the guardrail invocation metrics. Usage *GuardrailUsage // contains filtered or unexported fields }
The invocation metrics for the guardrail.
type GuardrailManagedWord ¶ added in v1.10.0
type GuardrailManagedWord struct { // The action for the managed word. // // This member is required. Action GuardrailWordPolicyAction // The match for the managed word. // // This member is required. Match *string // The type for the managed word. // // This member is required. Type GuardrailManagedWordType // contains filtered or unexported fields }
A managed word configured in a guardrail.
type GuardrailManagedWordType ¶ added in v1.10.0
type GuardrailManagedWordType string
const (
GuardrailManagedWordTypeProfanity GuardrailManagedWordType = "PROFANITY"
)
Enum values for GuardrailManagedWordType
func (GuardrailManagedWordType) Values ¶ added in v1.10.0
func (GuardrailManagedWordType) Values() []GuardrailManagedWordType
Values returns all known values for GuardrailManagedWordType. Note that this can be expanded in the future, and so it is only as up to date as the client.
The ordering of this slice is not guaranteed to be stable across updates.
type GuardrailOutputContent ¶ added in v1.13.0
type GuardrailOutputContent struct { // The specific text for the output content produced by the guardrail. Text *string // contains filtered or unexported fields }
The output content produced by the guardrail.
type GuardrailPiiEntityFilter ¶ added in v1.10.0
type GuardrailPiiEntityFilter struct { // The PII entity filter action. // // This member is required. Action GuardrailSensitiveInformationPolicyAction // The PII entity filter match. // // This member is required. Match *string // The PII entity filter type. // // This member is required. Type GuardrailPiiEntityType // contains filtered or unexported fields }
A Personally Identifiable Information (PII) entity configured in a guardrail.
type GuardrailPiiEntityType ¶ added in v1.10.0
type GuardrailPiiEntityType string
const ( GuardrailPiiEntityTypeAddress GuardrailPiiEntityType = "ADDRESS" GuardrailPiiEntityTypeAge GuardrailPiiEntityType = "AGE" GuardrailPiiEntityTypeAwsAccessKey GuardrailPiiEntityType = "AWS_ACCESS_KEY" GuardrailPiiEntityTypeAwsSecretKey GuardrailPiiEntityType = "AWS_SECRET_KEY" GuardrailPiiEntityTypeCaHealthNumber GuardrailPiiEntityType = "CA_HEALTH_NUMBER" GuardrailPiiEntityTypeCaSocialInsuranceNumber GuardrailPiiEntityType = "CA_SOCIAL_INSURANCE_NUMBER" GuardrailPiiEntityTypeCreditDebitCardCvv GuardrailPiiEntityType = "CREDIT_DEBIT_CARD_CVV" GuardrailPiiEntityTypeCreditDebitCardExpiry GuardrailPiiEntityType = "CREDIT_DEBIT_CARD_EXPIRY" GuardrailPiiEntityTypeCreditDebitCardNumber GuardrailPiiEntityType = "CREDIT_DEBIT_CARD_NUMBER" GuardrailPiiEntityTypeDriverId GuardrailPiiEntityType = "DRIVER_ID" GuardrailPiiEntityTypeEmail GuardrailPiiEntityType = "EMAIL" GuardrailPiiEntityTypeInternationalBankAccountNumber GuardrailPiiEntityType = "INTERNATIONAL_BANK_ACCOUNT_NUMBER" GuardrailPiiEntityTypeIpAddress GuardrailPiiEntityType = "IP_ADDRESS" GuardrailPiiEntityTypeLicensePlate GuardrailPiiEntityType = "LICENSE_PLATE" GuardrailPiiEntityTypeMacAddress GuardrailPiiEntityType = "MAC_ADDRESS" GuardrailPiiEntityTypeName GuardrailPiiEntityType = "NAME" GuardrailPiiEntityTypePassword GuardrailPiiEntityType = "PASSWORD" GuardrailPiiEntityTypePhone GuardrailPiiEntityType = "PHONE" GuardrailPiiEntityTypePin GuardrailPiiEntityType = "PIN" GuardrailPiiEntityTypeSwiftCode GuardrailPiiEntityType = "SWIFT_CODE" GuardrailPiiEntityTypeUkNationalHealthServiceNumber GuardrailPiiEntityType = "UK_NATIONAL_HEALTH_SERVICE_NUMBER" GuardrailPiiEntityTypeUkNationalInsuranceNumber GuardrailPiiEntityType = "UK_NATIONAL_INSURANCE_NUMBER" GuardrailPiiEntityTypeUkUniqueTaxpayerReferenceNumber GuardrailPiiEntityType = "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER" GuardrailPiiEntityTypeUrl GuardrailPiiEntityType = "URL" GuardrailPiiEntityTypeUsername GuardrailPiiEntityType = "USERNAME" GuardrailPiiEntityTypeUsBankAccountNumber GuardrailPiiEntityType = "US_BANK_ACCOUNT_NUMBER" GuardrailPiiEntityTypeUsBankRoutingNumber GuardrailPiiEntityType = "US_BANK_ROUTING_NUMBER" GuardrailPiiEntityTypeUsIndividualTaxIdentificationNumber GuardrailPiiEntityType = "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER" GuardrailPiiEntityTypeUsPassportNumber GuardrailPiiEntityType = "US_PASSPORT_NUMBER" GuardrailPiiEntityTypeUsSocialSecurityNumber GuardrailPiiEntityType = "US_SOCIAL_SECURITY_NUMBER" GuardrailPiiEntityTypeVehicleIdentificationNumber GuardrailPiiEntityType = "VEHICLE_IDENTIFICATION_NUMBER" )
Enum values for GuardrailPiiEntityType
func (GuardrailPiiEntityType) Values ¶ added in v1.10.0
func (GuardrailPiiEntityType) Values() []GuardrailPiiEntityType
Values returns all known values for GuardrailPiiEntityType. Note that this can be expanded in the future, and so it is only as up to date as the client.
The ordering of this slice is not guaranteed to be stable across updates.
type GuardrailRegexFilter ¶ added in v1.10.0
type GuardrailRegexFilter struct { // The region filter action. // // This member is required. Action GuardrailSensitiveInformationPolicyAction // The regesx filter match. Match *string // The regex filter name. Name *string // The regex query. Regex *string // contains filtered or unexported fields }
A Regex filter configured in a guardrail.
type GuardrailSensitiveInformationPolicyAction ¶ added in v1.10.0
type GuardrailSensitiveInformationPolicyAction string
const ( GuardrailSensitiveInformationPolicyActionAnonymized GuardrailSensitiveInformationPolicyAction = "ANONYMIZED" GuardrailSensitiveInformationPolicyActionBlocked GuardrailSensitiveInformationPolicyAction = "BLOCKED" )
Enum values for GuardrailSensitiveInformationPolicyAction
func (GuardrailSensitiveInformationPolicyAction) Values ¶ added in v1.10.0
func (GuardrailSensitiveInformationPolicyAction) Values() []GuardrailSensitiveInformationPolicyAction
Values returns all known values for GuardrailSensitiveInformationPolicyAction. Note that this can be expanded in the future, and so it is only as up to date as the client.
The ordering of this slice is not guaranteed to be stable across updates.
type GuardrailSensitiveInformationPolicyAssessment ¶ added in v1.10.0
type GuardrailSensitiveInformationPolicyAssessment struct { // The PII entities in the assessment. // // This member is required. PiiEntities []GuardrailPiiEntityFilter // The regex queries in the assessment. // // This member is required. Regexes []GuardrailRegexFilter // contains filtered or unexported fields }
The assessment for aPersonally Identifiable Information (PII) policy.
type GuardrailStreamConfiguration ¶ added in v1.10.0
type GuardrailStreamConfiguration struct { // The identifier for the guardrail. // // This member is required. GuardrailIdentifier *string // The version of the guardrail. // // This member is required. GuardrailVersion *string // The processing mode. // // The processing mode. For more information, see Configure streaming response // behavior in the Amazon Bedrock User Guide. StreamProcessingMode GuardrailStreamProcessingMode // The trace behavior for the guardrail. Trace GuardrailTrace // contains filtered or unexported fields }
Configuration information for a guardrail that you use with the ConverseStream action.
type GuardrailStreamProcessingMode ¶ added in v1.10.0
type GuardrailStreamProcessingMode string
const ( GuardrailStreamProcessingModeSync GuardrailStreamProcessingMode = "sync" GuardrailStreamProcessingModeAsync GuardrailStreamProcessingMode = "async" )
Enum values for GuardrailStreamProcessingMode
func (GuardrailStreamProcessingMode) Values ¶ added in v1.10.0
func (GuardrailStreamProcessingMode) Values() []GuardrailStreamProcessingMode
Values returns all known values for GuardrailStreamProcessingMode. Note that this can be expanded in the future, and so it is only as up to date as the client.
The ordering of this slice is not guaranteed to be stable across updates.
type GuardrailTextBlock ¶ added in v1.13.0
type GuardrailTextBlock struct { // The input text details to be evaluated by the guardrail. // // This member is required. Text *string // The qualifiers describing the text block. Qualifiers []GuardrailContentQualifier // contains filtered or unexported fields }
The text block to be evaluated by the guardrail.
type GuardrailTextCharactersCoverage ¶ added in v1.18.0
type GuardrailTextCharactersCoverage struct { // The text characters that were guarded by the guardrail coverage. Guarded *int32 // The total text characters by the guardrail coverage. Total *int32 // contains filtered or unexported fields }
The guardrail coverage for the text characters.
type GuardrailTopic ¶ added in v1.10.0
type GuardrailTopic struct { // The action the guardrail should take when it intervenes on a topic. // // This member is required. Action GuardrailTopicPolicyAction // The name for the guardrail. // // This member is required. Name *string // The type behavior that the guardrail should perform when the model detects the // topic. // // This member is required. Type GuardrailTopicType // contains filtered or unexported fields }
Information about a topic guardrail.
type GuardrailTopicPolicyAction ¶ added in v1.10.0
type GuardrailTopicPolicyAction string
const (
GuardrailTopicPolicyActionBlocked GuardrailTopicPolicyAction = "BLOCKED"
)
Enum values for GuardrailTopicPolicyAction
func (GuardrailTopicPolicyAction) Values ¶ added in v1.10.0
func (GuardrailTopicPolicyAction) Values() []GuardrailTopicPolicyAction
Values returns all known values for GuardrailTopicPolicyAction. Note that this can be expanded in the future, and so it is only as up to date as the client.
The ordering of this slice is not guaranteed to be stable across updates.
type GuardrailTopicPolicyAssessment ¶ added in v1.10.0
type GuardrailTopicPolicyAssessment struct { // The topics in the assessment. // // This member is required. Topics []GuardrailTopic // contains filtered or unexported fields }
A behavior assessment of a topic policy.
type GuardrailTopicType ¶ added in v1.10.0
type GuardrailTopicType string
const (
GuardrailTopicTypeDeny GuardrailTopicType = "DENY"
)
Enum values for GuardrailTopicType
func (GuardrailTopicType) Values ¶ added in v1.10.0
func (GuardrailTopicType) Values() []GuardrailTopicType
Values returns all known values for GuardrailTopicType. Note that this can be expanded in the future, and so it is only as up to date as the client.
The ordering of this slice is not guaranteed to be stable across updates.
type GuardrailTrace ¶ added in v1.10.0
type GuardrailTrace string
const ( GuardrailTraceEnabled GuardrailTrace = "enabled" GuardrailTraceDisabled GuardrailTrace = "disabled" )
Enum values for GuardrailTrace
func (GuardrailTrace) Values ¶ added in v1.10.0
func (GuardrailTrace) Values() []GuardrailTrace
Values returns all known values for GuardrailTrace. Note that this can be expanded in the future, and so it is only as up to date as the client.
The ordering of this slice is not guaranteed to be stable across updates.
type GuardrailTraceAssessment ¶ added in v1.10.0
type GuardrailTraceAssessment struct { // The input assessment. InputAssessment map[string]GuardrailAssessment // The output from the model. ModelOutput []string // the output assessments. OutputAssessments map[string][]GuardrailAssessment // contains filtered or unexported fields }
A Top level guardrail trace object. For more information, see ConverseTrace.
type GuardrailUsage ¶ added in v1.13.0
type GuardrailUsage struct { // The content policy units processed by the guardrail. // // This member is required. ContentPolicyUnits *int32 // The contextual grounding policy units processed by the guardrail. // // This member is required. ContextualGroundingPolicyUnits *int32 // The sensitive information policy free units processed by the guardrail. // // This member is required. SensitiveInformationPolicyFreeUnits *int32 // The sensitive information policy units processed by the guardrail. // // This member is required. SensitiveInformationPolicyUnits *int32 // The topic policy units processed by the guardrail. // // This member is required. TopicPolicyUnits *int32 // The word policy units processed by the guardrail. // // This member is required. WordPolicyUnits *int32 // contains filtered or unexported fields }
The details on the use of the guardrail.
type GuardrailWordPolicyAction ¶ added in v1.10.0
type GuardrailWordPolicyAction string
const (
GuardrailWordPolicyActionBlocked GuardrailWordPolicyAction = "BLOCKED"
)
Enum values for GuardrailWordPolicyAction
func (GuardrailWordPolicyAction) Values ¶ added in v1.10.0
func (GuardrailWordPolicyAction) Values() []GuardrailWordPolicyAction
Values returns all known values for GuardrailWordPolicyAction. Note that this can be expanded in the future, and so it is only as up to date as the client.
The ordering of this slice is not guaranteed to be stable across updates.
type GuardrailWordPolicyAssessment ¶ added in v1.10.0
type GuardrailWordPolicyAssessment struct { // Custom words in the assessment. // // This member is required. CustomWords []GuardrailCustomWord // Managed word lists in the assessment. // // This member is required. ManagedWordLists []GuardrailManagedWord // contains filtered or unexported fields }
The word policy assessment.
type ImageBlock ¶ added in v1.9.0
type ImageBlock struct { // The format of the image. // // This member is required. Format ImageFormat // The source for the image. // // This member is required. Source ImageSource // contains filtered or unexported fields }
Image content for a message.
type ImageFormat ¶ added in v1.9.0
type ImageFormat string
const ( ImageFormatPng ImageFormat = "png" ImageFormatJpeg ImageFormat = "jpeg" ImageFormatGif ImageFormat = "gif" ImageFormatWebp ImageFormat = "webp" )
Enum values for ImageFormat
func (ImageFormat) Values ¶ added in v1.9.0
func (ImageFormat) Values() []ImageFormat
Values returns all known values for ImageFormat. Note that this can be expanded in the future, and so it is only as up to date as the client.
The ordering of this slice is not guaranteed to be stable across updates.
type ImageSource ¶ added in v1.9.0
type ImageSource interface {
// contains filtered or unexported methods
}
The source for an image.
The following types satisfy this interface:
ImageSourceMemberBytes
Example (OutputUsage) ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/bedrockruntime/types" ) func main() { var union types.ImageSource // type switches can be used to check the union value switch v := union.(type) { case *types.ImageSourceMemberBytes: _ = v.Value // Value is []byte case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) default: fmt.Println("union is nil or unknown type") } }
Output:
type ImageSourceMemberBytes ¶ added in v1.9.0
type ImageSourceMemberBytes struct { Value []byte // contains filtered or unexported fields }
The raw image bytes for the image. If you use an AWS SDK, you don't need to encode the image bytes in base64.
type InferenceConfiguration ¶ added in v1.9.0
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]. // // [Inference parameters for foundation models]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html MaxTokens *int32 // A list of stop sequences. A stop sequence is a sequence of characters that // causes the model to stop generating the response. StopSequences []string // 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]. // // [Inference parameters for foundation models]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html Temperature *float32 // 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]. // // [Inference parameters for foundation models]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html TopP *float32 // contains filtered or unexported fields }
Base inference parameters to pass to a model in a call to Converse or ConverseStream. For more information, see Inference parameters for foundation models.
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.
type InternalServerException ¶
type InternalServerException struct { Message *string ErrorCodeOverride *string // contains filtered or unexported fields }
An internal server error occurred. For troubleshooting this error, see InternalFailure in the Amazon Bedrock User Guide
func (*InternalServerException) Error ¶
func (e *InternalServerException) Error() string
func (*InternalServerException) ErrorCode ¶
func (e *InternalServerException) ErrorCode() string
func (*InternalServerException) ErrorFault ¶
func (e *InternalServerException) ErrorFault() smithy.ErrorFault
func (*InternalServerException) ErrorMessage ¶
func (e *InternalServerException) ErrorMessage() string
type Message ¶ added in v1.9.0
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 . // // This member is required. Content []ContentBlock // The role that the message plays in the message. // // This member is required. Role ConversationRole // contains filtered or unexported fields }
A message input, or returned from, a call to Converse or ConverseStream.
type MessageStartEvent ¶ added in v1.9.0
type MessageStartEvent struct { // The role for the message. // // This member is required. Role ConversationRole // contains filtered or unexported fields }
The start of a message.
type MessageStopEvent ¶ added in v1.9.0
type MessageStopEvent struct { // The reason why the model stopped generating output. // // This member is required. StopReason StopReason // The additional model response fields. AdditionalModelResponseFields document.Interface // contains filtered or unexported fields }
The stop event for a message.
type ModelErrorException ¶
type ModelErrorException struct { Message *string ErrorCodeOverride *string OriginalStatusCode *int32 ResourceName *string // contains filtered or unexported fields }
The request failed due to an error while processing the model.
func (*ModelErrorException) Error ¶
func (e *ModelErrorException) Error() string
func (*ModelErrorException) ErrorCode ¶
func (e *ModelErrorException) ErrorCode() string
func (*ModelErrorException) ErrorFault ¶
func (e *ModelErrorException) ErrorFault() smithy.ErrorFault
func (*ModelErrorException) ErrorMessage ¶
func (e *ModelErrorException) ErrorMessage() string
type ModelNotReadyException ¶
type ModelNotReadyException struct { Message *string ErrorCodeOverride *string // contains filtered or unexported fields }
The model specified in the request is not ready to serve inference requests. The AWS SDK will automatically retry the operation up to 5 times. For information about configuring automatic retries, see Retry behaviorin the AWS SDKs and Tools reference guide.
func (*ModelNotReadyException) Error ¶
func (e *ModelNotReadyException) Error() string
func (*ModelNotReadyException) ErrorCode ¶
func (e *ModelNotReadyException) ErrorCode() string
func (*ModelNotReadyException) ErrorFault ¶
func (e *ModelNotReadyException) ErrorFault() smithy.ErrorFault
func (*ModelNotReadyException) ErrorMessage ¶
func (e *ModelNotReadyException) ErrorMessage() string
type ModelStreamErrorException ¶
type ModelStreamErrorException struct { Message *string ErrorCodeOverride *string OriginalStatusCode *int32 OriginalMessage *string // contains filtered or unexported fields }
An error occurred while streaming the response. Retry your request.
func (*ModelStreamErrorException) Error ¶
func (e *ModelStreamErrorException) Error() string
func (*ModelStreamErrorException) ErrorCode ¶
func (e *ModelStreamErrorException) ErrorCode() string
func (*ModelStreamErrorException) ErrorFault ¶
func (e *ModelStreamErrorException) ErrorFault() smithy.ErrorFault
func (*ModelStreamErrorException) ErrorMessage ¶
func (e *ModelStreamErrorException) ErrorMessage() string
type ModelTimeoutException ¶
type ModelTimeoutException struct { Message *string ErrorCodeOverride *string // contains filtered or unexported fields }
The request took too long to process. Processing time exceeded the model timeout length.
func (*ModelTimeoutException) Error ¶
func (e *ModelTimeoutException) Error() string
func (*ModelTimeoutException) ErrorCode ¶
func (e *ModelTimeoutException) ErrorCode() string
func (*ModelTimeoutException) ErrorFault ¶
func (e *ModelTimeoutException) ErrorFault() smithy.ErrorFault
func (*ModelTimeoutException) ErrorMessage ¶
func (e *ModelTimeoutException) ErrorMessage() string
type PayloadPart ¶
type PayloadPart struct { // Base64-encoded bytes of payload data. Bytes []byte // contains filtered or unexported fields }
Payload content included in the response.
type PerformanceConfigLatency ¶ added in v1.21.0
type PerformanceConfigLatency string
const ( PerformanceConfigLatencyStandard PerformanceConfigLatency = "standard" PerformanceConfigLatencyOptimized PerformanceConfigLatency = "optimized" )
Enum values for PerformanceConfigLatency
func (PerformanceConfigLatency) Values ¶ added in v1.21.0
func (PerformanceConfigLatency) Values() []PerformanceConfigLatency
Values returns all known values for PerformanceConfigLatency. Note that this can be expanded in the future, and so it is only as up to date as the client.
The ordering of this slice is not guaranteed to be stable across updates.
type PerformanceConfiguration ¶ added in v1.21.0
type PerformanceConfiguration struct { // To use a latency-optimized version of the model, set to optimized . Latency PerformanceConfigLatency // contains filtered or unexported fields }
Performance settings for a model.
type PromptRouterTrace ¶ added in v1.23.0
type PromptRouterTrace struct { // The ID of the invoked model. InvokedModelId *string // contains filtered or unexported fields }
A prompt router trace.
type PromptVariableValues ¶ added in v1.20.0
type PromptVariableValues interface {
// contains filtered or unexported methods
}
Contains a map of variables in a prompt from Prompt management to an object containing the values to fill in for them when running model invocation. For more information, see How Prompt management works.
The following types satisfy this interface:
PromptVariableValuesMemberText
Example (OutputUsage) ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/bedrockruntime/types" ) func main() { var union types.PromptVariableValues // type switches can be used to check the union value switch v := union.(type) { case *types.PromptVariableValuesMemberText: _ = v.Value // Value is string case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) default: fmt.Println("union is nil or unknown type") } }
Output:
type PromptVariableValuesMemberText ¶ added in v1.20.0
type PromptVariableValuesMemberText struct { Value string // contains filtered or unexported fields }
The text value that the variable maps to.
type ResourceNotFoundException ¶
type ResourceNotFoundException struct { Message *string ErrorCodeOverride *string // contains filtered or unexported fields }
The specified resource ARN was not found. For troubleshooting this error, see ResourceNotFound in the Amazon Bedrock User Guide
func (*ResourceNotFoundException) Error ¶
func (e *ResourceNotFoundException) Error() string
func (*ResourceNotFoundException) ErrorCode ¶
func (e *ResourceNotFoundException) ErrorCode() string
func (*ResourceNotFoundException) ErrorFault ¶
func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault
func (*ResourceNotFoundException) ErrorMessage ¶
func (e *ResourceNotFoundException) ErrorMessage() string
type ResponseStream ¶
type ResponseStream interface {
// contains filtered or unexported methods
}
Definition of content in the response stream.
The following types satisfy this interface:
ResponseStreamMemberChunk
Example (OutputUsage) ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/bedrockruntime/types" ) func main() { var union types.ResponseStream // type switches can be used to check the union value switch v := union.(type) { case *types.ResponseStreamMemberChunk: _ = v.Value // Value is types.PayloadPart case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) default: fmt.Println("union is nil or unknown type") } }
Output:
type ResponseStreamMemberChunk ¶
type ResponseStreamMemberChunk struct { Value PayloadPart // contains filtered or unexported fields }
Content included in the response.
type S3Location ¶ added in v1.22.0
type S3Location struct { // An object URI starting with s3:// . // // This member is required. Uri *string // If the bucket belongs to another AWS account, specify that account's ID. BucketOwner *string // contains filtered or unexported fields }
A storage location in an S3 bucket.
type ServiceQuotaExceededException ¶
type ServiceQuotaExceededException struct { Message *string ErrorCodeOverride *string // contains filtered or unexported fields }
Your request exceeds the service quota for your account. You can view your quotas at Viewing service quotas. You can resubmit your request later.
func (*ServiceQuotaExceededException) Error ¶
func (e *ServiceQuotaExceededException) Error() string
func (*ServiceQuotaExceededException) ErrorCode ¶
func (e *ServiceQuotaExceededException) ErrorCode() string
func (*ServiceQuotaExceededException) ErrorFault ¶
func (e *ServiceQuotaExceededException) ErrorFault() smithy.ErrorFault
func (*ServiceQuotaExceededException) ErrorMessage ¶
func (e *ServiceQuotaExceededException) ErrorMessage() string
type ServiceUnavailableException ¶ added in v1.15.0
type ServiceUnavailableException struct { // contains filtered or unexported fields }
The service isn't currently available. For troubleshooting this error, see ServiceUnavailable in the Amazon Bedrock User Guide
func (*ServiceUnavailableException) Error ¶ added in v1.15.0
func (e *ServiceUnavailableException) Error() string
func (*ServiceUnavailableException) ErrorCode ¶ added in v1.15.0
func (e *ServiceUnavailableException) ErrorCode() string
func (*ServiceUnavailableException) ErrorFault ¶ added in v1.15.0
func (e *ServiceUnavailableException) ErrorFault() smithy.ErrorFault
func (*ServiceUnavailableException) ErrorMessage ¶ added in v1.15.0
func (e *ServiceUnavailableException) ErrorMessage() string
type SortAsyncInvocationBy ¶ added in v1.22.0
type SortAsyncInvocationBy string
const (
SortAsyncInvocationBySubmissionTime SortAsyncInvocationBy = "SubmissionTime"
)
Enum values for SortAsyncInvocationBy
func (SortAsyncInvocationBy) Values ¶ added in v1.22.0
func (SortAsyncInvocationBy) Values() []SortAsyncInvocationBy
Values returns all known values for SortAsyncInvocationBy. Note that this can be expanded in the future, and so it is only as up to date as the client.
The ordering of this slice is not guaranteed to be stable across updates.
type SpecificToolChoice ¶ added in v1.9.0
type SpecificToolChoice struct { // The name of the tool that the model must request. // // This member is required. Name *string // 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.
type StopReason ¶ added in v1.9.0
type StopReason string
const ( StopReasonEndTurn StopReason = "end_turn" StopReasonToolUse StopReason = "tool_use" StopReasonMaxTokens StopReason = "max_tokens" StopReasonStopSequence StopReason = "stop_sequence" StopReasonGuardrailIntervened StopReason = "guardrail_intervened" StopReasonContentFiltered StopReason = "content_filtered" )
Enum values for StopReason
func (StopReason) Values ¶ added in v1.9.0
func (StopReason) Values() []StopReason
Values returns all known values for StopReason. Note that this can be expanded in the future, and so it is only as up to date as the client.
The ordering of this slice is not guaranteed to be stable across updates.
type SystemContentBlock ¶ added in v1.9.0
type SystemContentBlock interface {
// contains filtered or unexported methods
}
A system content block.
The following types satisfy this interface:
SystemContentBlockMemberGuardContent SystemContentBlockMemberText
Example (OutputUsage) ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/bedrockruntime/types" ) func main() { var union types.SystemContentBlock // type switches can be used to check the union value switch v := union.(type) { case *types.SystemContentBlockMemberGuardContent: _ = v.Value // Value is types.GuardrailConverseContentBlock case *types.SystemContentBlockMemberText: _ = v.Value // Value is string case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) default: fmt.Println("union is nil or unknown type") } }
Output:
type SystemContentBlockMemberGuardContent ¶ added in v1.10.0
type SystemContentBlockMemberGuardContent struct { Value GuardrailConverseContentBlock // contains filtered or unexported fields }
A content block to assess with the guardrail. Use with the Converse or ConverseStream API operations.
For more information, see Use a guardrail with the Converse API in the Amazon Bedrock User Guide.
type SystemContentBlockMemberText ¶ added in v1.9.0
type SystemContentBlockMemberText struct { Value string // contains filtered or unexported fields }
A system prompt for the model.
type Tag ¶ added in v1.22.0
type Tag struct { // The tag's key. // // This member is required. Key *string // The tag's value. // // This member is required. Value *string // contains filtered or unexported fields }
A tag.
type ThrottlingException ¶
type ThrottlingException struct { Message *string ErrorCodeOverride *string // contains filtered or unexported fields }
Your request was denied due to exceeding the account quotas for Amazon Bedrock. For troubleshooting this error, see ThrottlingExceptionin the Amazon Bedrock User Guide
func (*ThrottlingException) Error ¶
func (e *ThrottlingException) Error() string
func (*ThrottlingException) ErrorCode ¶
func (e *ThrottlingException) ErrorCode() string
func (*ThrottlingException) ErrorFault ¶
func (e *ThrottlingException) ErrorFault() smithy.ErrorFault
func (*ThrottlingException) ErrorMessage ¶
func (e *ThrottlingException) ErrorMessage() string
type TokenUsage ¶ added in v1.9.0
type TokenUsage struct { // The number of tokens sent in the request to the model. // // This member is required. InputTokens *int32 // The number of tokens that the model generated for the request. // // This member is required. OutputTokens *int32 // The total of input tokens and tokens generated by the model. // // This member is required. TotalTokens *int32 // contains filtered or unexported fields }
The tokens used in a message API inference call.
type Tool ¶ added in v1.9.0
type Tool interface {
// contains filtered or unexported methods
}
Information about a tool that you can use with the Converse API. For more information, see Tool use (function calling)in the Amazon Bedrock User Guide.
The following types satisfy this interface:
ToolMemberToolSpec
Example (OutputUsage) ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/bedrockruntime/types" ) func main() { var union types.Tool // type switches can be used to check the union value switch v := union.(type) { case *types.ToolMemberToolSpec: _ = v.Value // Value is types.ToolSpecification case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) default: fmt.Println("union is nil or unknown type") } }
Output:
type ToolChoice ¶ added in v1.9.0
type ToolChoice interface {
// contains filtered or unexported methods
}
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.
The following types satisfy this interface:
ToolChoiceMemberAny ToolChoiceMemberAuto ToolChoiceMemberTool
Example (OutputUsage) ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/bedrockruntime/types" ) func main() { var union types.ToolChoice // type switches can be used to check the union value switch v := union.(type) { case *types.ToolChoiceMemberAny: _ = v.Value // Value is types.AnyToolChoice case *types.ToolChoiceMemberAuto: _ = v.Value // Value is types.AutoToolChoice case *types.ToolChoiceMemberTool: _ = v.Value // Value is types.SpecificToolChoice case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) default: fmt.Println("union is nil or unknown type") } }
Output:
type ToolChoiceMemberAny ¶ added in v1.9.0
type ToolChoiceMemberAny struct { Value AnyToolChoice // contains filtered or unexported fields }
The model must request at least one tool (no text is generated).
type ToolChoiceMemberAuto ¶ added in v1.9.0
type ToolChoiceMemberAuto struct { Value AutoToolChoice // contains filtered or unexported fields }
(Default). The Model automatically decides if a tool should be called or whether to generate text instead.
type ToolChoiceMemberTool ¶ added in v1.9.0
type ToolChoiceMemberTool struct { Value SpecificToolChoice // contains filtered or unexported fields }
The Model must request the specified tool. Only supported by Anthropic Claude 3 models.
type ToolConfiguration ¶ added in v1.9.0
type ToolConfiguration struct { // An array of tools that you want to pass to a model. // // This member is required. Tools []Tool // If supported by model, forces the model to request a tool. ToolChoice ToolChoice // contains filtered or unexported fields }
Configuration information for the tools that you pass to a model. For more information, see Tool use (function calling)in the Amazon Bedrock User Guide.
type ToolInputSchema ¶ added in v1.9.0
type ToolInputSchema interface {
// contains filtered or unexported methods
}
The schema for the tool. The top level schema type must be object .
The following types satisfy this interface:
ToolInputSchemaMemberJson
Example (OutputUsage) ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/bedrockruntime/types" ) func main() { var union types.ToolInputSchema // type switches can be used to check the union value switch v := union.(type) { case *types.ToolInputSchemaMemberJson: _ = v.Value // Value is document.Interface case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) default: fmt.Println("union is nil or unknown type") } }
Output:
type ToolInputSchemaMemberJson ¶ added in v1.9.0
type ToolInputSchemaMemberJson struct { Value document.Interface // contains filtered or unexported fields }
The JSON schema for the tool. For more information, see JSON Schema Reference.
type ToolMemberToolSpec ¶ added in v1.9.0
type ToolMemberToolSpec struct { Value ToolSpecification // contains filtered or unexported fields }
The specfication for the tool.
type ToolResultBlock ¶ added in v1.9.0
type ToolResultBlock struct { // The content for tool result content block. // // This member is required. Content []ToolResultContentBlock // The ID of the tool request that this is the result for. // // This member is required. ToolUseId *string // The status for the tool result content block. // // This field is only supported Anthropic Claude 3 models. Status ToolResultStatus // contains filtered or unexported fields }
A tool result block that contains the results for a tool request that the model previously made.
type ToolResultContentBlock ¶ added in v1.9.0
type ToolResultContentBlock interface {
// contains filtered or unexported methods
}
The tool result content block.
The following types satisfy this interface:
ToolResultContentBlockMemberDocument ToolResultContentBlockMemberImage ToolResultContentBlockMemberJson ToolResultContentBlockMemberText ToolResultContentBlockMemberVideo
Example (OutputUsage) ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/bedrockruntime/types" ) func main() { var union types.ToolResultContentBlock // type switches can be used to check the union value switch v := union.(type) { case *types.ToolResultContentBlockMemberDocument: _ = v.Value // Value is types.DocumentBlock case *types.ToolResultContentBlockMemberImage: _ = v.Value // Value is types.ImageBlock case *types.ToolResultContentBlockMemberJson: _ = v.Value // Value is document.Interface case *types.ToolResultContentBlockMemberText: _ = v.Value // Value is string case *types.ToolResultContentBlockMemberVideo: _ = v.Value // Value is types.VideoBlock case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) default: fmt.Println("union is nil or unknown type") } }
Output:
type ToolResultContentBlockMemberDocument ¶ added in v1.11.0
type ToolResultContentBlockMemberDocument struct { Value DocumentBlock // contains filtered or unexported fields }
A tool result that is a document.
type ToolResultContentBlockMemberImage ¶ added in v1.9.0
type ToolResultContentBlockMemberImage struct { Value ImageBlock // contains filtered or unexported fields }
A tool result that is an image.
This field is only supported by Anthropic Claude 3 models.
type ToolResultContentBlockMemberJson ¶ added in v1.9.0
type ToolResultContentBlockMemberJson struct { Value document.Interface // contains filtered or unexported fields }
A tool result that is JSON format data.
type ToolResultContentBlockMemberText ¶ added in v1.9.0
type ToolResultContentBlockMemberText struct { Value string // contains filtered or unexported fields }
A tool result that is text.
type ToolResultContentBlockMemberVideo ¶ added in v1.22.0
type ToolResultContentBlockMemberVideo struct { Value VideoBlock // contains filtered or unexported fields }
A tool result that is video.
type ToolResultStatus ¶ added in v1.9.0
type ToolResultStatus string
const ( ToolResultStatusSuccess ToolResultStatus = "success" ToolResultStatusError ToolResultStatus = "error" )
Enum values for ToolResultStatus
func (ToolResultStatus) Values ¶ added in v1.9.0
func (ToolResultStatus) Values() []ToolResultStatus
Values returns all known values for ToolResultStatus. Note that this can be expanded in the future, and so it is only as up to date as the client.
The ordering of this slice is not guaranteed to be stable across updates.
type ToolSpecification ¶ added in v1.9.0
type ToolSpecification struct { // The input schema for the tool in JSON format. // // This member is required. InputSchema ToolInputSchema // The name for the tool. // // This member is required. Name *string // The description for the tool. Description *string // contains filtered or unexported fields }
The specification for the tool.
type ToolUseBlock ¶ added in v1.9.0
type ToolUseBlock struct { // The input to pass to the tool. // // This member is required. Input document.Interface // The name of the tool that the model wants to use. // // This member is required. Name *string // The ID for the tool request. // // This member is required. ToolUseId *string // contains filtered or unexported fields }
A tool use content block. Contains information about a tool that the model is requesting be run., The model uses the result from the tool to generate a response.
type ToolUseBlockDelta ¶ added in v1.9.0
type ToolUseBlockDelta struct { // The input for a requested tool. // // This member is required. Input *string // contains filtered or unexported fields }
The delta for a tool use block.
type ToolUseBlockStart ¶ added in v1.9.0
type ToolUseBlockStart struct { // The name of the tool that the model is requesting to use. // // This member is required. Name *string // The ID for the tool request. // // This member is required. ToolUseId *string // contains filtered or unexported fields }
The start of a tool use block.
type UnknownUnionMember ¶
type UnknownUnionMember struct { Tag string Value []byte // contains filtered or unexported fields }
UnknownUnionMember is returned when a union member is returned over the wire, but has an unknown tag.
type ValidationException ¶
type ValidationException struct { Message *string ErrorCodeOverride *string // contains filtered or unexported fields }
The input fails to satisfy the constraints specified by Amazon Bedrock. For troubleshooting this error, see ValidationErrorin the Amazon Bedrock User Guide
func (*ValidationException) Error ¶
func (e *ValidationException) Error() string
func (*ValidationException) ErrorCode ¶
func (e *ValidationException) ErrorCode() string
func (*ValidationException) ErrorFault ¶
func (e *ValidationException) ErrorFault() smithy.ErrorFault
func (*ValidationException) ErrorMessage ¶
func (e *ValidationException) ErrorMessage() string
type VideoBlock ¶ added in v1.22.0
type VideoBlock struct { // The block's format. // // This member is required. Format VideoFormat // The block's source. // // This member is required. Source VideoSource // contains filtered or unexported fields }
A video block.
type VideoFormat ¶ added in v1.22.0
type VideoFormat string
const ( VideoFormatMkv VideoFormat = "mkv" VideoFormatMov VideoFormat = "mov" VideoFormatMp4 VideoFormat = "mp4" VideoFormatWebm VideoFormat = "webm" VideoFormatFlv VideoFormat = "flv" VideoFormatMpeg VideoFormat = "mpeg" VideoFormatMpg VideoFormat = "mpg" VideoFormatWmv VideoFormat = "wmv" VideoFormatThreeGp VideoFormat = "three_gp" )
Enum values for VideoFormat
func (VideoFormat) Values ¶ added in v1.22.0
func (VideoFormat) Values() []VideoFormat
Values returns all known values for VideoFormat. Note that this can be expanded in the future, and so it is only as up to date as the client.
The ordering of this slice is not guaranteed to be stable across updates.
type VideoSource ¶ added in v1.22.0
type VideoSource interface {
// contains filtered or unexported methods
}
A video source. You can upload a smaller video as a base64-encoded string as long as the encoded file is less than 25MB. You can also transfer videos up to 1GB in size from an S3 bucket.
The following types satisfy this interface:
VideoSourceMemberBytes VideoSourceMemberS3Location
Example (OutputUsage) ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/bedrockruntime/types" ) func main() { var union types.VideoSource // type switches can be used to check the union value switch v := union.(type) { case *types.VideoSourceMemberBytes: _ = v.Value // Value is []byte case *types.VideoSourceMemberS3Location: _ = v.Value // Value is types.S3Location case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) default: fmt.Println("union is nil or unknown type") } }
Output:
type VideoSourceMemberBytes ¶ added in v1.22.0
type VideoSourceMemberBytes struct { Value []byte // contains filtered or unexported fields }
Video content encoded in base64.
type VideoSourceMemberS3Location ¶ added in v1.22.0
type VideoSourceMemberS3Location struct { Value S3Location // contains filtered or unexported fields }
The location of a video object in an S3 bucket.