types

package
v0.0.0-...-9fc2571 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 24, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessDeniedException

type AccessDeniedException struct {
	Message *string

	ErrorCodeOverride *string
	// contains filtered or unexported fields
}

The request is denied because of missing access permissions. Check your permissions and retry your request.

func (*AccessDeniedException) Error

func (e *AccessDeniedException) Error() string

func (*AccessDeniedException) ErrorCode

func (e *AccessDeniedException) ErrorCode() string

func (*AccessDeniedException) ErrorFault

func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault

func (*AccessDeniedException) ErrorMessage

func (e *AccessDeniedException) ErrorMessage() string

type ActionGroupInvocationInput

type ActionGroupInvocationInput struct {

	// The name of the action group.
	ActionGroupName *string

	// The path to the API to call, based off the action group.
	ApiPath *string

	// The function in the action group to call.
	Function *string

	// The parameters in the Lambda input event.
	Parameters []Parameter

	// The parameters in the request body for the Lambda input event.
	RequestBody *RequestBody

	// The API method being used, based off the action group.
	Verb *string
	// contains filtered or unexported fields
}

Contains information about the action group being invoked. For more information about the possible structures, see the InvocationInput tab in OrchestrationTracein the Amazon Bedrock User Guide.

type ActionGroupInvocationOutput

type ActionGroupInvocationOutput struct {

	// The JSON-formatted string returned by the API invoked by the action group.
	Text *string
	// contains filtered or unexported fields
}

Contains the JSON-formatted string returned by the API invoked by the action group.

type ApiInvocationInput

type ApiInvocationInput struct {

	// The action group that the API operation belongs to.
	//
	// This member is required.
	ActionGroup *string

	// The path to the API operation.
	ApiPath *string

	// The HTTP method of the API operation.
	HttpMethod *string

	// The parameters to provide for the API request, as the agent elicited from the
	// user.
	Parameters []ApiParameter

	// The request body to provide for the API request, as the agent elicited from the
	// user.
	RequestBody *ApiRequestBody
	// contains filtered or unexported fields
}

Contains information about the API operation that the agent predicts should be called.

This data type is used in the following API operations:

type ApiParameter

type ApiParameter struct {

	// The name of the parameter.
	Name *string

	// The data type for the parameter.
	Type *string

	// The value of the parameter.
	Value *string
	// contains filtered or unexported fields
}

Information about a parameter to provide to the API request.

This data type is used in the following API operations:

InvokeAgent response

type ApiRequestBody

type ApiRequestBody struct {

	// The content of the request body. The key of the object in this field is a media
	// type defining the format of the request body.
	Content map[string]PropertyParameters
	// contains filtered or unexported fields
}

The request body to provide for the API request, as the agent elicited from the user.

This data type is used in the following API operations:

InvokeAgent response

type ApiResult

type ApiResult struct {

	// The action group that the API operation belongs to.
	//
	// This member is required.
	ActionGroup *string

	// The path to the API operation.
	ApiPath *string

	// The HTTP method for the API operation.
	HttpMethod *string

	// http status code from API execution response (for example: 200, 400, 500).
	HttpStatusCode *int32

	// The response body from the API operation. The key of the object is the content
	// type (currently, only TEXT is supported). The response may be returned directly
	// or from the Lambda function.
	ResponseBody map[string]ContentBody

	// Controls the final response state returned to end user when API/Function
	// execution failed. When this state is FAILURE, the request would fail with
	// dependency failure exception. When this state is REPROMPT, the API/function
	// response will be sent to model for re-prompt
	ResponseState ResponseState
	// contains filtered or unexported fields
}

Contains information about the API operation that was called from the action group and the response body that was returned.

This data type is used in the following API operations:

type Attribution

type Attribution struct {

	// A list of citations and related information for a part of an agent response.
	Citations []Citation
	// contains filtered or unexported fields
}

Contains citations for a part of an agent response.

type BadGatewayException

type BadGatewayException struct {
	Message *string

	ErrorCodeOverride *string

	ResourceName *string
	// contains filtered or unexported fields
}

There was an issue with a dependency due to a server issue. Retry your request.

func (*BadGatewayException) Error

func (e *BadGatewayException) Error() string

func (*BadGatewayException) ErrorCode

func (e *BadGatewayException) ErrorCode() string

func (*BadGatewayException) ErrorFault

func (e *BadGatewayException) ErrorFault() smithy.ErrorFault

func (*BadGatewayException) ErrorMessage

func (e *BadGatewayException) ErrorMessage() string

type ByteContentDoc

type ByteContentDoc struct {

	// The MIME type of the document contained in the wrapper object.
	//
	// This member is required.
	ContentType *string

	// The byte value of the file to upload, encoded as a Base-64 string.
	//
	// This member is required.
	Data []byte

	// The file name of the document contained in the wrapper object.
	//
	// This member is required.
	Identifier *string
	// contains filtered or unexported fields
}

This property contains the document to chat with, along with its attributes.

type Citation

type Citation struct {

	// Contains the generated response and metadata
	GeneratedResponsePart *GeneratedResponsePart

	// Contains metadata about the sources cited for the generated response.
	RetrievedReferences []RetrievedReference
	// contains filtered or unexported fields
}

An object containing a segment of the generated response that is based on a source in the knowledge base, alongside information about the source.

This data type is used in the following API operations:

InvokeAgent response

  • – in the citations field

RetrieveAndGenerate response

  • – in the citations field

type ConflictException

type ConflictException struct {
	Message *string

	ErrorCodeOverride *string
	// contains filtered or unexported fields
}

There was a conflict performing an operation. Resolve the conflict and retry your request.

func (*ConflictException) Error

func (e *ConflictException) Error() string

func (*ConflictException) ErrorCode

func (e *ConflictException) ErrorCode() string

func (*ConflictException) ErrorFault

func (e *ConflictException) ErrorFault() smithy.ErrorFault

func (*ConflictException) ErrorMessage

func (e *ConflictException) ErrorMessage() string

type ContentBody

type ContentBody struct {

	// The body of the API response.
	Body *string
	// contains filtered or unexported fields
}

Contains the body of the API response.

This data type is used in the following API operations:

type CreationMode

type CreationMode string
const (
	CreationModeDefault    CreationMode = "DEFAULT"
	CreationModeOverridden CreationMode = "OVERRIDDEN"
)

Enum values for CreationMode

func (CreationMode) Values

func (CreationMode) Values() []CreationMode

Values returns all known values for CreationMode. Note that this can be expanded in the future, and so it is only as up to date as the client.

The ordering of this slice is not guaranteed to be stable across updates.

type DependencyFailedException

type DependencyFailedException struct {
	Message *string

	ErrorCodeOverride *string

	ResourceName *string
	// contains filtered or unexported fields
}

There was an issue with a dependency. Check the resource configurations and retry the request.

func (*DependencyFailedException) Error

func (e *DependencyFailedException) Error() string

func (*DependencyFailedException) ErrorCode

func (e *DependencyFailedException) ErrorCode() string

func (*DependencyFailedException) ErrorFault

func (*DependencyFailedException) ErrorMessage

func (e *DependencyFailedException) ErrorMessage() string

type ExternalSource

type ExternalSource struct {

	// The source type of the external source wrapper object.
	//
	// This member is required.
	SourceType ExternalSourceType

	// The identifier, contentType, and data of the external source wrapper object.
	ByteContent *ByteContentDoc

	// The S3 location of the external source wrapper object.
	S3Location *S3ObjectDoc
	// contains filtered or unexported fields
}

The unique external source of the content contained in the wrapper object.

type ExternalSourceType

type ExternalSourceType string
const (
	ExternalSourceTypeS3          ExternalSourceType = "S3"
	ExternalSourceTypeByteContent ExternalSourceType = "BYTE_CONTENT"
)

Enum values for ExternalSourceType

func (ExternalSourceType) Values

Values returns all known values for ExternalSourceType. Note that this can be expanded in the future, and so it is only as up to date as the client.

The ordering of this slice is not guaranteed to be stable across updates.

type ExternalSourcesGenerationConfiguration

type ExternalSourcesGenerationConfiguration struct {

	//  Additional model parameters and their corresponding values not included in the
	// textInferenceConfig structure for an external source. Takes in custom model
	// parameters specific to the language model being used.
	AdditionalModelRequestFields map[string]document.Interface

	// The configuration details for the guardrail.
	GuardrailConfiguration *GuardrailConfiguration

	//  Configuration settings for inference when using RetrieveAndGenerate to
	// generate responses while using an external source.
	InferenceConfig *InferenceConfig

	// Contain the textPromptTemplate string for the external source wrapper object.
	PromptTemplate *PromptTemplate
	// contains filtered or unexported fields
}

Contains the generation configuration of the external source wrapper object.

type ExternalSourcesRetrieveAndGenerateConfiguration

type ExternalSourcesRetrieveAndGenerateConfiguration struct {

	// The modelArn used with the external source wrapper object in the
	// retrieveAndGenerate function.
	//
	// This member is required.
	ModelArn *string

	// The document used with the external source wrapper object in the
	// retrieveAndGenerate function.
	//
	// This member is required.
	Sources []ExternalSource

	// The prompt used with the external source wrapper object with the
	// retrieveAndGenerate function.
	GenerationConfiguration *ExternalSourcesGenerationConfiguration
	// contains filtered or unexported fields
}

The configurations of the external source wrapper object in the retrieveAndGenerate function.

type FailureTrace

type FailureTrace struct {

	// The reason the interaction failed.
	FailureReason *string

	// The unique identifier of the trace.
	TraceId *string
	// contains filtered or unexported fields
}

Contains information about the failure of the interaction.

type FilterAttribute

