...
AWS SDK for Go API Reference
We announced the upcoming end-of-support for AWS SDK for Go (v1). We recommend that you migrate to AWS SDK for Go v2. For dates, additional details, and information on how to migrate, please refer to the linked announcement.
import "github.com/aws/aws-sdk-go/service/bedrockruntime"
Overview
Constants

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

The stub package, bedrockruntimeiface, can be used to provide alternative implementations of service clients, such as mocking the client for testing.

Types ▾

type BedrockRuntime
func New(p client.ConfigProvider, cfgs ...*aws.Config) *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, opts ...request.Option) (*InvokeModelWithResponseStreamOutput, error)
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
type AnyToolChoice
type ApplyGuardrailInput
type ApplyGuardrailOutput
type AutoToolChoice
type ContentBlock
type ContentBlockDelta
type ContentBlockDeltaEvent
type ContentBlockStart
type ContentBlockStartEvent
type ContentBlockStopEvent
type ConverseInput
type ConverseMetrics
type ConverseOutput
type ConverseOutput_
type ConverseStreamEventStream
func (es *ConverseStreamEventStream) Close() (err error)
func (es *ConverseStreamEventStream) Err() error
func (es *ConverseStreamEventStream) Events() <-chan ConverseStreamOutput_Event
type ConverseStreamInput
type ConverseStreamMetadataEvent
type ConverseStreamMetrics
type ConverseStreamOutput
func (s *ConverseStreamOutput) GetStream() *ConverseStreamEventStream
type ConverseStreamOutput_Event
type ConverseStreamOutput_Reader
type ConverseStreamOutput_UnknownEvent
type ConverseStreamTrace
type ConverseTrace
type DocumentBlock
type DocumentSource
type GuardrailAssessment
type GuardrailConfiguration
type GuardrailContentBlock
type GuardrailContentFilter
type GuardrailContentPolicyAssessment
type GuardrailContextualGroundingFilter
type GuardrailContextualGroundingPolicyAssessment
type GuardrailConverseContentBlock
type GuardrailConverseTextBlock
type GuardrailCustomWord
type GuardrailManagedWord
type GuardrailOutputContent
type GuardrailPiiEntityFilter
type GuardrailRegexFilter
type GuardrailSensitiveInformationPolicyAssessment
type GuardrailStreamConfiguration
type GuardrailTextBlock
type GuardrailTopic
type GuardrailTopicPolicyAssessment
type GuardrailTraceAssessment
type GuardrailUsage
type GuardrailWordPolicyAssessment
type ImageBlock
type ImageSource
type InferenceConfiguration
type InternalServerException
type InvokeModelInput
type InvokeModelOutput
type InvokeModelWithResponseStreamEventStream
func (es *InvokeModelWithResponseStreamEventStream) Close() (err error)
func (es *InvokeModelWithResponseStreamEventStream) Err() error
func (es *InvokeModelWithResponseStreamEventStream) Events() <-chan ResponseStreamEvent
type InvokeModelWithResponseStreamInput
type InvokeModelWithResponseStreamOutput
func (s *InvokeModelWithResponseStreamOutput) GetStream() *InvokeModelWithResponseStreamEventStream
type Message
type MessageStartEvent
type MessageStopEvent
type ModelErrorException
type ModelNotReadyException
type ModelStreamErrorException
type ModelTimeoutException
type PayloadPart
type ResourceNotFoundException
type ResponseStreamEvent
type ResponseStreamReader
type ResponseStreamUnknownEvent
type ServiceQuotaExceededException
type ServiceUnavailableException
type SpecificToolChoice
type SystemContentBlock
type ThrottlingException
type TokenUsage
type Tool
type ToolChoice
type ToolConfiguration
type ToolInputSchema
type ToolResultBlock
type ToolResultContentBlock
type ToolSpecification
type ToolUseBlockDelta
type ToolUseBlockStart
type ValidationException

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"

    // ErrCodeServiceUnavailableException for service response error code
    // "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"
)

func ConversationRole_Values

func ConversationRole_Values() []string

ConversationRole_Values returns all elements of the ConversationRole enum

func DocumentFormat_Values

func DocumentFormat_Values() []string

DocumentFormat_Values returns all elements of the DocumentFormat enum

func GuardrailAction_Values

func GuardrailAction_Values() []string

GuardrailAction_Values returns all elements of the GuardrailAction enum

func GuardrailContentFilterConfidence_Values

func GuardrailContentFilterConfidence_Values() []string

GuardrailContentFilterConfidence_Values returns all elements of the GuardrailContentFilterConfidence enum

func GuardrailContentFilterType_Values

func GuardrailContentFilterType_Values() []string

GuardrailContentFilterType_Values returns all elements of the GuardrailContentFilterType enum

func GuardrailContentPolicyAction_Values

func GuardrailContentPolicyAction_Values() []string

GuardrailContentPolicyAction_Values returns all elements of the GuardrailContentPolicyAction enum

func GuardrailContentQualifier_Values

func GuardrailContentQualifier_Values() []string

GuardrailContentQualifier_Values returns all elements of the GuardrailContentQualifier enum

func GuardrailContentSource_Values

func GuardrailContentSource_Values() []string

GuardrailContentSource_Values returns all elements of the GuardrailContentSource enum

func GuardrailContextualGroundingFilterType_Values

func GuardrailContextualGroundingFilterType_Values() []string

GuardrailContextualGroundingFilterType_Values returns all elements of the GuardrailContextualGroundingFilterType enum

func GuardrailContextualGroundingPolicyAction_Values

func GuardrailContextualGroundingPolicyAction_Values() []string

GuardrailContextualGroundingPolicyAction_Values returns all elements of the GuardrailContextualGroundingPolicyAction enum

func GuardrailConverseContentQualifier_Values

func GuardrailConverseContentQualifier_Values() []string

GuardrailConverseContentQualifier_Values returns all elements of the GuardrailConverseContentQualifier enum

func GuardrailManagedWordType_Values

func GuardrailManagedWordType_Values() []string

GuardrailManagedWordType_Values returns all elements of the GuardrailManagedWordType enum

func GuardrailPiiEntityType_Values

func GuardrailPiiEntityType_Values() []string

GuardrailPiiEntityType_Values returns all elements of the GuardrailPiiEntityType enum

func GuardrailSensitiveInformationPolicyAction_Values

func GuardrailSensitiveInformationPolicyAction_Values() []string

GuardrailSensitiveInformationPolicyAction_Values returns all elements of the GuardrailSensitiveInformationPolicyAction enum

func GuardrailStreamProcessingMode_Values

func GuardrailStreamProcessingMode_Values() []string

GuardrailStreamProcessingMode_Values returns all elements of the GuardrailStreamProcessingMode enum

func GuardrailTopicPolicyAction_Values

func GuardrailTopicPolicyAction_Values() []string

GuardrailTopicPolicyAction_Values returns all elements of the GuardrailTopicPolicyAction enum

func GuardrailTopicType_Values

func GuardrailTopicType_Values() []string

GuardrailTopicType_Values returns all elements of the GuardrailTopicType enum

func GuardrailTrace_Values

func GuardrailTrace_Values() []string

GuardrailTrace_Values returns all elements of the GuardrailTrace enum

func GuardrailWordPolicyAction_Values

func GuardrailWordPolicyAction_Values() []string

GuardrailWordPolicyAction_Values returns all elements of the GuardrailWordPolicyAction enum

func ImageFormat_Values

func ImageFormat_Values() []string

ImageFormat_Values returns all elements of the ImageFormat enum

func StopReason_Values

func StopReason_Values() []string

StopReason_Values returns all elements of the StopReason enum

func ToolResultStatus_Values

func ToolResultStatus_Values() []string

ToolResultStatus_Values returns all elements of the ToolResultStatus enum

func Trace_Values

func Trace_Values() []string

Trace_Values returns all elements of the Trace enum

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

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

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

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

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

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

func (s *ApplyGuardrailInput) SetContent(v []*GuardrailContentBlock) *ApplyGuardrailInput

SetContent sets the Content field's value.

func (*ApplyGuardrailInput) SetGuardrailIdentifier

func (s *ApplyGuardrailInput) SetGuardrailIdentifier(v string) *ApplyGuardrailInput

SetGuardrailIdentifier sets the GuardrailIdentifier field's value.

func (*ApplyGuardrailInput) SetGuardrailVersion

func (s *ApplyGuardrailInput) SetGuardrailVersion(v string) *ApplyGuardrailInput

SetGuardrailVersion sets the GuardrailVersion field's value.

func (*ApplyGuardrailInput) SetSource

func (s *ApplyGuardrailInput) SetSource(v string) *ApplyGuardrailInput

SetSource sets the Source field's value.

func (ApplyGuardrailInput) String

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