type FilterAttribute struct {

	// The name that the metadata attribute must match.
	//
	// This member is required.
	Key *string

	// The value to whcih to compare the value of the metadata attribute.
	//
	// This member is required.
	Value document.Interface
	// contains filtered or unexported fields
}

Specifies the name that the metadata attribute must match and the value to which to compare the value of the metadata attribute. For more information, see Query configurations .

This data type is used in the following API operations:

RetrieveAndGenerate request

type FinalResponse

type FinalResponse struct {

	// The text in the response to the user.
	Text *string
	// contains filtered or unexported fields
}

Contains details about the response to the user.

type FunctionInvocationInput

type FunctionInvocationInput struct {

	// The action group that the function belongs to.
	//
	// This member is required.
	ActionGroup *string

	// The name of the function.
	Function *string

	// A list of parameters of the function.
	Parameters []FunctionParameter
	// contains filtered or unexported fields
}

Contains information about the function that the agent predicts should be called.

This data type is used in the following API operations:

type FunctionParameter

type FunctionParameter struct {

	// The name of the parameter.
	Name *string

	// The data type of the parameter.
	Type *string

	// The value of the parameter.
	Value *string
	// contains filtered or unexported fields
}

Contains information about a parameter of the function.

This data type is used in the following API operations:

type FunctionResult

type FunctionResult struct {

	// The action group that the function belongs to.
	//
	// This member is required.
	ActionGroup *string

	// The name of the function that was called.
	Function *string

	// The response from the function call using the parameters. The key of the object
	// is the content type (currently, only TEXT is supported). The response may be
	// returned directly or from the Lambda function.
	ResponseBody map[string]ContentBody

	// Controls the final response state returned to end user when API/Function
	// execution failed. When this state is FAILURE, the request would fail with
	// dependency failure exception. When this state is REPROMPT, the API/function
	// response will be sent to model for re-prompt
	ResponseState ResponseState
	// contains filtered or unexported fields
}

Contains information about the function that was called from the action group and the response that was returned.

This data type is used in the following API operations:

type GeneratedResponsePart

type GeneratedResponsePart struct {

	// Contains metadata about a textual part of the generated response that is
	// accompanied by a citation.
	TextResponsePart *TextResponsePart
	// contains filtered or unexported fields
}

Contains metadata about a part of the generated response that is accompanied by a citation.

This data type is used in the following API operations:

InvokeAgent response

  • – in the generatedResponsePart field

RetrieveAndGenerate response

  • – in the generatedResponsePart field

type GenerationConfiguration

type GenerationConfiguration struct {

	//  Additional model parameters and corresponding values not included in the
	// textInferenceConfig structure for a knowledge base. This allows users to provide
	// custom model parameters specific to the language model being used.
	AdditionalModelRequestFields map[string]document.Interface

	// The configuration details for the guardrail.
	GuardrailConfiguration *GuardrailConfiguration

	//  Configuration settings for inference when using RetrieveAndGenerate to
	// generate responses while using a knowledge base as a source.
	InferenceConfig *InferenceConfig

	// Contains the template for the prompt that's sent to the model for response
	// generation.
	PromptTemplate *PromptTemplate
	// contains filtered or unexported fields
}

Contains configurations for response generation based on the knowledge base query results.

This data type is used in the following API operations:

RetrieveAndGenerate request

type GuadrailAction

type GuadrailAction string
const (
	GuadrailActionIntervened GuadrailAction = "INTERVENED"
	GuadrailActionNone       GuadrailAction = "NONE"
)

Enum values for GuadrailAction

func (GuadrailAction) Values

func (GuadrailAction) Values() []GuadrailAction

Values returns all known values for GuadrailAction. Note that this can be expanded in the future, and so it is only as up to date as the client.

The ordering of this slice is not guaranteed to be stable across updates.

type GuardrailAction

type GuardrailAction string
const (
	GuardrailActionIntervened GuardrailAction = "INTERVENED"
	GuardrailActionNone       GuardrailAction = "NONE"
)

Enum values for GuardrailAction

func (GuardrailAction) Values

func (GuardrailAction) Values() []GuardrailAction

Values returns all known values for GuardrailAction. Note that this can be expanded in the future, and so it is only as up to date as the client.

The ordering of this slice is not guaranteed to be stable across updates.

type GuardrailAssessment

type GuardrailAssessment struct {

	// Content policy details of the Guardrail.
	ContentPolicy *GuardrailContentPolicyAssessment

	// Sensitive Information policy details of Guardrail.
	SensitiveInformationPolicy *GuardrailSensitiveInformationPolicyAssessment

	// Topic policy details of the Guardrail.
	TopicPolicy *GuardrailTopicPolicyAssessment

	// Word policy details of the Guardrail.
	WordPolicy *GuardrailWordPolicyAssessment
	// contains filtered or unexported fields
}

Assessment details of the content analyzed by Guardrails.

type GuardrailConfiguration

type GuardrailConfiguration struct {

	// The unique identifier for the guardrail.
	//
	// This member is required.
	GuardrailId *string

	// The version of the guardrail.
	//
	// This member is required.
	GuardrailVersion *string
	// contains filtered or unexported fields
}

The configuration details for the guardrail.

type GuardrailContentFilter

type GuardrailContentFilter struct {

	// The action placed on the content by the Guardrail filter.
	Action GuardrailContentPolicyAction

	// The confidence level regarding the content detected in the filter by the
	// Guardrail.
	Confidence GuardrailContentFilterConfidence

	// The type of content detected in the filter by the Guardrail.
	Type GuardrailContentFilterType
	// contains filtered or unexported fields
}

Details of the content filter used in the Guardrail.

type GuardrailContentFilterConfidence

type GuardrailContentFilterConfidence string
const (
	GuardrailContentFilterConfidenceNone   GuardrailContentFilterConfidence = "NONE"
	GuardrailContentFilterConfidenceLow    GuardrailContentFilterConfidence = "LOW"
	GuardrailContentFilterConfidenceMedium GuardrailContentFilterConfidence = "MEDIUM"
	GuardrailContentFilterConfidenceHigh   GuardrailContentFilterConfidence = "HIGH"
)

Enum values for GuardrailContentFilterConfidence

func (GuardrailContentFilterConfidence) Values

Values returns all known values for GuardrailContentFilterConfidence. Note that this can be expanded in the future, and so it is only as up to date as the client.

The ordering of this slice is not guaranteed to be stable across updates.

type GuardrailContentFilterType

type GuardrailContentFilterType string
const (
	GuardrailContentFilterTypeInsults      GuardrailContentFilterType = "INSULTS"
	GuardrailContentFilterTypeHate         GuardrailContentFilterType = "HATE"
	GuardrailContentFilterTypeSexual       GuardrailContentFilterType = "SEXUAL"
	GuardrailContentFilterTypeViolence     GuardrailContentFilterType = "VIOLENCE"
	GuardrailContentFilterTypeMisconduct   GuardrailContentFilterType = "MISCONDUCT"
	GuardrailContentFilterTypePromptAttack GuardrailContentFilterType = "PROMPT_ATTACK"
)

Enum values for GuardrailContentFilterType

func (GuardrailContentFilterType) Values

Values returns all known values for GuardrailContentFilterType. Note that this can be expanded in the future, and so it is only as up to date as the client.

The ordering of this slice is not guaranteed to be stable across updates.

type GuardrailContentPolicyAction

type GuardrailContentPolicyAction string
const (
	GuardrailContentPolicyActionBlocked GuardrailContentPolicyAction = "BLOCKED"
)

Enum values for GuardrailContentPolicyAction

func (GuardrailContentPolicyAction) Values

Values returns all known values for GuardrailContentPolicyAction. Note that this can be expanded in the future, and so it is only as up to date as the client.

The ordering of this slice is not guaranteed to be stable across updates.

type GuardrailContentPolicyAssessment

type GuardrailContentPolicyAssessment struct {

	// The filter details of the policy assessment used in the Guardrails filter.
	Filters []GuardrailContentFilter
	// contains filtered or unexported fields
}

The details of the policy assessment in the Guardrails filter.

type GuardrailCustomWord

type GuardrailCustomWord struct {

	// The action details for the custom word filter in the Guardrail.
	Action GuardrailWordPolicyAction

	// The match details for the custom word filter in the Guardrail.
	Match *string
	// contains filtered or unexported fields
}

The custom word details for the filter in the Guardrail.

type GuardrailManagedWord

type GuardrailManagedWord struct {

	// The action details for the managed word filter in the Guardrail.
	Action GuardrailWordPolicyAction

	// The match details for the managed word filter in the Guardrail.
	Match *string

	// The type details for the managed word filter in the Guardrail.
	Type GuardrailManagedWordType
	// contains filtered or unexported fields
}

The managed word details for the filter in the Guardrail.

type GuardrailManagedWordType

type GuardrailManagedWordType string
const (
	GuardrailManagedWordTypeProfanity GuardrailManagedWordType = "PROFANITY"
)

Enum values for GuardrailManagedWordType

func (GuardrailManagedWordType) Values

Values returns all known values for GuardrailManagedWordType. Note that this can be expanded in the future, and so it is only as up to date as the client.

The ordering of this slice is not guaranteed to be stable across updates.

type GuardrailPiiEntityFilter

type GuardrailPiiEntityFilter struct {

	// The action of the Guardrail filter to identify and remove PII.
	Action GuardrailSensitiveInformationPolicyAction

	// The match to settings in the Guardrail filter to identify and remove PII.
	Match *string

	// The type of PII the Guardrail filter has identified and removed.
	Type GuardrailPiiEntityType
	// contains filtered or unexported fields
}

The Guardrail filter to identify and remove personally identifiable information (PII).

type GuardrailPiiEntityType