func (s *ApplyGuardrailInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type ApplyGuardrailOutput

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

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

func (s *ApplyGuardrailOutput) SetAction(v string) *ApplyGuardrailOutput

SetAction sets the Action field's value.

func (*ApplyGuardrailOutput) SetAssessments

func (s *ApplyGuardrailOutput) SetAssessments(v []*GuardrailAssessment) *ApplyGuardrailOutput

SetAssessments sets the Assessments field's value.

func (*ApplyGuardrailOutput) SetOutputs

func (s *ApplyGuardrailOutput) SetOutputs(v []*GuardrailOutputContent) *ApplyGuardrailOutput

SetOutputs sets the Outputs field's value.

func (*ApplyGuardrailOutput) SetUsage

func (s *ApplyGuardrailOutput) SetUsage(v *GuardrailUsage) *ApplyGuardrailOutput

SetUsage sets the Usage field's value.

func (ApplyGuardrailOutput) String

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

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

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

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

type BedrockRuntime struct {
    *client.Client
}

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

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

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

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

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

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

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

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

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

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

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

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

func (s *ContentBlock) SetDocument(v *DocumentBlock) *ContentBlock

SetDocument sets the Document field's value.

func (*ContentBlock) SetGuardContent

func (s *ContentBlock) SetGuardContent(v *GuardrailConverseContentBlock) *ContentBlock

SetGuardContent sets the GuardContent field's value.

func (*ContentBlock) SetImage

func (s *ContentBlock) SetImage(v *ImageBlock) *ContentBlock

SetImage sets the Image field's value.

func (*ContentBlock) SetText

func (s *ContentBlock) SetText(v string) *ContentBlock

SetText sets the Text field's value.

func (*ContentBlock) SetToolResult

func (s *ContentBlock) SetToolResult(v *ToolResultBlock) *ContentBlock

SetToolResult sets the ToolResult field's value.

func (ContentBlock) String

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

func (s *ContentBlock) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type ContentBlockDelta

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

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

func (s *ContentBlockDelta) SetText(v string) *ContentBlockDelta

SetText sets the Text field's value.

func (*ContentBlockDelta) SetToolUse

func (s *ContentBlockDelta) SetToolUse(v *ToolUseBlockDelta) *ContentBlockDelta

SetToolUse sets the ToolUse field's value.

func (ContentBlockDelta) String

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

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

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

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

func (s *ContentBlockDeltaEvent) SetContentBlockIndex(v int64) *ContentBlockDeltaEvent

SetContentBlockIndex sets the ContentBlockIndex field's value.

func (*ContentBlockDeltaEvent) SetDelta

func (s *ContentBlockDeltaEvent) SetDelta(v *ContentBlockDelta) *ContentBlockDeltaEvent

SetDelta sets the Delta field's value.

func (ContentBlockDeltaEvent) String

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

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

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

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

func (s *ContentBlockStart) SetToolUse(v *ToolUseBlockStart) *ContentBlockStart

SetToolUse sets the ToolUse field's value.

func (ContentBlockStart) String

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

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

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

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

func (s *ContentBlockStartEvent) SetContentBlockIndex(v int64) *ContentBlockStartEvent

SetContentBlockIndex sets the ContentBlockIndex field's value.

func (*ContentBlockStartEvent) SetStart

func (s *ContentBlockStartEvent) SetStart(v *ContentBlockStart) *ContentBlockStartEvent

SetStart sets the Start field's value.

func (ContentBlockStartEvent) String

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

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

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

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

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

func (s *ContentBlockStopEvent) SetContentBlockIndex(v int64) *ContentBlockStopEvent

SetContentBlockIndex sets the ContentBlockIndex field's value.

func (ContentBlockStopEvent) String

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

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

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

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

func (s *ConverseInput) SetAdditionalModelResponseFieldPaths(v []*string) *ConverseInput

SetAdditionalModelResponseFieldPaths sets the AdditionalModelResponseFieldPaths field's value.

func (*ConverseInput) SetGuardrailConfig

func (s *ConverseInput) SetGuardrailConfig(v *GuardrailConfiguration) *ConverseInput

SetGuardrailConfig sets the GuardrailConfig field's value.

func (*ConverseInput) SetInferenceConfig

func (s *ConverseInput) SetInferenceConfig(v *InferenceConfiguration) *ConverseInput

SetInferenceConfig sets the InferenceConfig field's value.

func (*ConverseInput) SetMessages

func (s *ConverseInput) SetMessages(v []*Message) *ConverseInput

SetMessages sets the Messages field's value.

func (*ConverseInput) SetModelId

func (s *ConverseInput) SetModelId(v string) *ConverseInput

SetModelId sets the ModelId field's value.

func (*ConverseInput) SetSystem

func (s *ConverseInput) SetSystem(v []*SystemContentBlock) *ConverseInput

SetSystem sets the System field's value.

func (*ConverseInput) SetToolConfig

func (s *ConverseInput) SetToolConfig(v *ToolConfiguration) *ConverseInput

SetToolConfig sets the ToolConfig field's value.

func (ConverseInput) String

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

func (s *ConverseInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type ConverseMetrics

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

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

func (s *ConverseMetrics) SetLatencyMs(v int64) *ConverseMetrics

SetLatencyMs sets the LatencyMs field's value.

func (ConverseMetrics) String

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

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

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

func (s *ConverseOutput) SetMetrics(v *ConverseMetrics) *ConverseOutput

SetMetrics sets the Metrics field's value.

func (*ConverseOutput) SetOutput

func (s *ConverseOutput) SetOutput(v *ConverseOutput_) *ConverseOutput

SetOutput sets the Output field's value.

func (*ConverseOutput) SetStopReason

func (s *ConverseOutput) SetStopReason(v string) *ConverseOutput

SetStopReason sets the StopReason field's value.

func (*ConverseOutput) SetTrace

func (s *ConverseOutput) SetTrace(v *ConverseTrace) *ConverseOutput

SetTrace sets the Trace field's value.

func (*ConverseOutput) SetUsage

func (s *ConverseOutput) SetUsage(v *TokenUsage) *ConverseOutput

SetUsage sets the Usage field's value.

func (ConverseOutput) String

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_

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

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

func (s *ConverseOutput_) SetMessage(v *Message) *ConverseOutput_

SetMessage sets the Message field's value.

func (ConverseOutput_) String

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

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

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

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

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

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

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

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

func (s *ConverseStreamInput) SetAdditionalModelResponseFieldPaths(v []*string) *ConverseStreamInput

SetAdditionalModelResponseFieldPaths sets the AdditionalModelResponseFieldPaths field's value.

func (*ConverseStreamInput) SetGuardrailConfig

func (s *ConverseStreamInput) SetGuardrailConfig(v *GuardrailStreamConfiguration) *ConverseStreamInput

SetGuardrailConfig sets the GuardrailConfig field's value.

func (*ConverseStreamInput) SetInferenceConfig

func (s *ConverseStreamInput) SetInferenceConfig(v *InferenceConfiguration) *ConverseStreamInput

SetInferenceConfig sets the InferenceConfig field's value.

func (*ConverseStreamInput) SetMessages

func (s *ConverseStreamInput) SetMessages(v []*Message) *ConverseStreamInput

SetMessages sets the Messages field's value.

func (*ConverseStreamInput) SetModelId

func (s *ConverseStreamInput) SetModelId(v string) *ConverseStreamInput

SetModelId sets the ModelId field's value.

func (*ConverseStreamInput) SetSystem

func (s *ConverseStreamInput) SetSystem(v []*SystemContentBlock) *ConverseStreamInput

SetSystem sets the System field's value.

func (*ConverseStreamInput) SetToolConfig

func (s *ConverseStreamInput) SetToolConfig(v *ToolConfiguration) *ConverseStreamInput

SetToolConfig sets the ToolConfig field's value.

func (ConverseStreamInput) String

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

func (s *ConverseStreamInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type ConverseStreamMetadataEvent

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

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

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

func (s *ConverseStreamMetadataEvent) SetMetrics(v *ConverseStreamMetrics) *ConverseStreamMetadataEvent

SetMetrics sets the Metrics field's value.

func (*ConverseStreamMetadataEvent) SetTrace

func (s *ConverseStreamMetadataEvent) SetTrace(v *ConverseStreamTrace) *ConverseStreamMetadataEvent

SetTrace sets the Trace field's value.

func (*ConverseStreamMetadataEvent) SetUsage

func (s *ConverseStreamMetadataEvent) SetUsage(v *TokenUsage) *ConverseStreamMetadataEvent

SetUsage sets the Usage field's value.

func (ConverseStreamMetadataEvent) String

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

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

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

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

func (s *ConverseStreamMetrics) SetLatencyMs(v int64) *ConverseStreamMetrics

SetLatencyMs sets the LatencyMs field's value.

func (ConverseStreamMetrics) String

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

type ConverseStreamOutput struct {
    // contains filtered or unexported fields
}

func (*ConverseStreamOutput) GetStream

func (s *ConverseStreamOutput) GetStream() *ConverseStreamEventStream

GetStream returns the type to interact with the event stream.

func (ConverseStreamOutput) GoString

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

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

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

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

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

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

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

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

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

func (s *ConverseStreamTrace) SetGuardrail(v *GuardrailTraceAssessment) *ConverseStreamTrace

SetGuardrail sets the Guardrail field's value.

func (ConverseStreamTrace) String

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

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

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

func (s *ConverseTrace) SetGuardrail(v *GuardrailTraceAssessment) *ConverseTrace

SetGuardrail sets the Guardrail field's value.

func (ConverseTrace) String

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

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

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

func (s *DocumentBlock) SetFormat(v string) *DocumentBlock

SetFormat sets the Format field's value.

func (*DocumentBlock) SetName

func (s *DocumentBlock) SetName(v string) *DocumentBlock

SetName sets the Name field's value.

func (*DocumentBlock) SetSource

func (s *DocumentBlock) SetSource(v *DocumentSource) *DocumentBlock

SetSource sets the Source field's value.

func (DocumentBlock) String

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

func (s *DocumentBlock) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DocumentSource

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

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

func (s *DocumentSource) SetBytes(v []byte) *DocumentSource

SetBytes sets the Bytes field's value.

func (DocumentSource) String

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

func (s *DocumentSource) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type GuardrailAssessment

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

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

func (s *GuardrailAssessment) SetContentPolicy(v *GuardrailContentPolicyAssessment) *GuardrailAssessment

SetContentPolicy sets the ContentPolicy field's value.

func (*GuardrailAssessment) SetContextualGroundingPolicy

func (s *GuardrailAssessment) SetContextualGroundingPolicy(v *GuardrailContextualGroundingPolicyAssessment) *GuardrailAssessment

SetContextualGroundingPolicy sets the ContextualGroundingPolicy field's value.

func (*GuardrailAssessment) SetSensitiveInformationPolicy

func (s *GuardrailAssessment) SetSensitiveInformationPolicy(v *GuardrailSensitiveInformationPolicyAssessment) *GuardrailAssessment

SetSensitiveInformationPolicy sets the SensitiveInformationPolicy field's value.

func (*GuardrailAssessment) SetTopicPolicy

func (s *GuardrailAssessment) SetTopicPolicy(v *GuardrailTopicPolicyAssessment) *GuardrailAssessment

SetTopicPolicy sets the TopicPolicy field's value.

func (*GuardrailAssessment) SetWordPolicy

func (s *GuardrailAssessment) SetWordPolicy(v *GuardrailWordPolicyAssessment) *GuardrailAssessment

SetWordPolicy sets the WordPolicy field's value.

func (GuardrailAssessment) String

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

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

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

func (s *GuardrailConfiguration) SetGuardrailIdentifier(v string) *GuardrailConfiguration

SetGuardrailIdentifier sets the GuardrailIdentifier field's value.

func (*GuardrailConfiguration) SetGuardrailVersion

func (s *GuardrailConfiguration) SetGuardrailVersion(v string) *GuardrailConfiguration

SetGuardrailVersion sets the GuardrailVersion field's value.

func (*GuardrailConfiguration) SetTrace

func (s *GuardrailConfiguration) SetTrace(v string) *GuardrailConfiguration

SetTrace sets the Trace field's value.

func (GuardrailConfiguration) String

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

func (s *GuardrailConfiguration) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type GuardrailContentBlock

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

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

func (s *GuardrailContentBlock) SetText(v *GuardrailTextBlock) *GuardrailContentBlock

SetText sets the Text field's value.

func (GuardrailContentBlock) String

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

func (s *GuardrailContentBlock) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type GuardrailContentFilter

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

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

func (s *GuardrailContentFilter) SetAction(v string) *GuardrailContentFilter

SetAction sets the Action field's value.

func (*GuardrailContentFilter) SetConfidence

func (s *GuardrailContentFilter) SetConfidence(v string) *GuardrailContentFilter

SetConfidence sets the Confidence field's value.

func (*GuardrailContentFilter) SetType

func (s *GuardrailContentFilter) SetType(v string) *GuardrailContentFilter

SetType sets the Type field's value.

func (GuardrailContentFilter) String

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

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

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

func (s *GuardrailContentPolicyAssessment) SetFilters(v []*GuardrailContentFilter) *GuardrailContentPolicyAssessment

SetFilters sets the Filters field's value.

func (GuardrailContentPolicyAssessment) String

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

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

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

func (s *GuardrailContextualGroundingFilter) SetAction(v string) *GuardrailContextualGroundingFilter

SetAction sets the Action field's value.

func (*GuardrailContextualGroundingFilter) SetScore

func (s *GuardrailContextualGroundingFilter) SetScore(v float64) *GuardrailContextualGroundingFilter

SetScore sets the Score field's value.

func (*GuardrailContextualGroundingFilter) SetThreshold

func (s *GuardrailContextualGroundingFilter) SetThreshold(v float64) *GuardrailContextualGroundingFilter

SetThreshold sets the Threshold field's value.

func (*GuardrailContextualGroundingFilter) SetType

func (s *GuardrailContextualGroundingFilter) SetType(v string) *GuardrailContextualGroundingFilter

SetType sets the Type field's value.

func (GuardrailContextualGroundingFilter) String

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

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

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

func (s *GuardrailContextualGroundingPolicyAssessment) SetFilters(v []*GuardrailContextualGroundingFilter) *GuardrailContextualGroundingPolicyAssessment

SetFilters sets the Filters field's value.

func (GuardrailContextualGroundingPolicyAssessment) String

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

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

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

func (s *GuardrailConverseContentBlock) SetText(v *GuardrailConverseTextBlock) *GuardrailConverseContentBlock

SetText sets the Text field's value.

func (GuardrailConverseContentBlock) String

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

func (s *GuardrailConverseContentBlock) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type GuardrailConverseTextBlock

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

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

func (s *GuardrailConverseTextBlock) SetQualifiers(v []*string) *GuardrailConverseTextBlock

SetQualifiers sets the Qualifiers field's value.

func (*GuardrailConverseTextBlock) SetText

func (s *GuardrailConverseTextBlock) SetText(v string) *GuardrailConverseTextBlock

SetText sets the Text field's value.

func (GuardrailConverseTextBlock) String

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

func (s *GuardrailConverseTextBlock) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type GuardrailCustomWord

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

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

func (s *GuardrailCustomWord) SetAction(v string) *GuardrailCustomWord

SetAction sets the Action field's value.

func (*GuardrailCustomWord) SetMatch

func (s *GuardrailCustomWord) SetMatch(v string) *GuardrailCustomWord

SetMatch sets the Match field's value.

func (GuardrailCustomWord) String

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

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

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

func (s *GuardrailManagedWord) SetAction(v string) *GuardrailManagedWord

SetAction sets the Action field's value.

func (*GuardrailManagedWord) SetMatch

func (s *GuardrailManagedWord) SetMatch(v string) *GuardrailManagedWord

SetMatch sets the Match field's value.

func (*GuardrailManagedWord) SetType

func (s *GuardrailManagedWord) SetType(v string) *GuardrailManagedWord

SetType sets the Type field's value.

func (GuardrailManagedWord) String

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

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

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

func (s *GuardrailOutputContent) SetText(v string) *GuardrailOutputContent

SetText sets the Text field's value.

func (GuardrailOutputContent) String

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

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

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

func (s *GuardrailPiiEntityFilter) SetAction(v string) *GuardrailPiiEntityFilter

SetAction sets the Action field's value.

func (*GuardrailPiiEntityFilter) SetMatch

func (s *GuardrailPiiEntityFilter) SetMatch(v string) *GuardrailPiiEntityFilter

SetMatch sets the Match field's value.

func (*GuardrailPiiEntityFilter) SetType

func (s *GuardrailPiiEntityFilter) SetType(v string) *GuardrailPiiEntityFilter

SetType sets the Type field's value.

func (GuardrailPiiEntityFilter) String

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

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

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

func (s *GuardrailRegexFilter) SetAction(v string) *GuardrailRegexFilter

SetAction sets the Action field's value.

func (*GuardrailRegexFilter) SetMatch

func (s *GuardrailRegexFilter) SetMatch(v string) *GuardrailRegexFilter

SetMatch sets the Match field's value.

func (*GuardrailRegexFilter) SetName

func (s *GuardrailRegexFilter) SetName(v string) *GuardrailRegexFilter

SetName sets the Name field's value.

func (*GuardrailRegexFilter) SetRegex

func (s *GuardrailRegexFilter) SetRegex(v string) *GuardrailRegexFilter

SetRegex sets the Regex field's value.

func (GuardrailRegexFilter) String

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

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

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

func (s *GuardrailSensitiveInformationPolicyAssessment) SetPiiEntities(v []*GuardrailPiiEntityFilter) *GuardrailSensitiveInformationPolicyAssessment

SetPiiEntities sets the PiiEntities field's value.

func (*GuardrailSensitiveInformationPolicyAssessment) SetRegexes

func (s *GuardrailSensitiveInformationPolicyAssessment) SetRegexes(v []*GuardrailRegexFilter) *GuardrailSensitiveInformationPolicyAssessment

SetRegexes sets the Regexes field's value.

func (GuardrailSensitiveInformationPolicyAssessment) String

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

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

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

func (s *GuardrailStreamConfiguration) SetGuardrailIdentifier(v string) *GuardrailStreamConfiguration

SetGuardrailIdentifier sets the GuardrailIdentifier field's value.

func (*GuardrailStreamConfiguration) SetGuardrailVersion

func (s *GuardrailStreamConfiguration) SetGuardrailVersion(v string) *GuardrailStreamConfiguration

SetGuardrailVersion sets the GuardrailVersion field's value.

func (*GuardrailStreamConfiguration) SetStreamProcessingMode

func (s *GuardrailStreamConfiguration) SetStreamProcessingMode(v string) *GuardrailStreamConfiguration

SetStreamProcessingMode sets the StreamProcessingMode field's value.

func (*GuardrailStreamConfiguration) SetTrace

func (s *GuardrailStreamConfiguration) SetTrace(v string) *GuardrailStreamConfiguration

SetTrace sets the Trace field's value.

func (GuardrailStreamConfiguration) String

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

func (s *GuardrailStreamConfiguration) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type GuardrailTextBlock

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

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

func (s *GuardrailTextBlock) SetQualifiers(v []*string) *GuardrailTextBlock

SetQualifiers sets the Qualifiers field's value.

func (*GuardrailTextBlock) SetText

func (s *GuardrailTextBlock) SetText(v string) *GuardrailTextBlock

SetText sets the Text field's value.

func (GuardrailTextBlock) String

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

func (s *GuardrailTextBlock) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type GuardrailTopic

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

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

func (s *GuardrailTopic) SetAction(v string) *GuardrailTopic

SetAction sets the Action field's value.

func (*GuardrailTopic) SetName

func (s *GuardrailTopic) SetName(v string) *GuardrailTopic

SetName sets the Name field's value.

func (*GuardrailTopic) SetType

func (s *GuardrailTopic) SetType(v string) *GuardrailTopic

SetType sets the Type field's value.

func (GuardrailTopic) String

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

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

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

func (s *GuardrailTopicPolicyAssessment) SetTopics(v []*GuardrailTopic) *GuardrailTopicPolicyAssessment

SetTopics sets the Topics field's value.

func (GuardrailTopicPolicyAssessment) String

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

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

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

func (s *GuardrailTraceAssessment) SetInputAssessment(v map[string]*GuardrailAssessment) *GuardrailTraceAssessment

SetInputAssessment sets the InputAssessment field's value.

func (*GuardrailTraceAssessment) SetModelOutput

func (s *GuardrailTraceAssessment) SetModelOutput(v []*string) *GuardrailTraceAssessment

SetModelOutput sets the ModelOutput field's value.

func (*GuardrailTraceAssessment) SetOutputAssessments

func (s *GuardrailTraceAssessment) SetOutputAssessments(v map[string][]*GuardrailAssessment) *GuardrailTraceAssessment

SetOutputAssessments sets the OutputAssessments field's value.

func (GuardrailTraceAssessment) String

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

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

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

func (s *GuardrailUsage) SetContentPolicyUnits(v int64) *GuardrailUsage

SetContentPolicyUnits sets the ContentPolicyUnits field's value.

func (*GuardrailUsage) SetContextualGroundingPolicyUnits

func (s *GuardrailUsage) SetContextualGroundingPolicyUnits(v int64) *GuardrailUsage

SetContextualGroundingPolicyUnits sets the ContextualGroundingPolicyUnits field's value.

func (*GuardrailUsage) SetSensitiveInformationPolicyFreeUnits

func (s *GuardrailUsage) SetSensitiveInformationPolicyFreeUnits(v int64) *GuardrailUsage

SetSensitiveInformationPolicyFreeUnits sets the SensitiveInformationPolicyFreeUnits field's value.

func (*GuardrailUsage) SetSensitiveInformationPolicyUnits

func (s *GuardrailUsage) SetSensitiveInformationPolicyUnits(v int64) *GuardrailUsage

SetSensitiveInformationPolicyUnits sets the SensitiveInformationPolicyUnits field's value.

func (*GuardrailUsage) SetTopicPolicyUnits

func (s *GuardrailUsage) SetTopicPolicyUnits(v int64) *GuardrailUsage

SetTopicPolicyUnits sets the TopicPolicyUnits field's value.

func (*GuardrailUsage) SetWordPolicyUnits

func (s *GuardrailUsage) SetWordPolicyUnits(v int64) *GuardrailUsage

SetWordPolicyUnits sets the WordPolicyUnits field's value.

func (GuardrailUsage) String

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

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

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

func (s *GuardrailWordPolicyAssessment) SetCustomWords(v []*GuardrailCustomWord) *GuardrailWordPolicyAssessment

SetCustomWords sets the CustomWords field's value.

func (*GuardrailWordPolicyAssessment) SetManagedWordLists

func (s *GuardrailWordPolicyAssessment) SetManagedWordLists(v []*GuardrailManagedWord) *GuardrailWordPolicyAssessment

SetManagedWordLists sets the ManagedWordLists field's value.

func (GuardrailWordPolicyAssessment) String

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

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

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

func (s *ImageBlock) SetFormat(v string) *ImageBlock

SetFormat sets the Format field's value.

func (*ImageBlock) SetSource

func (s *ImageBlock) SetSource(v *ImageSource) *ImageBlock

SetSource sets the Source field's value.

func (ImageBlock) String

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

func (s *ImageBlock) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type ImageSource

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

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

func (s *ImageSource) SetBytes(v []byte) *ImageSource

SetBytes sets the Bytes field's value.

func (ImageSource) String

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

func (s *ImageSource) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type InferenceConfiguration

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

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

func (s *InferenceConfiguration) SetMaxTokens(v int64) *InferenceConfiguration

SetMaxTokens sets the MaxTokens field's value.

func (*InferenceConfiguration) SetStopSequences

func (s *InferenceConfiguration) SetStopSequences(v []*string) *InferenceConfiguration

SetStopSequences sets the StopSequences field's value.

func (*InferenceConfiguration) SetTemperature

func (s *InferenceConfiguration) SetTemperature(v float64) *InferenceConfiguration

SetTemperature sets the Temperature field's value.

func (*InferenceConfiguration) SetTopP

func (s *InferenceConfiguration) SetTopP(v float64) *InferenceConfiguration

SetTopP sets the TopP field's value.

func (InferenceConfiguration) String

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

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

func (s *InvokeModelInput) SetGuardrailIdentifier(v string) *InvokeModelInput

SetGuardrailIdentifier sets the GuardrailIdentifier field's value.

func (*InvokeModelInput) SetGuardrailVersion

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

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

func (s *InvokeModelWithResponseStreamInput) SetGuardrailIdentifier(v string) *InvokeModelWithResponseStreamInput

SetGuardrailIdentifier sets the GuardrailIdentifier field's value.

func (*InvokeModelWithResponseStreamInput) SetGuardrailVersion

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

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

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

func (s Message) 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 (*Message) SetContent

func (s *Message) SetContent(v []*ContentBlock) *Message

SetContent sets the Content field's value.

func (*Message) SetRole

func (s *Message) SetRole(v string) *Message

SetRole sets the Role field's value.

func (Message) String

func (s Message) 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 (*Message) Validate

func (s *Message) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type MessageStartEvent

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

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

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

func (s *MessageStartEvent) SetRole(v string) *MessageStartEvent

SetRole sets the Role field's value.

func (MessageStartEvent) String

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

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

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

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

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

func (s *MessageStopEvent) SetStopReason(v string) *MessageStopEvent

SetStopReason sets the StopReason field's value.

func (MessageStopEvent) String

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

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

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

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

type ServiceUnavailableException struct {
    RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

    Message_ *string `locationName:"message" type:"string"`
    // contains filtered or unexported fields
}

The service isn't currently available. Try again later.

func (*ServiceUnavailableException) Code

func (s *ServiceUnavailableException) Code() string

Code returns the exception type name.

func (*ServiceUnavailableException) Error

func (s *ServiceUnavailableException) Error() string

func (ServiceUnavailableException) GoString

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

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

func (s *ServiceUnavailableException) Message() string

Message returns the exception's message.

func (*ServiceUnavailableException) OrigErr

func (s *ServiceUnavailableException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*ServiceUnavailableException) RequestID

func (s *ServiceUnavailableException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*ServiceUnavailableException) StatusCode

func (s *ServiceUnavailableException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (ServiceUnavailableException) String

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

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

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

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

func (s *SpecificToolChoice) SetName(v string) *SpecificToolChoice

SetName sets the Name field's value.

func (SpecificToolChoice) String

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

func (s *SpecificToolChoice) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type SystemContentBlock

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

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

func (s *SystemContentBlock) SetGuardContent(v *GuardrailConverseContentBlock) *SystemContentBlock

SetGuardContent sets the GuardContent field's value.

func (*SystemContentBlock) SetText

func (s *SystemContentBlock) SetText(v string) *SystemContentBlock

SetText sets the Text field's value.

func (SystemContentBlock) String

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

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

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

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

func (s *TokenUsage) SetInputTokens(v int64) *TokenUsage

SetInputTokens sets the InputTokens field's value.

func (*TokenUsage) SetOutputTokens

func (s *TokenUsage) SetOutputTokens(v int64) *TokenUsage

SetOutputTokens sets the OutputTokens field's value.

func (*TokenUsage) SetTotalTokens

func (s *TokenUsage) SetTotalTokens(v int64) *TokenUsage

SetTotalTokens sets the TotalTokens field's value.

func (TokenUsage) String

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

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

func (s Tool) 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 (*Tool) SetToolSpec

func (s *Tool) SetToolSpec(v *ToolSpecification) *Tool

SetToolSpec sets the ToolSpec field's value.

func (Tool) String

func (s Tool) 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 (*Tool) Validate

func (s *Tool) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type ToolChoice

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

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

func (s *ToolChoice) SetAny(v *AnyToolChoice) *ToolChoice

SetAny sets the Any field's value.

func (*ToolChoice) SetAuto

func (s *ToolChoice) SetAuto(v *AutoToolChoice) *ToolChoice

SetAuto sets the Auto field's value.

func (*ToolChoice) SetTool

func (s *ToolChoice) SetTool(v *SpecificToolChoice) *ToolChoice

SetTool sets the Tool field's value.

func (ToolChoice) String

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

func (s *ToolChoice) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type ToolConfiguration

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

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

func (s *ToolConfiguration) SetToolChoice(v *ToolChoice) *ToolConfiguration

SetToolChoice sets the ToolChoice field's value.

func (*ToolConfiguration) SetTools

func (s *ToolConfiguration) SetTools(v []*Tool) *ToolConfiguration

SetTools sets the Tools field's value.

func (ToolConfiguration) String

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

func (s *ToolConfiguration) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type ToolInputSchema

type ToolInputSchema struct {
    // contains filtered or unexported fields
}

The schema for the tool. The top level schema type must be object.

func (ToolInputSchema) GoString

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

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

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

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

func (s *ToolResultBlock) SetContent(v []*ToolResultContentBlock) *ToolResultBlock

SetContent sets the Content field's value.

func (*ToolResultBlock) SetStatus

func (s *ToolResultBlock) SetStatus(v string) *ToolResultBlock

SetStatus sets the Status field's value.

func (*ToolResultBlock) SetToolUseId

func (s *ToolResultBlock) SetToolUseId(v string) *ToolResultBlock

SetToolUseId sets the ToolUseId field's value.

func (ToolResultBlock) String

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

func (s *ToolResultBlock) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type ToolResultContentBlock

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

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

func (s *ToolResultContentBlock) SetDocument(v *DocumentBlock) *ToolResultContentBlock

SetDocument sets the Document field's value.

func (*ToolResultContentBlock) SetImage

func (s *ToolResultContentBlock) SetImage(v *ImageBlock) *ToolResultContentBlock

SetImage sets the Image field's value.

func (*ToolResultContentBlock) SetText

func (s *ToolResultContentBlock) SetText(v string) *ToolResultContentBlock

SetText sets the Text field's value.

func (ToolResultContentBlock) String

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

func (s *ToolResultContentBlock) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type ToolSpecification

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

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

func (s *ToolSpecification) SetDescription(v string) *ToolSpecification

SetDescription sets the Description field's value.

func (*ToolSpecification) SetInputSchema

func (s *ToolSpecification) SetInputSchema(v *ToolInputSchema) *ToolSpecification

SetInputSchema sets the InputSchema field's value.

func (*ToolSpecification) SetName

func (s *ToolSpecification) SetName(v string) *ToolSpecification

SetName sets the Name field's value.

func (ToolSpecification) String

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

func (s *ToolSpecification) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type ToolUseBlockDelta

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

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

func (s *ToolUseBlockDelta) SetInput(v string) *ToolUseBlockDelta

SetInput sets the Input field's value.

func (ToolUseBlockDelta) String

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

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

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

func (s *ToolUseBlockStart) SetName(v string) *ToolUseBlockStart

SetName sets the Name field's value.

func (*ToolUseBlockStart) SetToolUseId

func (s *ToolUseBlockStart) SetToolUseId(v string) *ToolUseBlockStart

SetToolUseId sets the ToolUseId field's value.

func (ToolUseBlockStart) String

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.