type GuardrailPiiEntityType string
const (
	GuardrailPiiEntityTypeAddress                             GuardrailPiiEntityType = "ADDRESS"
	GuardrailPiiEntityTypeAge                                 GuardrailPiiEntityType = "AGE"
	GuardrailPiiEntityTypeAwsAccessKey                        GuardrailPiiEntityType = "AWS_ACCESS_KEY"
	GuardrailPiiEntityTypeAwsSecretKey                        GuardrailPiiEntityType = "AWS_SECRET_KEY"
	GuardrailPiiEntityTypeCaHealthNumber                      GuardrailPiiEntityType = "CA_HEALTH_NUMBER"
	GuardrailPiiEntityTypeCaSocialInsuranceNumber             GuardrailPiiEntityType = "CA_SOCIAL_INSURANCE_NUMBER"
	GuardrailPiiEntityTypeCreditDebitCardCvv                  GuardrailPiiEntityType = "CREDIT_DEBIT_CARD_CVV"
	GuardrailPiiEntityTypeCreditDebitCardExpiry               GuardrailPiiEntityType = "CREDIT_DEBIT_CARD_EXPIRY"
	GuardrailPiiEntityTypeCreditDebitCardNumber               GuardrailPiiEntityType = "CREDIT_DEBIT_CARD_NUMBER"
	GuardrailPiiEntityTypeDriverId                            GuardrailPiiEntityType = "DRIVER_ID"
	GuardrailPiiEntityTypeEmail                               GuardrailPiiEntityType = "EMAIL"
	GuardrailPiiEntityTypeInternationalBankAccountNumber      GuardrailPiiEntityType = "INTERNATIONAL_BANK_ACCOUNT_NUMBER"
	GuardrailPiiEntityTypeIpAddress                           GuardrailPiiEntityType = "IP_ADDRESS"
	GuardrailPiiEntityTypeLicensePlate                        GuardrailPiiEntityType = "LICENSE_PLATE"
	GuardrailPiiEntityTypeMacAddress                          GuardrailPiiEntityType = "MAC_ADDRESS"
	GuardrailPiiEntityTypeName                                GuardrailPiiEntityType = "NAME"
	GuardrailPiiEntityTypePassword                            GuardrailPiiEntityType = "PASSWORD"
	GuardrailPiiEntityTypePhone                               GuardrailPiiEntityType = "PHONE"
	GuardrailPiiEntityTypePin                                 GuardrailPiiEntityType = "PIN"
	GuardrailPiiEntityTypeSwiftCode                           GuardrailPiiEntityType = "SWIFT_CODE"
	GuardrailPiiEntityTypeUkNationalHealthServiceNumber       GuardrailPiiEntityType = "UK_NATIONAL_HEALTH_SERVICE_NUMBER"
	GuardrailPiiEntityTypeUkNationalInsuranceNumber           GuardrailPiiEntityType = "UK_NATIONAL_INSURANCE_NUMBER"
	GuardrailPiiEntityTypeUkUniqueTaxpayerReferenceNumber     GuardrailPiiEntityType = "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER"
	GuardrailPiiEntityTypeUrl                                 GuardrailPiiEntityType = "URL"
	GuardrailPiiEntityTypeUsername                            GuardrailPiiEntityType = "USERNAME"
	GuardrailPiiEntityTypeUsBankAccountNumber                 GuardrailPiiEntityType = "US_BANK_ACCOUNT_NUMBER"
	GuardrailPiiEntityTypeUsBankRoutingNumber                 GuardrailPiiEntityType = "US_BANK_ROUTING_NUMBER"
	GuardrailPiiEntityTypeUsIndividualTaxIdentificationNumber GuardrailPiiEntityType = "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER"
	GuardrailPiiEntityTypeUsPassportNumber                    GuardrailPiiEntityType = "US_PASSPORT_NUMBER"
	GuardrailPiiEntityTypeUsSocialSecurityNumber              GuardrailPiiEntityType = "US_SOCIAL_SECURITY_NUMBER"
	GuardrailPiiEntityTypeVehicleIdentificationNumber         GuardrailPiiEntityType = "VEHICLE_IDENTIFICATION_NUMBER"
)

Enum values for GuardrailPiiEntityType

func (GuardrailPiiEntityType) Values

Values returns all known values for GuardrailPiiEntityType. Note that this can be expanded in the future, and so it is only as up to date as the client.

The ordering of this slice is not guaranteed to be stable across updates.

type GuardrailRegexFilter

type GuardrailRegexFilter struct {

	// The action details for the regex filter used in the Guardrail.
	Action GuardrailSensitiveInformationPolicyAction

	// The match details for the regex filter used in the Guardrail.
	Match *string

	// The name details for the regex filter used in the Guardrail.
	Name *string

	// The regex details for the regex filter used in the Guardrail.
	Regex *string
	// contains filtered or unexported fields
}

The details for the regex filter used in the Guardrail.

type GuardrailSensitiveInformationPolicyAction

type GuardrailSensitiveInformationPolicyAction string
const (
	GuardrailSensitiveInformationPolicyActionBlocked    GuardrailSensitiveInformationPolicyAction = "BLOCKED"
	GuardrailSensitiveInformationPolicyActionAnonymized GuardrailSensitiveInformationPolicyAction = "ANONYMIZED"
)

Enum values for GuardrailSensitiveInformationPolicyAction

func (GuardrailSensitiveInformationPolicyAction) Values

Values returns all known values for GuardrailSensitiveInformationPolicyAction. Note that this can be expanded in the future, and so it is only as up to date as the client.

The ordering of this slice is not guaranteed to be stable across updates.

type GuardrailSensitiveInformationPolicyAssessment

type GuardrailSensitiveInformationPolicyAssessment struct {

	// The details of the PII entities used in the sensitive policy assessment for the
	// Guardrail.
	PiiEntities []GuardrailPiiEntityFilter

	// The details of the regexes used in the sensitive policy assessment for the
	// Guardrail.
	Regexes []GuardrailRegexFilter
	// contains filtered or unexported fields
}

The details of the sensitive policy assessment used in the Guardrail.

type GuardrailTopic

type GuardrailTopic struct {

	// The action details on a specific topic in the Guardrail.
	Action GuardrailTopicPolicyAction

	// The name details on a specific topic in the Guardrail.
	Name *string

	// The type details on a specific topic in the Guardrail.
	Type GuardrailTopicType
	// contains filtered or unexported fields
}

The details for a specific topic defined in the Guardrail.

type GuardrailTopicPolicyAction

type GuardrailTopicPolicyAction string
const (
	GuardrailTopicPolicyActionBlocked GuardrailTopicPolicyAction = "BLOCKED"
)

Enum values for GuardrailTopicPolicyAction

func (GuardrailTopicPolicyAction) Values

Values returns all known values for GuardrailTopicPolicyAction. Note that this can be expanded in the future, and so it is only as up to date as the client.

The ordering of this slice is not guaranteed to be stable across updates.

type GuardrailTopicPolicyAssessment

type GuardrailTopicPolicyAssessment struct {

	// The topic details of the policy assessment used in the Guardrail.
	Topics []GuardrailTopic
	// contains filtered or unexported fields
}

The details of the policy assessment used in the Guardrail.

type GuardrailTopicType

type GuardrailTopicType string
const (
	GuardrailTopicTypeDeny GuardrailTopicType = "DENY"
)

Enum values for GuardrailTopicType

func (GuardrailTopicType) Values

Values returns all known values for GuardrailTopicType. Note that this can be expanded in the future, and so it is only as up to date as the client.

The ordering of this slice is not guaranteed to be stable across updates.

type GuardrailTrace

type GuardrailTrace struct {

	// The trace action details used with the Guardrail.
	Action GuardrailAction

	// The details of the input assessments used in the Guardrail Trace.
	InputAssessments []GuardrailAssessment

	// The details of the output assessments used in the Guardrail Trace.
	OutputAssessments []GuardrailAssessment

	// The details of the trace Id used in the Guardrail Trace.
	TraceId *string
	// contains filtered or unexported fields
}

The trace details used in the Guardrail.

type GuardrailWordPolicyAction

type GuardrailWordPolicyAction string
const (
	GuardrailWordPolicyActionBlocked GuardrailWordPolicyAction = "BLOCKED"
)

Enum values for GuardrailWordPolicyAction

func (GuardrailWordPolicyAction) Values

Values returns all known values for GuardrailWordPolicyAction. Note that this can be expanded in the future, and so it is only as up to date as the client.

The ordering of this slice is not guaranteed to be stable across updates.

type GuardrailWordPolicyAssessment

type GuardrailWordPolicyAssessment struct {

	// The custom word details for words defined in the Guardrail filter.
	CustomWords []GuardrailCustomWord

	// The managed word lists for words defined in the Guardrail filter.
	ManagedWordLists []GuardrailManagedWord
	// contains filtered or unexported fields
}

The assessment details for words defined in the Guardrail filter.

type InferenceConfig

type InferenceConfig struct {

	//  Configuration settings specific to text generation while generating responses
	// using RetrieveAndGenerate.
	TextInferenceConfig *TextInferenceConfig
	// contains filtered or unexported fields
}
The configuration for inference settings when generating responses using

RetrieveAndGenerate.

type InferenceConfiguration

type InferenceConfiguration struct {

	// The maximum number of tokens allowed in the generated response.
	MaximumLength *int32

	// A list of stop sequences. A stop sequence is a sequence of characters that
	// causes the model to stop generating the response.
	StopSequences []string

	// The likelihood of the model selecting higher-probability options while
	// generating a response. A lower value makes the model more likely to choose
	// higher-probability options, while a higher value makes the model more likely to
	// choose lower-probability options.
	Temperature *float32

	// While generating a response, the model determines the probability of the
	// following token at each point of generation. The value that you set for topK is
	// the number of most-likely candidates from which the model chooses the next token
	// in the sequence. For example, if you set topK to 50, the model selects the next
	// token from among the top 50 most likely choices.
	TopK *int32

	// While generating a response, the model determines the probability of the
	// following token at each point of generation. The value that you set for Top P
	// determines the number of most-likely candidates from which the model chooses the
	// next token in the sequence. For example, if you set topP to 80, the model only
	// selects the next token from the top 80% of the probability distribution of next
	// tokens.
	TopP *float32
	// contains filtered or unexported fields
}

Specifications about the inference parameters that were provided alongside the prompt. These are specified in the PromptOverrideConfigurationobject that was set when the agent was created or updated. For more information, see Inference parameters for foundation models.

type InternalServerException

type InternalServerException struct {
	Message *string

	ErrorCodeOverride *string
	// contains filtered or unexported fields
}

An internal server error occurred. Retry your request.

func (*InternalServerException) Error

func (e *InternalServerException) Error() string

func (*InternalServerException) ErrorCode

func (e *InternalServerException) ErrorCode() string

func (*InternalServerException) ErrorFault

func (e *InternalServerException) ErrorFault() smithy.ErrorFault

func (*InternalServerException) ErrorMessage

func (e *InternalServerException) ErrorMessage() string

type InvocationInput

type InvocationInput struct {

	// Contains information about the action group to be invoked.
	ActionGroupInvocationInput *ActionGroupInvocationInput

	// Specifies whether the agent is invoking an action group or a knowledge base.
	InvocationType InvocationType

	// Contains details about the knowledge base to look up and the query to be made.
	KnowledgeBaseLookupInput *KnowledgeBaseLookupInput

	// The unique identifier of the trace.
	TraceId *string
	// contains filtered or unexported fields
}

Contains information pertaining to the action group or knowledge base that is being invoked.

type InvocationInputMember

type InvocationInputMember interface {
	// contains filtered or unexported methods
}

Contains details about the API operation or function that the agent predicts should be called.

This data type is used in the following API operations:

The following types satisfy this interface:

InvocationInputMemberMemberApiInvocationInput
InvocationInputMemberMemberFunctionInvocationInput
Example (OutputUsage)
package main

import (
	"e.coding.net/g-nnjn4981/aito/aws-sdk-go-v2/service/bedrockagentruntime/types"
	"fmt"
)

func main() {
	var union types.InvocationInputMember
	// type switches can be used to check the union value
	switch v := union.(type) {
	case *types.InvocationInputMemberMemberApiInvocationInput:
		_ = v.Value // Value is types.ApiInvocationInput

	case *types.InvocationInputMemberMemberFunctionInvocationInput:
		_ = v.Value // Value is types.FunctionInvocationInput

	case *types.UnknownUnionMember:
		fmt.Println("unknown tag:", v.Tag)

	default:
		fmt.Println("union is nil or unknown type")

	}
}

type InvocationInputMemberMemberApiInvocationInput

type InvocationInputMemberMemberApiInvocationInput struct {
	Value ApiInvocationInput
	// contains filtered or unexported fields
}

Contains information about the API operation that the agent predicts should be called.

type InvocationInputMemberMemberFunctionInvocationInput

type InvocationInputMemberMemberFunctionInvocationInput struct {
	Value FunctionInvocationInput
	// contains filtered or unexported fields
}

Contains information about the function that the agent predicts should be called.

type InvocationResultMember

type InvocationResultMember interface {
	// contains filtered or unexported methods
}

A result from the invocation of an action. For more information, see Return control to the agent developer and Control session context.

This data type is used in the following API operations:

InvokeAgent request

The following types satisfy this interface:

InvocationResultMemberMemberApiResult
InvocationResultMemberMemberFunctionResult
Example (OutputUsage)
package main

import (
	"e.coding.net/g-nnjn4981/aito/aws-sdk-go-v2/service/bedrockagentruntime/types"
	"fmt"
)

func main() {
	var union types.InvocationResultMember
	// type switches can be used to check the union value
	switch v := union.(type) {
	case *types.InvocationResultMemberMemberApiResult:
		_ = v.Value // Value is types.ApiResult

	case *types.InvocationResultMemberMemberFunctionResult:
		_ = v.Value // Value is types.FunctionResult

	case *types.UnknownUnionMember:
		fmt.Println("unknown tag:", v.Tag)

	default:
		fmt.Println("union is nil or unknown type")

	}
}

type InvocationResultMemberMemberApiResult

type InvocationResultMemberMemberApiResult struct {
	Value ApiResult
	// contains filtered or unexported fields
}

The result from the API response from the action group invocation.

type InvocationResultMemberMemberFunctionResult

type InvocationResultMemberMemberFunctionResult struct {
	Value FunctionResult
	// contains filtered or unexported fields
}

The result from the function from the action group invocation.

type InvocationType

type InvocationType string
const (
	InvocationTypeActionGroup   InvocationType = "ACTION_GROUP"
	InvocationTypeKnowledgeBase InvocationType = "KNOWLEDGE_BASE"
	InvocationTypeFinish        InvocationType = "FINISH"
)

Enum values for InvocationType

func (InvocationType) Values

func (InvocationType) Values() []InvocationType

Values returns all known values for InvocationType. Note that this can be expanded in the future, and so it is only as up to date as the client.

The ordering of this slice is not guaranteed to be stable across updates.

type KnowledgeBaseLookupInput

type KnowledgeBaseLookupInput struct {

	// The unique identifier of the knowledge base to look up.
	KnowledgeBaseId *string

	// The query made to the knowledge base.
	Text *string
	// contains filtered or unexported fields
}

Contains details about the knowledge base to look up and the query to be made.

type KnowledgeBaseLookupOutput

type KnowledgeBaseLookupOutput struct {

	// Contains metadata about the sources cited for the generated response.
	RetrievedReferences []RetrievedReference
	// contains filtered or unexported fields
}

Contains details about the results from looking up the knowledge base.

type KnowledgeBaseQuery

type KnowledgeBaseQuery struct {

	// The text of the query made to the knowledge base.
	//
	// This member is required.
	Text *string
	// contains filtered or unexported fields
}

Contains the query made to the knowledge base.

This data type is used in the following API operations:

Retrieve request

  • – in the retrievalQuery field

type KnowledgeBaseRetrievalConfiguration

type KnowledgeBaseRetrievalConfiguration struct {

	// Contains details about how the results from the vector search should be
	// returned. For more information, see [Query configurations].
	//
	// [Query configurations]: https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html
	//
	// This member is required.
	VectorSearchConfiguration *KnowledgeBaseVectorSearchConfiguration
	// contains filtered or unexported fields
}

Contains configurations for the knowledge base query and retrieval process. For more information, see Query configurations.

This data type is used in the following API operations:

Retrieve request

  • – in the retrievalConfiguration field

RetrieveAndGenerate request

  • – in the retrievalConfiguration field

type KnowledgeBaseRetrievalResult

type KnowledgeBaseRetrievalResult struct {

	// Contains a chunk of text from a data source in the knowledge base.
	//
	// This member is required.
	Content *RetrievalResultContent

	// Contains information about the location of the data source.
	Location *RetrievalResultLocation

	// Contains metadata attributes and their values for the file in the data source.
	// For more information, see [Metadata and filtering].
	//
	// [Metadata and filtering]: https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base-ds.html#kb-ds-metadata
	Metadata map[string]document.Interface

	// The level of relevance of the result to the query.
	Score *float64
	// contains filtered or unexported fields
}

Details about a result from querying the knowledge base.

This data type is used in the following API operations:

Retrieve response

  • – in the retrievalResults field

type KnowledgeBaseRetrieveAndGenerateConfiguration

type KnowledgeBaseRetrieveAndGenerateConfiguration struct {

	// The unique identifier of the knowledge base that is queried and the foundation
	// model used for generation.
	//
	// This member is required.
	KnowledgeBaseId *string

	// The ARN of the foundation model used to generate a response.
	//
	// This member is required.
	ModelArn *string

	// Contains configurations for response generation based on the knowwledge base
	// query results.
	GenerationConfiguration *GenerationConfiguration

	// Contains configurations for how to retrieve and return the knowledge base query.
	RetrievalConfiguration *KnowledgeBaseRetrievalConfiguration
	// contains filtered or unexported fields
}

Contains details about the resource being queried.

This data type is used in the following API operations:

Retrieve request

  • – in the knowledgeBaseConfiguration field

RetrieveAndGenerate request

  • – in the knowledgeBaseConfiguration field

type KnowledgeBaseVectorSearchConfiguration

type KnowledgeBaseVectorSearchConfiguration struct {

	// Specifies the filters to use on the metadata in the knowledge base data sources
	// before returning results. For more information, see [Query configurations].
	//
	// [Query configurations]: https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html
	Filter RetrievalFilter

	// The number of source chunks to retrieve.
	NumberOfResults *int32

	// By default, Amazon Bedrock decides a search strategy for you. If you're using
	// an Amazon OpenSearch Serverless vector store that contains a filterable text
	// field, you can specify whether to query the knowledge base with a HYBRID search
	// using both vector embeddings and raw text, or SEMANTIC search using only vector
	// embeddings. For other vector store configurations, only SEMANTIC search is
	// available. For more information, see [Test a knowledge base].
	//
	// [Test a knowledge base]: https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base-test.html
	OverrideSearchType SearchType
	// contains filtered or unexported fields
}

Configurations for how to perform the search query and return results. For more information, see Query configurations.

This data type is used in the following API operations:

Retrieve request

  • – in the vectorSearchConfiguration field

RetrieveAndGenerate request

  • – in the vectorSearchConfiguration field

type ModelInvocationInput

type ModelInvocationInput struct {

	// Specifications about the inference parameters that were provided alongside the
	// prompt. These are specified in the [PromptOverrideConfiguration]object that was set when the agent was
	// created or updated. For more information, see [Inference parameters for foundation models].
	//
	// [Inference parameters for foundation models]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html
	// [PromptOverrideConfiguration]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_PromptOverrideConfiguration.html
	InferenceConfiguration *InferenceConfiguration

	// The ARN of the Lambda function to use when parsing the raw foundation model
	// output in parts of the agent sequence.
	OverrideLambda *string

	// Specifies whether to override the default parser Lambda function when parsing
	// the raw foundation model output in the part of the agent sequence defined by the
	// promptType .
	ParserMode CreationMode

	// Specifies whether the default prompt template was OVERRIDDEN . If it was, the
	// basePromptTemplate that was set in the [PromptOverrideConfiguration] object when the agent was created or
	// updated is used instead.
	//
	// [PromptOverrideConfiguration]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_PromptOverrideConfiguration.html
	PromptCreationMode CreationMode

	// The text that prompted the agent at this step.
	Text *string

	// The unique identifier of the trace.
	TraceId *string

	// The step in the agent sequence.
	Type PromptType
	// contains filtered or unexported fields
}

The input for the pre-processing step.

  • The type matches the agent step.

  • The text contains the prompt.

  • The inferenceConfiguration , parserMode , and overrideLambda values are set in the PromptOverrideConfigurationobject that was set when the agent was created or updated.

type Observation

type Observation struct {

	// Contains the JSON-formatted string returned by the API invoked by the action
	// group.
	ActionGroupInvocationOutput *ActionGroupInvocationOutput

	// Contains details about the response to the user.
	FinalResponse *FinalResponse

	// Contains details about the results from looking up the knowledge base.
	KnowledgeBaseLookupOutput *KnowledgeBaseLookupOutput

	// Contains details about the response to reprompt the input.
	RepromptResponse *RepromptResponse

	// The unique identifier of the trace.
	TraceId *string

	// Specifies what kind of information the agent returns in the observation. The
	// following values are possible.
	//
	//   - ACTION_GROUP – The agent returns the result of an action group.
	//
	//   - KNOWLEDGE_BASE – The agent returns information from a knowledge base.
	//
	//   - FINISH – The agent returns a final response to the user with no follow-up.
	//
	//   - ASK_USER – The agent asks the user a question.
	//
	//   - REPROMPT – The agent prompts the user again for the same information.
	Type Type
	// contains filtered or unexported fields
}

Contains the result or output of an action group or knowledge base, or the response to the user.

type OrchestrationTrace

type OrchestrationTrace interface {
	// contains filtered or unexported methods
}

Details about the orchestration step, in which the agent determines the order in which actions are executed and which knowledge bases are retrieved.

The following types satisfy this interface:

OrchestrationTraceMemberInvocationInput
OrchestrationTraceMemberModelInvocationInput
OrchestrationTraceMemberObservation
OrchestrationTraceMemberRationale
Example (OutputUsage)
package main

import (
	"e.coding.net/g-nnjn4981/aito/aws-sdk-go-v2/service/bedrockagentruntime/types"
	"fmt"
)

func main() {
	var union types.OrchestrationTrace
	// type switches can be used to check the union value
	switch v := union.(type) {
	case *types.OrchestrationTraceMemberInvocationInput:
		_ = v.Value // Value is types.InvocationInput

	case *types.OrchestrationTraceMemberModelInvocationInput:
		_ = v.Value // Value is types.ModelInvocationInput

	case *types.OrchestrationTraceMemberObservation:
		_ = v.Value // Value is types.Observation

	case *types.OrchestrationTraceMemberRationale:
		_ = v.Value // Value is types.Rationale

	case *types.UnknownUnionMember:
		fmt.Println("unknown tag:", v.Tag)

	default:
		fmt.Println("union is nil or unknown type")

	}
}

type OrchestrationTraceMemberInvocationInput

type OrchestrationTraceMemberInvocationInput struct {
	Value InvocationInput
	// contains filtered or unexported fields
}

Contains information pertaining to the action group or knowledge base that is being invoked.

type OrchestrationTraceMemberModelInvocationInput

type OrchestrationTraceMemberModelInvocationInput struct {
	Value ModelInvocationInput
	// contains filtered or unexported fields
}

The input for the orchestration step.

  • The type is ORCHESTRATION .

  • The text contains the prompt.

  • The inferenceConfiguration , parserMode , and overrideLambda values are set in the PromptOverrideConfigurationobject that was set when the agent was created or updated.

type OrchestrationTraceMemberObservation

type OrchestrationTraceMemberObservation struct {
	Value Observation
	// contains filtered or unexported fields
}

Details about the observation (the output of the action group Lambda or knowledge base) made by the agent.

type OrchestrationTraceMemberRationale

type OrchestrationTraceMemberRationale struct {
	Value Rationale
	// contains filtered or unexported fields
}

Details about the reasoning, based on the input, that the agent uses to justify carrying out an action group or getting information from a knowledge base.

type Parameter

type Parameter struct {

	// The name of the parameter.
	Name *string

	// The type of the parameter.
	Type *string

	// The value of the parameter.
	Value *string
	// contains filtered or unexported fields
}

A parameter for the API request or function.

type PayloadPart

type PayloadPart struct {

	// Contains citations for a part of an agent response.
	Attribution *Attribution

	// A part of the agent response in bytes.
	Bytes []byte
	// contains filtered or unexported fields
}

Contains a part of an agent response and citations for it.

type PostProcessingModelInvocationOutput

type PostProcessingModelInvocationOutput struct {

	// Details about the response from the Lambda parsing of the output of the
	// post-processing step.
	ParsedResponse *PostProcessingParsedResponse

	// The unique identifier of the trace.
	TraceId *string
	// contains filtered or unexported fields
}

The foundation model output from the post-processing step.

type PostProcessingParsedResponse

type PostProcessingParsedResponse struct {

	// The text returned by the parser.
	Text *string
	// contains filtered or unexported fields
}

Details about the response from the Lambda parsing of the output from the post-processing step.

type PostProcessingTrace

type PostProcessingTrace interface {
	// contains filtered or unexported methods
}

Details about the post-processing step, in which the agent shapes the response.

The following types satisfy this interface:

PostProcessingTraceMemberModelInvocationInput
PostProcessingTraceMemberModelInvocationOutput
Example (OutputUsage)
package main

import (
	"e.coding.net/g-nnjn4981/aito/aws-sdk-go-v2/service/bedrockagentruntime/types"
	"fmt"
)

func main() {
	var union types.PostProcessingTrace
	// type switches can be used to check the union value
	switch v := union.(type) {
	case *types.PostProcessingTraceMemberModelInvocationInput:
		_ = v.Value // Value is types.ModelInvocationInput

	case *types.PostProcessingTraceMemberModelInvocationOutput:
		_ = v.Value // Value is types.PostProcessingModelInvocationOutput

	case *types.UnknownUnionMember:
		fmt.Println("unknown tag:", v.Tag)

	default:
		fmt.Println("union is nil or unknown type")

	}
}

type PostProcessingTraceMemberModelInvocationInput

type PostProcessingTraceMemberModelInvocationInput struct {
	Value ModelInvocationInput
	// contains filtered or unexported fields
}

The input for the post-processing step.

  • The type is POST_PROCESSING .

  • The text contains the prompt.

  • The inferenceConfiguration , parserMode , and overrideLambda values are set in the PromptOverrideConfigurationobject that was set when the agent was created or updated.

type PostProcessingTraceMemberModelInvocationOutput

type PostProcessingTraceMemberModelInvocationOutput struct {
	Value PostProcessingModelInvocationOutput
	// contains filtered or unexported fields
}

The foundation model output from the post-processing step.

type PreProcessingModelInvocationOutput

type PreProcessingModelInvocationOutput struct {

	// Details about the response from the Lambda parsing of the output of the
	// pre-processing step.
	ParsedResponse *PreProcessingParsedResponse

	// The unique identifier of the trace.
	TraceId *string
	// contains filtered or unexported fields
}

The foundation model output from the pre-processing step.

type PreProcessingParsedResponse

type PreProcessingParsedResponse struct {

	// Whether the user input is valid or not. If false , the agent doesn't proceed to
	// orchestration.
	IsValid *bool

	// The text returned by the parsing of the pre-processing step, explaining the
	// steps that the agent plans to take in orchestration, if the user input is valid.
	Rationale *string
	// contains filtered or unexported fields
}

Details about the response from the Lambda parsing of the output from the pre-processing step.

type PreProcessingTrace

type PreProcessingTrace interface {
	// contains filtered or unexported methods
}

Details about the pre-processing step, in which the agent contextualizes and categorizes user inputs.

The following types satisfy this interface:

PreProcessingTraceMemberModelInvocationInput
PreProcessingTraceMemberModelInvocationOutput
Example (OutputUsage)
package main

import (
	"e.coding.net/g-nnjn4981/aito/aws-sdk-go-v2/service/bedrockagentruntime/types"
	"fmt"
)

func main() {
	var union types.PreProcessingTrace
	// type switches can be used to check the union value
	switch v := union.(type) {
	case *types.PreProcessingTraceMemberModelInvocationInput:
		_ = v.Value // Value is types.ModelInvocationInput

	case *types.PreProcessingTraceMemberModelInvocationOutput:
		_ = v.Value // Value is types.PreProcessingModelInvocationOutput

	case *types.UnknownUnionMember:
		fmt.Println("unknown tag:", v.Tag)

	default:
		fmt.Println("union is nil or unknown type")

	}
}

type PreProcessingTraceMemberModelInvocationInput

type PreProcessingTraceMemberModelInvocationInput struct {
	Value ModelInvocationInput
	// contains filtered or unexported fields
}

The input for the pre-processing step.

  • The type is PRE_PROCESSING .

  • The text contains the prompt.

  • The inferenceConfiguration , parserMode , and overrideLambda values are set in the PromptOverrideConfigurationobject that was set when the agent was created or updated.

type PreProcessingTraceMemberModelInvocationOutput

type PreProcessingTraceMemberModelInvocationOutput struct {
	Value PreProcessingModelInvocationOutput
	// contains filtered or unexported fields
}

The foundation model output from the pre-processing step.

type PromptTemplate

type PromptTemplate struct {

	// The template for the prompt that's sent to the model for response generation.
	// You can include prompt placeholders, which become replaced before the prompt is
	// sent to the model to provide instructions and context to the model. In addition,
	// you can include XML tags to delineate meaningful sections of the prompt
	// template.
	//
	// For more information, see the following resources:
	//
	// [Knowledge base prompt templates]
	//
	// [Use XML tags with Anthropic Claude models]
	//
	// [Use XML tags with Anthropic Claude models]: https://docs.anthropic.com/claude/docs/use-xml-tags
	// [Knowledge base prompt templates]: https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html#kb-test-config-sysprompt
	TextPromptTemplate *string
	// contains filtered or unexported fields
}

Contains the template for the prompt that's sent to the model for response generation. For more information, see Knowledge base prompt templates.

This data type is used in the following API operations:

RetrieveAndGenerate request

  • – in the filter field

type PromptType

type PromptType string
const (
	PromptTypePreProcessing                   PromptType = "PRE_PROCESSING"
	PromptTypeOrchestration                   PromptType = "ORCHESTRATION"
	PromptTypeKnowledgeBaseResponseGeneration PromptType = "KNOWLEDGE_BASE_RESPONSE_GENERATION"
	PromptTypePostProcessing                  PromptType = "POST_PROCESSING"
)

Enum values for PromptType

func (PromptType) Values

func (PromptType) Values() []PromptType

Values returns all known values for PromptType. Note that this can be expanded in the future, and so it is only as up to date as the client.

The ordering of this slice is not guaranteed to be stable across updates.

type PropertyParameters

type PropertyParameters struct {

	// A list of parameters in the request body.
	Properties []Parameter
	// contains filtered or unexported fields
}

Contains the parameters in the request body.

type Rationale

type Rationale struct {

	// The reasoning or thought process of the agent, based on the input.
	Text *string

	// The unique identifier of the trace step.
	TraceId *string
	// contains filtered or unexported fields
}

Contains the reasoning, based on the input, that the agent uses to justify carrying out an action group or getting information from a knowledge base.

type RepromptResponse

type RepromptResponse struct {

	// Specifies what output is prompting the agent to reprompt the input.
	Source Source

	// The text reprompting the input.
	Text *string
	// contains filtered or unexported fields
}

Contains details about the agent's response to reprompt the input.

type RequestBody

type RequestBody struct {

	// The content in the request body.
	Content map[string][]Parameter
	// contains filtered or unexported fields
}

The parameters in the API request body.

type ResourceNotFoundException

type ResourceNotFoundException struct {
	Message *string

	ErrorCodeOverride *string
	// contains filtered or unexported fields
}

The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.

func (*ResourceNotFoundException) Error

func (e *ResourceNotFoundException) Error() string

func (*ResourceNotFoundException) ErrorCode

func (e *ResourceNotFoundException) ErrorCode() string

func (*ResourceNotFoundException) ErrorFault

func (*ResourceNotFoundException) ErrorMessage

func (e *ResourceNotFoundException) ErrorMessage() string

type ResponseState

type ResponseState string
const (
	ResponseStateFailure  ResponseState = "FAILURE"
	ResponseStateReprompt ResponseState = "REPROMPT"
)

Enum values for ResponseState

func (ResponseState) Values

func (ResponseState) Values() []ResponseState

Values returns all known values for ResponseState. Note that this can be expanded in the future, and so it is only as up to date as the client.

The ordering of this slice is not guaranteed to be stable across updates.

type ResponseStream

type ResponseStream interface {
	// contains filtered or unexported methods
}

The response from invoking the agent and associated citations and trace information.

The following types satisfy this interface:

ResponseStreamMemberChunk
ResponseStreamMemberReturnControl
ResponseStreamMemberTrace
Example (OutputUsage)
package main

import (
	"e.coding.net/g-nnjn4981/aito/aws-sdk-go-v2/service/bedrockagentruntime/types"
	"fmt"
)

func main() {
	var union types.ResponseStream
	// type switches can be used to check the union value
	switch v := union.(type) {
	case *types.ResponseStreamMemberChunk:
		_ = v.Value // Value is types.PayloadPart

	case *types.ResponseStreamMemberReturnControl:
		_ = v.Value // Value is types.ReturnControlPayload

	case *types.ResponseStreamMemberTrace:
		_ = v.Value // Value is types.TracePart

	case *types.UnknownUnionMember:
		fmt.Println("unknown tag:", v.Tag)

	default:
		fmt.Println("union is nil or unknown type")

	}
}

type ResponseStreamMemberChunk

type ResponseStreamMemberChunk struct {
	Value PayloadPart
	// contains filtered or unexported fields
}

Contains a part of an agent response and citations for it.

type ResponseStreamMemberReturnControl

type ResponseStreamMemberReturnControl struct {
	Value ReturnControlPayload
	// contains filtered or unexported fields
}

Contains the parameters and information that the agent elicited from the customer to carry out an action. This information is returned to the system and can be used in your own setup for fulfilling the action.

type ResponseStreamMemberTrace

type ResponseStreamMemberTrace struct {
	Value TracePart
	// contains filtered or unexported fields
}

Contains information about the agent and session, alongside the agent's reasoning process and results from calling actions and querying knowledge bases and metadata about the trace. You can use the trace to understand how the agent arrived at the response it provided the customer. For more information, see Trace events.

type RetrievalFilter

type RetrievalFilter interface {
	// contains filtered or unexported methods
}

Specifies the filters to use on the metadata attributes in the knowledge base data sources before returning results. For more information, see Query configurations. See the examples below to see how to use these filters.

This data type is used in the following API operations:

Retrieve request

  • – in the filter field

RetrieveAndGenerate request

  • – in the filter field

The following types satisfy this interface:

RetrievalFilterMemberAndAll
RetrievalFilterMemberEquals
RetrievalFilterMemberGreaterThan
RetrievalFilterMemberGreaterThanOrEquals
RetrievalFilterMemberIn
RetrievalFilterMemberLessThan
RetrievalFilterMemberLessThanOrEquals
RetrievalFilterMemberListContains
RetrievalFilterMemberNotEquals
RetrievalFilterMemberNotIn
RetrievalFilterMemberOrAll
RetrievalFilterMemberStartsWith
RetrievalFilterMemberStringContains
Example (OutputUsage)
package main

import (
	"e.coding.net/g-nnjn4981/aito/aws-sdk-go-v2/service/bedrockagentruntime/types"
	"fmt"
)

func main() {
	var union types.RetrievalFilter
	// type switches can be used to check the union value
	switch v := union.(type) {
	case *types.RetrievalFilterMemberAndAll:
		_ = v.Value // Value is []types.RetrievalFilter

	case *types.RetrievalFilterMemberEquals:
		_ = v.Value // Value is types.FilterAttribute

	case *types.RetrievalFilterMemberGreaterThan:
		_ = v.Value // Value is types.FilterAttribute

	case *types.RetrievalFilterMemberGreaterThanOrEquals:
		_ = v.Value // Value is types.FilterAttribute

	case *types.RetrievalFilterMemberIn:
		_ = v.Value // Value is types.FilterAttribute

	case *types.RetrievalFilterMemberLessThan:
		_ = v.Value // Value is types.FilterAttribute

	case *types.RetrievalFilterMemberLessThanOrEquals:
		_ = v.Value // Value is types.FilterAttribute

	case *types.RetrievalFilterMemberListContains:
		_ = v.Value // Value is types.FilterAttribute

	case *types.RetrievalFilterMemberNotEquals:
		_ = v.Value // Value is types.FilterAttribute

	case *types.RetrievalFilterMemberNotIn:
		_ = v.Value // Value is types.FilterAttribute

	case *types.RetrievalFilterMemberOrAll:
		_ = v.Value // Value is []types.RetrievalFilter

	case *types.RetrievalFilterMemberStartsWith:
		_ = v.Value // Value is types.FilterAttribute

	case *types.RetrievalFilterMemberStringContains:
		_ = v.Value // Value is types.FilterAttribute

	case *types.UnknownUnionMember:
		fmt.Println("unknown tag:", v.Tag)

	default:
		fmt.Println("union is nil or unknown type")

	}
}

type RetrievalFilterMemberAndAll

type RetrievalFilterMemberAndAll struct {
	Value []RetrievalFilter
	// contains filtered or unexported fields
}

Knowledge base data sources are returned if their metadata attributes fulfill all the filter conditions inside this list.

type RetrievalFilterMemberEquals

type RetrievalFilterMemberEquals struct {
	Value FilterAttribute
	// contains filtered or unexported fields
}

Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value matches the value in this object.

The following example would return data sources with an animal attribute whose value is cat :

"equals": { "key": "animal", "value": "cat" }

type RetrievalFilterMemberGreaterThan

type RetrievalFilterMemberGreaterThan struct {
	Value FilterAttribute
	// contains filtered or unexported fields
}

Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value is greater than the value in this object.

The following example would return data sources with an year attribute whose value is greater than 1989 :

"greaterThan": { "key": "year", "value": 1989 }

type RetrievalFilterMemberGreaterThanOrEquals

type RetrievalFilterMemberGreaterThanOrEquals struct {
	Value FilterAttribute
	// contains filtered or unexported fields
}

Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value is greater than or equal to the value in this object.

The following example would return data sources with an year attribute whose value is greater than or equal to 1989 :

"greaterThanOrEquals": { "key": "year", "value": 1989 }

type RetrievalFilterMemberIn

type RetrievalFilterMemberIn struct {
	Value FilterAttribute
	// contains filtered or unexported fields
}

Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value is in the list specified in the value in this object.

The following example would return data sources with an animal attribute that is either cat or dog :

"in": { "key": "animal", "value": ["cat", "dog"] }

type RetrievalFilterMemberLessThan

type RetrievalFilterMemberLessThan struct {
	Value FilterAttribute
	// contains filtered or unexported fields
}

Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value is less than the value in this object.

The following example would return data sources with an year attribute whose value is less than to 1989 .

"lessThan": { "key": "year", "value": 1989 }

type RetrievalFilterMemberLessThanOrEquals

type RetrievalFilterMemberLessThanOrEquals struct {
	Value FilterAttribute
	// contains filtered or unexported fields
}

Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value is less than or equal to the value in this object.

The following example would return data sources with an year attribute whose value is less than or equal to 1989 .

"lessThanOrEquals": { "key": "year", "value": 1989 }

type RetrievalFilterMemberListContains

type RetrievalFilterMemberListContains struct {
	Value FilterAttribute
	// contains filtered or unexported fields
}

Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value is a list that contains the value as one of its members.

The following example would return data sources with an animals attribute that is a list containing a cat member (for example ["dog", "cat"] ).

"listContains": { "key": "animals", "value": "cat" }

type RetrievalFilterMemberNotEquals

type RetrievalFilterMemberNotEquals struct {
	Value FilterAttribute
	// contains filtered or unexported fields
}

Knowledge base data sources that contain a metadata attribute whose name matches the key and whose value doesn't match the value in this object are returned.

The following example would return data sources that don't contain an animal attribute whose value is cat .

"notEquals": { "key": "animal", "value": "cat" }

type RetrievalFilterMemberNotIn

type RetrievalFilterMemberNotIn struct {
	Value FilterAttribute
	// contains filtered or unexported fields
}

Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value isn't in the list specified in the value in this object.

The following example would return data sources whose animal attribute is neither cat nor dog .

"notIn": { "key": "animal", "value": ["cat", "dog"] }

type RetrievalFilterMemberOrAll

type RetrievalFilterMemberOrAll struct {
	Value []RetrievalFilter
	// contains filtered or unexported fields
}

Knowledge base data sources are returned if their metadata attributes fulfill at least one of the filter conditions inside this list.

type RetrievalFilterMemberStartsWith

type RetrievalFilterMemberStartsWith struct {
	Value FilterAttribute
	// contains filtered or unexported fields
}

Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value starts with the value in this object. This filter is currently only supported for Amazon OpenSearch Serverless vector stores.

The following example would return data sources with an animal attribute starts with ca (for example, cat or camel ).

"startsWith": { "key": "animal", "value": "ca" }

type RetrievalFilterMemberStringContains

type RetrievalFilterMemberStringContains struct {
	Value FilterAttribute
	// contains filtered or unexported fields
}

Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key and whose value is one of the following:

  • A string that contains the value as a substring. The following example would return data sources with an animal attribute that contains the substring at (for example cat ).

"stringContains": { "key": "animal", "value": "at" }

  • A list with a member that contains the value as a substring. The following example would return data sources with an animals attribute that is a list containing a member that contains the substring at (for example ["dog", "cat"] ).

"stringContains": { "key": "animals", "value": "at" }

type RetrievalResultContent

type RetrievalResultContent struct {

	// The cited text from the data source.
	//
	// This member is required.
	Text *string
	// contains filtered or unexported fields
}

Contains the cited text from the data source.

This data type is used in the following API operations:

Retrieve response

  • – in the content field

RetrieveAndGenerate response

  • – in the content field

InvokeAgent response

  • – in the content field

type RetrievalResultLocation

type RetrievalResultLocation struct {

	// The type of the location of the data source.
	//
	// This member is required.
	Type RetrievalResultLocationType

	// Contains the S3 location of the data source.
	S3Location *RetrievalResultS3Location
	// contains filtered or unexported fields
}

Contains information about the location of the data source.

This data type is used in the following API operations:

Retrieve response

  • – in the location field

RetrieveAndGenerate response

  • – in the location field

InvokeAgent response

  • – in the locatino field

type RetrievalResultLocationType

type RetrievalResultLocationType string
const (
	RetrievalResultLocationTypeS3 RetrievalResultLocationType = "S3"
)

Enum values for RetrievalResultLocationType

func (RetrievalResultLocationType) Values

Values returns all known values for RetrievalResultLocationType. Note that this can be expanded in the future, and so it is only as up to date as the client.

The ordering of this slice is not guaranteed to be stable across updates.

type RetrievalResultS3Location

type RetrievalResultS3Location struct {

	// The S3 URI of the data source.
	Uri *string
	// contains filtered or unexported fields
}

Contains the S3 location of the data source.

This data type is used in the following API operations:

Retrieve response

  • – in the s3Location field

RetrieveAndGenerate response

  • – in the s3Location field

InvokeAgent response

  • – in the s3Location field

type RetrieveAndGenerateConfiguration

type RetrieveAndGenerateConfiguration struct {

	// The type of resource that is queried by the request.
	//
	// This member is required.
	Type RetrieveAndGenerateType

	// The configuration used with the external source wrapper object in the
	// retrieveAndGenerate function.
	ExternalSourcesConfiguration *ExternalSourcesRetrieveAndGenerateConfiguration

	// Contains details about the resource being queried.
	KnowledgeBaseConfiguration *KnowledgeBaseRetrieveAndGenerateConfiguration
	// contains filtered or unexported fields
}

Contains details about the resource being queried.

This data type is used in the following API operations:

RetrieveAndGenerate request

  • – in the retrieveAndGenerateConfiguration field

type RetrieveAndGenerateInput

type RetrieveAndGenerateInput struct {

	// The query made to the knowledge base.
	//
	// This member is required.
	Text *string
	// contains filtered or unexported fields
}

Contains the query made to the knowledge base.

This data type is used in the following API operations:

RetrieveAndGenerate request

  • – in the input field

type RetrieveAndGenerateOutput

type RetrieveAndGenerateOutput struct {

	// The response generated from querying the knowledge base.
	//
	// This member is required.
	Text *string
	// contains filtered or unexported fields
}

Contains the response generated from querying the knowledge base.

This data type is used in the following API operations:

RetrieveAndGenerate response

  • – in the output field

type RetrieveAndGenerateSessionConfiguration

type RetrieveAndGenerateSessionConfiguration struct {

	// The ARN of the KMS key encrypting the session.
	//
	// This member is required.
	KmsKeyArn *string
	// contains filtered or unexported fields
}

Contains configuration about the session with the knowledge base.

This data type is used in the following API operations:

RetrieveAndGenerate request

  • – in the sessionConfiguration field

type RetrieveAndGenerateType

type RetrieveAndGenerateType string
const (
	RetrieveAndGenerateTypeKnowledgeBase   RetrieveAndGenerateType = "KNOWLEDGE_BASE"
	RetrieveAndGenerateTypeExternalSources RetrieveAndGenerateType = "EXTERNAL_SOURCES"
)

Enum values for RetrieveAndGenerateType

func (RetrieveAndGenerateType) Values

Values returns all known values for RetrieveAndGenerateType. Note that this can be expanded in the future, and so it is only as up to date as the client.

The ordering of this slice is not guaranteed to be stable across updates.

type RetrievedReference

type RetrievedReference struct {

	// Contains the cited text from the data source.
	Content *RetrievalResultContent

	// Contains information about the location of the data source.
	Location *RetrievalResultLocation

	// Contains metadata attributes and their values for the file in the data source.
	// For more information, see [Metadata and filtering].
	//
	// [Metadata and filtering]: https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base-ds.html#kb-ds-metadata
	Metadata map[string]document.Interface
	// contains filtered or unexported fields
}

Contains metadata about a source cited for the generated response.

This data type is used in the following API operations:

RetrieveAndGenerate response

  • – in the retrievedReferences field

InvokeAgent response

  • – in the retrievedReferences field

type ReturnControlPayload

type ReturnControlPayload struct {

	// The identifier of the action group invocation.
	InvocationId *string

	// A list of objects that contain information about the parameters and inputs that
	// need to be sent into the API operation or function, based on what the agent
	// determines from its session with the user.
	InvocationInputs []InvocationInputMember
	// contains filtered or unexported fields
}

Contains information to return from the action group that the agent has predicted to invoke.

This data type is used in the following API operations:

InvokeAgent response

type S3ObjectDoc

type S3ObjectDoc struct {

	// The file location of the S3 wrapper object.
	//
	// This member is required.
	Uri *string
	// contains filtered or unexported fields
}

The unique wrapper object of the document from the S3 location.

type SearchType

type SearchType string
const (
	SearchTypeHybrid   SearchType = "HYBRID"
	SearchTypeSemantic SearchType = "SEMANTIC"
)

Enum values for SearchType

func (SearchType) Values

func (SearchType) Values() []SearchType

Values returns all known values for SearchType. Note that this can be expanded in the future, and so it is only as up to date as the client.

The ordering of this slice is not guaranteed to be stable across updates.

type ServiceQuotaExceededException

type ServiceQuotaExceededException struct {
	Message *string

	ErrorCodeOverride *string
	// contains filtered or unexported fields
}

The number of requests exceeds the service quota. Resubmit your request later.

func (*ServiceQuotaExceededException) Error

func (*ServiceQuotaExceededException) ErrorCode

func (e *ServiceQuotaExceededException) ErrorCode() string

func (*ServiceQuotaExceededException) ErrorFault

func (*ServiceQuotaExceededException) ErrorMessage

func (e *ServiceQuotaExceededException) ErrorMessage() string

type SessionState

type SessionState struct {

	// The identifier of the invocation of an action. This value must match the
	// invocationId returned in the InvokeAgent response for the action whose results
	// are provided in the returnControlInvocationResults field. For more information,
	// see [Return control to the agent developer]and [Control session context].
	//
	// [Return control to the agent developer]: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-returncontrol.html
	// [Control session context]: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-session-state.html
	InvocationId *string

	// Contains attributes that persist across a prompt and the values of those
	// attributes. These attributes replace the $prompt_session_attributes$
	// placeholder variable in the orchestration prompt template. For more information,
	// see [Prompt template placeholder variables].
	//
	// [Prompt template placeholder variables]: https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-placeholders.html
	PromptSessionAttributes map[string]string

	// Contains information about the results from the action group invocation. For
	// more information, see [Return control to the agent developer]and [Control session context].
	//
	// If you include this field, the inputText field will be ignored.
	//
	// [Return control to the agent developer]: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-returncontrol.html
	// [Control session context]: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-session-state.html
	ReturnControlInvocationResults []InvocationResultMember

	// Contains attributes that persist across a session and the values of those
	// attributes.
	SessionAttributes map[string]string
	// contains filtered or unexported fields
}

Contains parameters that specify various attributes that persist across a session or prompt. You can define session state attributes as key-value pairs when writing a Lambda functionfor an action group or pass them when making an InvokeAgent request. Use session state attributes to control and provide conversational context for your agent and to help customize your agent's behavior. For more information, see Control session context.

type Source

type Source string
const (
	SourceActionGroup   Source = "ACTION_GROUP"
	SourceKnowledgeBase Source = "KNOWLEDGE_BASE"
	SourceParser        Source = "PARSER"
)

Enum values for Source

func (Source) Values

func (Source) Values() []Source

Values returns all known values for Source. Note that this can be expanded in the future, and so it is only as up to date as the client.

The ordering of this slice is not guaranteed to be stable across updates.

type Span

type Span struct {

	// Where the text with a citation ends in the generated output.
	End *int32

	// Where the text with a citation starts in the generated output.
	Start *int32
	// contains filtered or unexported fields
}

Contains information about where the text with a citation begins and ends in the generated output.

This data type is used in the following API operations:

RetrieveAndGenerate response

  • – in the span field

InvokeAgent response

  • – in the span field

type TextInferenceConfig

type TextInferenceConfig struct {

	// The maximum number of tokens to generate in the output text. Do not use the
	// minimum of 0 or the maximum of 65536. The limit values described here are
	// arbitary values, for actual values consult the limits defined by your specific
	// model.
	MaxTokens *int32

	// A list of sequences of characters that, if generated, will cause the model to
	// stop generating further tokens. Do not use a minimum length of 1 or a maximum
	// length of 1000. The limit values described here are arbitary values, for actual
	// values consult the limits defined by your specific model.
	StopSequences []string

	//  Controls the random-ness of text generated by the language model, influencing
	// how much the model sticks to the most predictable next words versus exploring
	// more surprising options. A lower temperature value (e.g. 0.2 or 0.3) makes model
	// outputs more deterministic or predictable, while a higher temperature (e.g. 0.8
	// or 0.9) makes the outputs more creative or unpredictable.
	Temperature *float32

	//  A probability distribution threshold which controls what the model considers
	// for the set of possible next tokens. The model will only consider the top p% of
	// the probability distribution when generating the next token.
	TopP *float32
	// contains filtered or unexported fields
}

Configuration settings for text generation using a language model via the RetrieveAndGenerate operation. Includes parameters like temperature, top-p, maximum token count, and stop sequences.

The valid range of maxTokens depends on the accepted values for your chosen model's inference parameters. To see the inference parameters for your model, see Inference parameters for foundation models.

type TextResponsePart

type TextResponsePart struct {

	// Contains information about where the text with a citation begins and ends in
	// the generated output.
	Span *Span

	// The part of the generated text that contains a citation.
	Text *string
	// contains filtered or unexported fields
}

Contains the part of the generated text that contains a citation, alongside where it begins and ends.

This data type is used in the following API operations:

RetrieveAndGenerate response

  • – in the textResponsePart field

InvokeAgent response

  • – in the textResponsePart field

type ThrottlingException

type ThrottlingException struct {
	Message *string

	ErrorCodeOverride *string
	// contains filtered or unexported fields
}

The number of requests exceeds the limit. Resubmit your request later.

func (*ThrottlingException) Error

func (e *ThrottlingException) Error() string

func (*ThrottlingException) ErrorCode

func (e *ThrottlingException) ErrorCode() string

func (*ThrottlingException) ErrorFault

func (e *ThrottlingException) ErrorFault() smithy.ErrorFault

func (*ThrottlingException) ErrorMessage

func (e *ThrottlingException) ErrorMessage() string

type Trace

type Trace interface {
	// contains filtered or unexported methods
}

Contains one part of the agent's reasoning process and results from calling API actions and querying knowledge bases. You can use the trace to understand how the agent arrived at the response it provided the customer. For more information, see Trace enablement.

The following types satisfy this interface:

TraceMemberFailureTrace
TraceMemberGuardrailTrace
TraceMemberOrchestrationTrace
TraceMemberPostProcessingTrace
TraceMemberPreProcessingTrace
Example (OutputUsage)
package main

import (
	"e.coding.net/g-nnjn4981/aito/aws-sdk-go-v2/service/bedrockagentruntime/types"
	"fmt"
)

func main() {
	var union types.Trace
	// type switches can be used to check the union value
	switch v := union.(type) {
	case *types.TraceMemberFailureTrace:
		_ = v.Value // Value is types.FailureTrace

	case *types.TraceMemberGuardrailTrace:
		_ = v.Value // Value is types.GuardrailTrace

	case *types.TraceMemberOrchestrationTrace:
		_ = v.Value // Value is types.OrchestrationTrace

	case *types.TraceMemberPostProcessingTrace:
		_ = v.Value // Value is types.PostProcessingTrace

	case *types.TraceMemberPreProcessingTrace:
		_ = v.Value // Value is types.PreProcessingTrace

	case *types.UnknownUnionMember:
		fmt.Println("unknown tag:", v.Tag)

	default:
		fmt.Println("union is nil or unknown type")

	}
}

type TraceMemberFailureTrace

type TraceMemberFailureTrace struct {
	Value FailureTrace
	// contains filtered or unexported fields
}

Contains information about the failure of the interaction.

type TraceMemberGuardrailTrace

type TraceMemberGuardrailTrace struct {
	Value GuardrailTrace
	// contains filtered or unexported fields
}

The trace details for a trace defined in the Guardrail filter.

type TraceMemberOrchestrationTrace

type TraceMemberOrchestrationTrace struct {
	Value OrchestrationTrace
	// contains filtered or unexported fields
}

Details about the orchestration step, in which the agent determines the order in which actions are executed and which knowledge bases are retrieved.

type TraceMemberPostProcessingTrace

type TraceMemberPostProcessingTrace struct {
	Value PostProcessingTrace
	// contains filtered or unexported fields
}

Details about the post-processing step, in which the agent shapes the response..

type TraceMemberPreProcessingTrace

type TraceMemberPreProcessingTrace struct {
	Value PreProcessingTrace
	// contains filtered or unexported fields
}

Details about the pre-processing step, in which the agent contextualizes and categorizes user inputs.

type TracePart

type TracePart struct {

	// The unique identifier of the alias of the agent.
	AgentAliasId *string

	// The unique identifier of the agent.
	AgentId *string

	// The version of the agent.
	AgentVersion *string

	// The unique identifier of the session with the agent.
	SessionId *string

	// Contains one part of the agent's reasoning process and results from calling API
	// actions and querying knowledge bases. You can use the trace to understand how
	// the agent arrived at the response it provided the customer. For more
	// information, see [Trace enablement].
	//
	// [Trace enablement]: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-test.html#trace-enablement
	Trace Trace
	// contains filtered or unexported fields
}

Contains information about the agent and session, alongside the agent's reasoning process and results from calling API actions and querying knowledge bases and metadata about the trace. You can use the trace to understand how the agent arrived at the response it provided the customer. For more information, see Trace enablement.

type Type

type Type string
const (
	TypeActionGroup   Type = "ACTION_GROUP"
	TypeKnowledgeBase Type = "KNOWLEDGE_BASE"
	TypeFinish        Type = "FINISH"
	TypeAskUser       Type = "ASK_USER"
	TypeReprompt      Type = "REPROMPT"
)

Enum values for Type

func (Type) Values

func (Type) Values() []Type

Values returns all known values for Type. Note that this can be expanded in the future, and so it is only as up to date as the client.

The ordering of this slice is not guaranteed to be stable across updates.

type UnknownUnionMember

type UnknownUnionMember struct {
	Tag   string
	Value []byte
	// contains filtered or unexported fields
}

UnknownUnionMember is returned when a union member is returned over the wire, but has an unknown tag.

type ValidationException

type ValidationException struct {
	Message *string

	ErrorCodeOverride *string
	// contains filtered or unexported fields
}

Input validation failed. Check your request parameters and retry the request.

func (*ValidationException) Error

func (e *ValidationException) Error() string

func (*ValidationException) ErrorCode

func (e *ValidationException) ErrorCode() string

func (*ValidationException) ErrorFault

func (e *ValidationException) ErrorFault() smithy.ErrorFault

func (*ValidationException) ErrorMessage

func (e *ValidationException) ErrorMessage() string

Source Files

  • enums.go
  • errors.go
  • types.go

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL