Documentation ¶
Index ¶
- type APISchema
- type APISchemaMemberPayload
- type APISchemaMemberS3
- type AccessDeniedException
- type ActionGroupExecutor
- type ActionGroupExecutorMemberCustomControl
- type ActionGroupExecutorMemberLambda
- type ActionGroupInvocationInput
- type ActionGroupInvocationOutput
- type ActionGroupSignature
- type ActionInvocationType
- type AgentActionGroup
- type AgentCollaboratorInputPayload
- type AgentCollaboratorInvocationInput
- type AgentCollaboratorInvocationOutput
- type AgentCollaboratorOutputPayload
- type AnalyzePromptEvent
- type ApiInvocationInput
- type ApiParameter
- type ApiRequestBody
- type ApiResult
- type AttributeType
- type Attribution
- type BadGatewayException
- type BedrockModelConfigurations
- type BedrockRerankingConfiguration
- type BedrockRerankingModelConfiguration
- type ByteContentDoc
- type ByteContentFile
- type Caller
- type CallerMemberAgentAliasArn
- type Citation
- type CitationEvent
- type CodeInterpreterInvocationInput
- type CodeInterpreterInvocationOutput
- type ConfirmationState
- type ConflictException
- type ContentBlock
- type ContentBlockMemberText
- type ContentBody
- type ConversationHistory
- type ConversationRole
- type CreationMode
- type CustomControlMethod
- type CustomOrchestrationTrace
- type CustomOrchestrationTraceEvent
- type DependencyFailedException
- type ExecutionType
- type ExternalSource
- type ExternalSourceType
- type ExternalSourcesGenerationConfiguration
- type ExternalSourcesRetrieveAndGenerateConfiguration
- type FailureTrace
- type FieldForReranking
- type FilePart
- type FileSource
- type FileSourceType
- type FileUseCase
- type FilterAttribute
- type FinalResponse
- type FlowCompletionEvent
- type FlowCompletionReason
- type FlowInput
- type FlowInputContent
- type FlowInputContentMemberDocument
- type FlowOutputContent
- type FlowOutputContentMemberDocument
- type FlowOutputEvent
- type FlowResponseStream
- type FlowResponseStreamMemberFlowCompletionEvent
- type FlowResponseStreamMemberFlowOutputEvent
- type FlowResponseStreamMemberFlowTraceEvent
- type FlowTrace
- type FlowTraceCondition
- type FlowTraceConditionNodeResultEvent
- type FlowTraceEvent
- type FlowTraceMemberConditionNodeResultTrace
- type FlowTraceMemberNodeInputTrace
- type FlowTraceMemberNodeOutputTrace
- type FlowTraceNodeInputContent
- type FlowTraceNodeInputContentMemberDocument
- type FlowTraceNodeInputEvent
- type FlowTraceNodeInputField
- type FlowTraceNodeOutputContent
- type FlowTraceNodeOutputContentMemberDocument
- type FlowTraceNodeOutputEvent
- type FlowTraceNodeOutputField
- type FunctionDefinition
- type FunctionInvocationInput
- type FunctionParameter
- type FunctionResult
- type FunctionSchema
- type FunctionSchemaMemberFunctions
- type GeneratedQuery
- type GeneratedQueryType
- type GeneratedResponsePart
- type GenerationConfiguration
- type GuadrailAction
- type GuardrailAction
- type GuardrailAssessment
- type GuardrailConfiguration
- type GuardrailConfigurationWithArn
- type GuardrailContentFilter
- type GuardrailContentFilterConfidence
- type GuardrailContentFilterType
- type GuardrailContentPolicyAction
- type GuardrailContentPolicyAssessment
- type GuardrailCustomWord
- type GuardrailEvent
- type GuardrailManagedWord
- type GuardrailManagedWordType
- type GuardrailPiiEntityFilter
- type GuardrailPiiEntityType
- type GuardrailRegexFilter
- type GuardrailSensitiveInformationPolicyAction
- type GuardrailSensitiveInformationPolicyAssessment
- type GuardrailTopic
- type GuardrailTopicPolicyAction
- type GuardrailTopicPolicyAssessment
- type GuardrailTopicType
- type GuardrailTrace
- type GuardrailWordPolicyAction
- type GuardrailWordPolicyAssessment
- type ImplicitFilterConfiguration
- type InferenceConfig
- type InferenceConfiguration
- type InlineAgentFilePart
- type InlineAgentPayloadPart
- type InlineAgentResponseStream
- type InlineAgentResponseStreamMemberChunk
- type InlineAgentResponseStreamMemberFiles
- type InlineAgentResponseStreamMemberReturnControl
- type InlineAgentResponseStreamMemberTrace
- type InlineAgentReturnControlPayload
- type InlineAgentTracePart
- type InlineBedrockModelConfigurations
- type InlineSessionState
- type InputFile
- type InputPrompt
- type InputPromptMemberTextPrompt
- type InputQueryType
- type InternalServerException
- type InvocationInput
- type InvocationInputMember
- type InvocationInputMemberMemberApiInvocationInput
- type InvocationInputMemberMemberFunctionInvocationInput
- type InvocationResultMember
- type InvocationResultMemberMemberApiResult
- type InvocationResultMemberMemberFunctionResult
- type InvocationType
- type KnowledgeBase
- type KnowledgeBaseConfiguration
- type KnowledgeBaseLookupInput
- type KnowledgeBaseLookupOutput
- type KnowledgeBaseQuery
- type KnowledgeBaseRetrievalConfiguration
- type KnowledgeBaseRetrievalResult
- type KnowledgeBaseRetrieveAndGenerateConfiguration
- type KnowledgeBaseVectorSearchConfiguration
- type Memory
- type MemoryMemberSessionSummary
- type MemorySessionSummary
- type MemoryType
- type Message
- type Metadata
- type MetadataAttributeSchema
- type MetadataConfigurationForReranking
- type ModelInvocationInput
- type ModelNotReadyException
- type ModelPerformanceConfiguration
- type NodeType
- type Observation
- type OptimizedPrompt
- type OptimizedPromptEvent
- type OptimizedPromptMemberTextPrompt
- type OptimizedPromptStream
- type OptimizedPromptStreamMemberAnalyzePromptEvent
- type OptimizedPromptStreamMemberOptimizedPromptEvent
- type OrchestrationConfiguration
- type OrchestrationModelInvocationOutput
- type OrchestrationTrace
- type OrchestrationTraceMemberInvocationInput
- type OrchestrationTraceMemberModelInvocationInput
- type OrchestrationTraceMemberModelInvocationOutput
- type OrchestrationTraceMemberObservation
- type OrchestrationTraceMemberRationale
- type OutputFile
- type Parameter
- type ParameterDetail
- type ParameterType
- type PayloadPart
- type PayloadType
- type PerformanceConfigLatency
- type PerformanceConfiguration
- type PostProcessingModelInvocationOutput
- type PostProcessingParsedResponse
- type PostProcessingTrace
- type PostProcessingTraceMemberModelInvocationInput
- type PostProcessingTraceMemberModelInvocationOutput
- type PreProcessingModelInvocationOutput
- type PreProcessingParsedResponse
- type PreProcessingTrace
- type PreProcessingTraceMemberModelInvocationInput
- type PreProcessingTraceMemberModelInvocationOutput
- type PromptConfiguration
- type PromptOverrideConfiguration
- type PromptState
- type PromptTemplate
- type PromptType
- type PropertyParameters
- type QueryGenerationInput
- type QueryTransformationConfiguration
- type QueryTransformationMode
- type QueryTransformationType
- type Rationale
- type RawResponse
- type RepromptResponse
- type RequestBody
- type RequireConfirmation
- type RerankDocument
- type RerankDocumentType
- type RerankQuery
- type RerankQueryContentType
- type RerankResult
- type RerankSource
- type RerankSourceType
- type RerankTextDocument
- type RerankingConfiguration
- type RerankingConfigurationType
- type RerankingMetadataSelectionMode
- type RerankingMetadataSelectiveModeConfiguration
- type RerankingMetadataSelectiveModeConfigurationMemberFieldsToExclude
- type RerankingMetadataSelectiveModeConfigurationMemberFieldsToInclude
- type ResourceNotFoundException
- type ResponseState
- type ResponseStream
- type ResponseStreamMemberChunk
- type ResponseStreamMemberFiles
- type ResponseStreamMemberReturnControl
- type ResponseStreamMemberTrace
- type RetrievalFilter
- type RetrievalFilterMemberAndAll
- type RetrievalFilterMemberEquals
- type RetrievalFilterMemberGreaterThan
- type RetrievalFilterMemberGreaterThanOrEquals
- type RetrievalFilterMemberIn
- type RetrievalFilterMemberLessThan
- type RetrievalFilterMemberLessThanOrEquals
- type RetrievalFilterMemberListContains
- type RetrievalFilterMemberNotEquals
- type RetrievalFilterMemberNotIn
- type RetrievalFilterMemberOrAll
- type RetrievalFilterMemberStartsWith
- type RetrievalFilterMemberStringContains
- type RetrievalResultConfluenceLocation
- type RetrievalResultContent
- type RetrievalResultContentColumn
- type RetrievalResultContentColumnType
- type RetrievalResultContentType
- type RetrievalResultCustomDocumentLocation
- type RetrievalResultKendraDocumentLocation
- type RetrievalResultLocation
- type RetrievalResultLocationType
- type RetrievalResultS3Location
- type RetrievalResultSalesforceLocation
- type RetrievalResultSharePointLocation
- type RetrievalResultSqlLocation
- type RetrievalResultWebLocation
- type RetrieveAndGenerateConfiguration
- type RetrieveAndGenerateInput
- type RetrieveAndGenerateOutput
- type RetrieveAndGenerateOutputEvent
- type RetrieveAndGenerateSessionConfiguration
- type RetrieveAndGenerateStreamResponseOutput
- type RetrieveAndGenerateStreamResponseOutputMemberCitation
- type RetrieveAndGenerateStreamResponseOutputMemberGuardrail
- type RetrieveAndGenerateStreamResponseOutputMemberOutput
- type RetrieveAndGenerateType
- type RetrievedReference
- type ReturnControlPayload
- type ReturnControlResults
- type RoutingClassifierModelInvocationOutput
- type RoutingClassifierTrace
- type RoutingClassifierTraceMemberInvocationInput
- type RoutingClassifierTraceMemberModelInvocationInput
- type RoutingClassifierTraceMemberModelInvocationOutput
- type RoutingClassifierTraceMemberObservation
- type S3Identifier
- type S3ObjectDoc
- type S3ObjectFile
- type SearchType
- type ServiceQuotaExceededException
- type SessionState
- type Source
- type Span
- type StreamingConfigurations
- type TextInferenceConfig
- type TextPrompt
- type TextResponsePart
- type TextToSqlConfiguration
- type TextToSqlConfigurationType
- type TextToSqlKnowledgeBaseConfiguration
- type ThrottlingException
- type Trace
- type TraceMemberCustomOrchestrationTrace
- type TraceMemberFailureTrace
- type TraceMemberGuardrailTrace
- type TraceMemberOrchestrationTrace
- type TraceMemberPostProcessingTrace
- type TraceMemberPreProcessingTrace
- type TraceMemberRoutingClassifierTrace
- type TracePart
- type TransformationConfiguration
- type Type
- type UnknownUnionMember
- type Usage
- type ValidationException
- type VectorSearchBedrockRerankingConfiguration
- type VectorSearchBedrockRerankingModelConfiguration
- type VectorSearchRerankingConfiguration
- type VectorSearchRerankingConfigurationType
Examples ¶
- APISchema (OutputUsage)
- ActionGroupExecutor (OutputUsage)
- Caller (OutputUsage)
- ContentBlock (OutputUsage)
- FlowInputContent (OutputUsage)
- FlowOutputContent (OutputUsage)
- FlowResponseStream (OutputUsage)
- FlowTrace (OutputUsage)
- FlowTraceNodeInputContent (OutputUsage)
- FlowTraceNodeOutputContent (OutputUsage)
- FunctionSchema (OutputUsage)
- InlineAgentResponseStream (OutputUsage)
- InputPrompt (OutputUsage)
- InvocationInputMember (OutputUsage)
- InvocationResultMember (OutputUsage)
- Memory (OutputUsage)
- OptimizedPrompt (OutputUsage)
- OptimizedPromptStream (OutputUsage)
- OrchestrationTrace (OutputUsage)
- PostProcessingTrace (OutputUsage)
- PreProcessingTrace (OutputUsage)
- RerankingMetadataSelectiveModeConfiguration (OutputUsage)
- ResponseStream (OutputUsage)
- RetrievalFilter (OutputUsage)
- RetrieveAndGenerateStreamResponseOutput (OutputUsage)
- RoutingClassifierTrace (OutputUsage)
- Trace (OutputUsage)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APISchema ¶ added in v1.26.0
type APISchema interface {
// contains filtered or unexported methods
}
Contains details about the OpenAPI schema for the action group. For more
information, see Action group OpenAPI schemas. You can either include the schema directly in the payload field or you can upload it to an S3 bucket and specify the S3 bucket location in the s3 field.
The following types satisfy this interface:
APISchemaMemberPayload APISchemaMemberS3
Example (OutputUsage) ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/bedrockagentruntime/types" ) func main() { var union types.APISchema // type switches can be used to check the union value switch v := union.(type) { case *types.APISchemaMemberPayload: _ = v.Value // Value is string case *types.APISchemaMemberS3: _ = v.Value // Value is types.S3Identifier case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) default: fmt.Println("union is nil or unknown type") } }
Output:
type APISchemaMemberPayload ¶ added in v1.26.0
type APISchemaMemberPayload struct { Value string // contains filtered or unexported fields }
The JSON or YAML-formatted payload defining the OpenAPI schema for the action
group.
type APISchemaMemberS3 ¶ added in v1.26.0
type APISchemaMemberS3 struct { Value S3Identifier // contains filtered or unexported fields }
Contains details about the S3 object containing the OpenAPI schema for the
action group.
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 ActionGroupExecutor ¶ added in v1.26.0
type ActionGroupExecutor interface {
// contains filtered or unexported methods
}
Contains details about the Lambda function containing the business logic that
is carried out upon invoking the action or the custom control method for handling the information elicited from the user.
The following types satisfy this interface:
ActionGroupExecutorMemberCustomControl ActionGroupExecutorMemberLambda
Example (OutputUsage) ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/bedrockagentruntime/types" ) func main() { var union types.ActionGroupExecutor // type switches can be used to check the union value switch v := union.(type) { case *types.ActionGroupExecutorMemberCustomControl: _ = v.Value // Value is types.CustomControlMethod case *types.ActionGroupExecutorMemberLambda: _ = v.Value // Value is string case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) default: fmt.Println("union is nil or unknown type") } }
Output:
type ActionGroupExecutorMemberCustomControl ¶ added in v1.26.0
type ActionGroupExecutorMemberCustomControl struct { Value CustomControlMethod // contains filtered or unexported fields }
To return the action group invocation results directly in the InvokeInlineAgent
response, specify RETURN_CONTROL .
type ActionGroupExecutorMemberLambda ¶ added in v1.26.0
type ActionGroupExecutorMemberLambda struct { Value string // contains filtered or unexported fields }
The Amazon Resource Name (ARN) of the Lambda function containing the business
logic that is carried out upon invoking the action.
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 // How fulfillment of the action is handled. For more information, see [Handling fulfillment of the action]. // // [Handling fulfillment of the action]: https://docs.aws.amazon.com/bedrock/latest/userguide/action-handle.html ExecutionType ExecutionType // The function in the action group to call. Function *string // The unique identifier of the invocation. Only returned if the executionType is // RETURN_CONTROL . InvocationId *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 ActionGroupSignature ¶ added in v1.26.0
type ActionGroupSignature string
const ( ActionGroupSignatureAmazonUserinput ActionGroupSignature = "AMAZON.UserInput" ActionGroupSignatureAmazonCodeinterpreter ActionGroupSignature = "AMAZON.CodeInterpreter" )
Enum values for ActionGroupSignature
func (ActionGroupSignature) Values ¶ added in v1.26.0
func (ActionGroupSignature) Values() []ActionGroupSignature
Values returns all known values for ActionGroupSignature. 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 ActionInvocationType ¶ added in v1.17.0
type ActionInvocationType string
const ( ActionInvocationTypeResult ActionInvocationType = "RESULT" ActionInvocationTypeUserConfirmation ActionInvocationType = "USER_CONFIRMATION" ActionInvocationTypeUserConfirmationAndResult ActionInvocationType = "USER_CONFIRMATION_AND_RESULT" )
Enum values for ActionInvocationType
func (ActionInvocationType) Values ¶ added in v1.17.0
func (ActionInvocationType) Values() []ActionInvocationType
Values returns all known values for ActionInvocationType. 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 AgentActionGroup ¶ added in v1.26.0
type AgentActionGroup struct { // The name of the action group. // // This member is required. ActionGroupName *string // The Amazon Resource Name (ARN) of the Lambda function containing the business // logic that is carried out upon invoking the action or the custom control method // for handling the information elicited from the user. ActionGroupExecutor ActionGroupExecutor // Contains either details about the S3 object containing the OpenAPI schema for // the action group or the JSON or YAML-formatted payload defining the schema. For // more information, see [Action group OpenAPI schemas]. // // [Action group OpenAPI schemas]: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-api-schema.html ApiSchema APISchema // A description of the action group. Description *string // Contains details about the function schema for the action group or the JSON or // YAML-formatted payload defining the schema. FunctionSchema FunctionSchema // To allow your agent to request the user for additional information when trying // to complete a task, set this field to AMAZON.UserInput . You must leave the // description , apiSchema , and actionGroupExecutor fields blank for this action // group. // // To allow your agent to generate, run, and troubleshoot code when trying to // complete a task, set this field to AMAZON.CodeInterpreter . You must leave the // description , apiSchema , and actionGroupExecutor fields blank for this action // group. // // During orchestration, if your agent determines that it needs to invoke an API // in an action group, but doesn't have enough information to complete the API // request, it will invoke this action group instead and return an [Observation]reprompting the // user for more information. // // [Observation]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Observation.html ParentActionGroupSignature ActionGroupSignature // contains filtered or unexported fields }
Contains details of the inline agent's action group.
type AgentCollaboratorInputPayload ¶ added in v1.29.0
type AgentCollaboratorInputPayload struct { // An action invocation result. ReturnControlResults *ReturnControlResults // Input text. Text *string // The input type. Type PayloadType // contains filtered or unexported fields }
Input for an agent collaborator. The input can be text or an action invocation result.
type AgentCollaboratorInvocationInput ¶ added in v1.29.0
type AgentCollaboratorInvocationInput struct { // The collaborator's alias ARN. AgentCollaboratorAliasArn *string // The collaborator's name. AgentCollaboratorName *string // Text or action invocation result input for the collaborator. Input *AgentCollaboratorInputPayload // contains filtered or unexported fields }
An agent collaborator invocation input.
type AgentCollaboratorInvocationOutput ¶ added in v1.29.0
type AgentCollaboratorInvocationOutput struct { // The output's agent collaborator alias ARN. AgentCollaboratorAliasArn *string // The output's agent collaborator name. AgentCollaboratorName *string // The output's output. Output *AgentCollaboratorOutputPayload // contains filtered or unexported fields }
Output from an agent collaborator.
type AgentCollaboratorOutputPayload ¶ added in v1.29.0
type AgentCollaboratorOutputPayload struct { // An action invocation result. ReturnControlPayload *ReturnControlPayload // Text output. Text *string // The type of output. Type PayloadType // contains filtered or unexported fields }
Output from an agent collaborator. The output can be text or an action invocation result.
type AnalyzePromptEvent ¶ added in v1.25.0
type AnalyzePromptEvent struct { // A message describing the analysis of the prompt. Message *string // contains filtered or unexported fields }
An event in which the prompt was analyzed in preparation for optimization.
type ApiInvocationInput ¶ added in v1.7.0
type ApiInvocationInput struct { // The action group that the API operation belongs to. // // This member is required. ActionGroup *string // Contains information about the API operation to invoke. ActionInvocationType ActionInvocationType // The agent's ID. AgentId *string // The path to the API operation. ApiPath *string // The agent collaborator's name. CollaboratorName *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:
- In the returnControl field of the InvokeAgent response
type ApiParameter ¶ added in v1.7.0
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:
type ApiRequestBody ¶ added in v1.7.0
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:
type ApiResult ¶ added in v1.7.0
type ApiResult struct { // The action group that the API operation belongs to. // // This member is required. ActionGroup *string // The agent's ID. AgentId *string // The path to the API operation. ApiPath *string // Controls the API operations or functions to invoke based on the user // confirmation. ConfirmationState ConfirmationState // 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:
- In the returnControlInvocationResults of the InvokeAgent request
type AttributeType ¶ added in v1.28.0
type AttributeType string
const ( AttributeTypeString AttributeType = "STRING" AttributeTypeNumber AttributeType = "NUMBER" AttributeTypeBoolean AttributeType = "BOOLEAN" AttributeTypeStringList AttributeType = "STRING_LIST" )
Enum values for AttributeType
func (AttributeType) Values ¶ added in v1.28.0
func (AttributeType) Values() []AttributeType
Values returns all known values for AttributeType. 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 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 BedrockModelConfigurations ¶ added in v1.31.0
type BedrockModelConfigurations struct { // The performance configuration for the model. PerformanceConfig *PerformanceConfiguration // contains filtered or unexported fields }
Settings for a model called with InvokeAgent.
type BedrockRerankingConfiguration ¶ added in v1.28.0
type BedrockRerankingConfiguration struct { // Contains configurations for a reranker model. // // This member is required. ModelConfiguration *BedrockRerankingModelConfiguration // The number of results to return after reranking. NumberOfResults *int32 // contains filtered or unexported fields }
Contains configurations for an Amazon Bedrock reranker model.
type BedrockRerankingModelConfiguration ¶ added in v1.28.0
type BedrockRerankingModelConfiguration struct { // The ARN of the reranker model. // // This member is required. ModelArn *string // A JSON object whose keys are request fields for the model and whose values are // values for those fields. AdditionalModelRequestFields map[string]document.Interface // contains filtered or unexported fields }
Contains configurations for a reranker model.
type ByteContentDoc ¶ added in v1.8.0
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 ByteContentFile ¶ added in v1.14.0
type ByteContentFile struct { // The raw bytes of the file to attach. The maximum size of all files that is // attached is 10MB. You can attach a maximum of 5 files. // // This member is required. Data []byte // The MIME type of data contained in the file used for chat. // // This member is required. MediaType *string // contains filtered or unexported fields }
The property contains the file to chat with, along with its attributes.
type Caller ¶ added in v1.29.0
type Caller interface {
// contains filtered or unexported methods
}
Details about a caller.
The following types satisfy this interface:
CallerMemberAgentAliasArn
Example (OutputUsage) ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/bedrockagentruntime/types" ) func main() { var union types.Caller // type switches can be used to check the union value switch v := union.(type) { case *types.CallerMemberAgentAliasArn: _ = v.Value // Value is string case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) default: fmt.Println("union is nil or unknown type") } }
Output:
type CallerMemberAgentAliasArn ¶ added in v1.29.0
type CallerMemberAgentAliasArn struct { Value string // contains filtered or unexported fields }
The caller's agent alias ARN.
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:
- – in the citations field
- – in the citations field
type CitationEvent ¶ added in v1.28.0
type CitationEvent struct { // The citation. Citation *Citation // contains filtered or unexported fields }
A citation event.
type CodeInterpreterInvocationInput ¶ added in v1.14.0
type CodeInterpreterInvocationInput struct { // The code for the code interpreter to use. Code *string // Files that are uploaded for code interpreter to use. Files []string // contains filtered or unexported fields }
Contains information about the code interpreter being invoked.
type CodeInterpreterInvocationOutput ¶ added in v1.14.0
type CodeInterpreterInvocationOutput struct { // Contains the error returned from code execution. ExecutionError *string // Contains the successful output returned from code execution ExecutionOutput *string // Indicates if the execution of the code timed out. ExecutionTimeout *bool // Contains output files, if generated by code execution. Files []string // contains filtered or unexported fields }
Contains the JSON-formatted string returned by the API invoked by the code interpreter.
type ConfirmationState ¶ added in v1.17.0
type ConfirmationState string
const ( ConfirmationStateConfirm ConfirmationState = "CONFIRM" ConfirmationStateDeny ConfirmationState = "DENY" )
Enum values for ConfirmationState
func (ConfirmationState) Values ¶ added in v1.17.0
func (ConfirmationState) Values() []ConfirmationState
Values returns all known values for ConfirmationState. 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 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 ContentBlock ¶ added in v1.29.0
type ContentBlock interface {
// contains filtered or unexported methods
}
A content block.
The following types satisfy this interface:
ContentBlockMemberText
Example (OutputUsage) ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/bedrockagentruntime/types" ) func main() { var union types.ContentBlock // type switches can be used to check the union value switch v := union.(type) { case *types.ContentBlockMemberText: _ = v.Value // Value is string case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) default: fmt.Println("union is nil or unknown type") } }
Output:
type ContentBlockMemberText ¶ added in v1.29.0
type ContentBlockMemberText struct { Value string // contains filtered or unexported fields }
The block's text.
type ContentBody ¶ added in v1.7.0
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:
- In the returnControlInvocationResults field of the InvokeAgent request
type ConversationHistory ¶ added in v1.29.0
type ConversationHistory struct { // The conversation's messages. Messages []Message // contains filtered or unexported fields }
A conversation history.
type ConversationRole ¶ added in v1.29.0
type ConversationRole string
const ( ConversationRoleUser ConversationRole = "user" ConversationRoleAssistant ConversationRole = "assistant" )
Enum values for ConversationRole
func (ConversationRole) Values ¶ added in v1.29.0
func (ConversationRole) Values() []ConversationRole
Values returns all known values for ConversationRole. Note that this can be expanded in the future, and so it is only as up to date as the client.
The ordering of this slice is not guaranteed to be stable across updates.
type 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 CustomControlMethod ¶ added in v1.26.0
type CustomControlMethod string
const (
CustomControlMethodReturnControl CustomControlMethod = "RETURN_CONTROL"
)
Enum values for CustomControlMethod
func (CustomControlMethod) Values ¶ added in v1.26.0
func (CustomControlMethod) Values() []CustomControlMethod
Values returns all known values for CustomControlMethod. 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 CustomOrchestrationTrace ¶ added in v1.27.0
type CustomOrchestrationTrace struct { // The event details used with the custom orchestration. Event *CustomOrchestrationTraceEvent // The unique identifier of the trace. TraceId *string // contains filtered or unexported fields }
The trace behavior for the custom orchestration.
type CustomOrchestrationTraceEvent ¶ added in v1.27.0
type CustomOrchestrationTraceEvent struct { // The text that prompted the event at this step. Text *string // contains filtered or unexported fields }
The event in the custom orchestration sequence. Events are the responses which
the custom orchestration Lambda function sends as response to the agent.
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 (e *DependencyFailedException) ErrorFault() smithy.ErrorFault
func (*DependencyFailedException) ErrorMessage ¶
func (e *DependencyFailedException) ErrorMessage() string
type ExecutionType ¶ added in v1.14.0
type ExecutionType string
const ( ExecutionTypeLambda ExecutionType = "LAMBDA" ExecutionTypeReturnControl ExecutionType = "RETURN_CONTROL" )
Enum values for ExecutionType
func (ExecutionType) Values ¶ added in v1.14.0
func (ExecutionType) Values() []ExecutionType
Values returns all known values for ExecutionType. 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 ExternalSource ¶ added in v1.8.0
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 ¶ added in v1.8.0
type ExternalSourceType string
const ( ExternalSourceTypeS3 ExternalSourceType = "S3" ExternalSourceTypeByteContent ExternalSourceType = "BYTE_CONTENT" )
Enum values for ExternalSourceType
func (ExternalSourceType) Values ¶ added in v1.8.0
func (ExternalSourceType) Values() []ExternalSourceType
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 ¶ added in v1.8.0
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 // The latency configuration for the model. PerformanceConfig *PerformanceConfiguration // 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 ¶ added in v1.8.0
type ExternalSourcesRetrieveAndGenerateConfiguration struct { // The model Amazon Resource Name (ARN) for the external source wrapper object in // the retrieveAndGenerate function. // // This member is required. ModelArn *string // The document for 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 FieldForReranking ¶ added in v1.28.0
type FieldForReranking struct { // The name of a metadata field to include in or exclude from consideration when // reranking. // // This member is required. FieldName *string // contains filtered or unexported fields }
Contains information for a metadata field to include in or exclude from consideration when reranking.
type FilePart ¶ added in v1.14.0
type FilePart struct { // Files containing intermediate response for the user. Files []OutputFile // contains filtered or unexported fields }
Contains intermediate response for code interpreter if any files have been generated.
type FileSource ¶ added in v1.14.0
type FileSource struct { // The source type of the files to attach. // // This member is required. SourceType FileSourceType // The data and the text of the attached files. ByteContent *ByteContentFile // The s3 location of the files to attach. S3Location *S3ObjectFile // contains filtered or unexported fields }
The source file of the content contained in the wrapper object.
type FileSourceType ¶ added in v1.14.0
type FileSourceType string
const ( FileSourceTypeS3 FileSourceType = "S3" FileSourceTypeByteContent FileSourceType = "BYTE_CONTENT" )
Enum values for FileSourceType
func (FileSourceType) Values ¶ added in v1.14.0
func (FileSourceType) Values() []FileSourceType
Values returns all known values for FileSourceType. 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 FileUseCase ¶ added in v1.14.0
type FileUseCase string
const ( FileUseCaseCodeInterpreter FileUseCase = "CODE_INTERPRETER" FileUseCaseChat FileUseCase = "CHAT" )
Enum values for FileUseCase
func (FileUseCase) Values ¶ added in v1.14.0
func (FileUseCase) Values() []FileUseCase
Values returns all known values for FileUseCase. 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 FilterAttribute ¶ added in v1.6.0
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:
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 FlowCompletionEvent ¶ added in v1.14.0
type FlowCompletionEvent struct { // The reason that the flow completed. // // This member is required. CompletionReason FlowCompletionReason // contains filtered or unexported fields }
Contains information about why a flow completed.
type FlowCompletionReason ¶ added in v1.14.0
type FlowCompletionReason string
const (
FlowCompletionReasonSuccess FlowCompletionReason = "SUCCESS"
)
Enum values for FlowCompletionReason
func (FlowCompletionReason) Values ¶ added in v1.14.0
func (FlowCompletionReason) Values() []FlowCompletionReason
Values returns all known values for FlowCompletionReason. 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 FlowInput ¶ added in v1.14.0
type FlowInput struct { // Contains information about an input into the prompt flow. // // This member is required. Content FlowInputContent // The name of the flow input node that begins the prompt flow. // // This member is required. NodeName *string // The name of the output from the flow input node that begins the prompt flow. // // This member is required. NodeOutputName *string // contains filtered or unexported fields }
Contains information about an input into the prompt flow and where to send it.
type FlowInputContent ¶ added in v1.14.0
type FlowInputContent interface {
// contains filtered or unexported methods
}
Contains information about an input into the flow.
The following types satisfy this interface:
FlowInputContentMemberDocument
Example (OutputUsage) ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/bedrockagentruntime/types" ) func main() { var union types.FlowInputContent // type switches can be used to check the union value switch v := union.(type) { case *types.FlowInputContentMemberDocument: _ = v.Value // Value is document.Interface case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) default: fmt.Println("union is nil or unknown type") } }
Output:
type FlowInputContentMemberDocument ¶ added in v1.14.0
type FlowInputContentMemberDocument struct { Value document.Interface // contains filtered or unexported fields }
The input to send to the prompt flow input node.
type FlowOutputContent ¶ added in v1.14.0
type FlowOutputContent interface {
// contains filtered or unexported methods
}
Contains information about the content in an output from prompt flow invocation.
The following types satisfy this interface:
FlowOutputContentMemberDocument
Example (OutputUsage) ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/bedrockagentruntime/types" ) func main() { var union types.FlowOutputContent // type switches can be used to check the union value switch v := union.(type) { case *types.FlowOutputContentMemberDocument: _ = v.Value // Value is document.Interface case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) default: fmt.Println("union is nil or unknown type") } }
Output:
type FlowOutputContentMemberDocument ¶ added in v1.14.0
type FlowOutputContentMemberDocument struct { Value document.Interface // contains filtered or unexported fields }
The content in the output.
type FlowOutputEvent ¶ added in v1.14.0
type FlowOutputEvent struct { // The content in the output. // // This member is required. Content FlowOutputContent // The name of the flow output node that the output is from. // // This member is required. NodeName *string // The type of the node that the output is from. // // This member is required. NodeType NodeType // contains filtered or unexported fields }
Contains information about an output from prompt flow invoction.
type FlowResponseStream ¶ added in v1.14.0
type FlowResponseStream interface {
// contains filtered or unexported methods
}
The output of the flow.
The following types satisfy this interface:
FlowResponseStreamMemberFlowCompletionEvent FlowResponseStreamMemberFlowOutputEvent FlowResponseStreamMemberFlowTraceEvent
Example (OutputUsage) ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/bedrockagentruntime/types" ) func main() { var union types.FlowResponseStream // type switches can be used to check the union value switch v := union.(type) { case *types.FlowResponseStreamMemberFlowCompletionEvent: _ = v.Value // Value is types.FlowCompletionEvent case *types.FlowResponseStreamMemberFlowOutputEvent: _ = v.Value // Value is types.FlowOutputEvent case *types.FlowResponseStreamMemberFlowTraceEvent: _ = v.Value // Value is types.FlowTraceEvent case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) default: fmt.Println("union is nil or unknown type") } }
Output:
type FlowResponseStreamMemberFlowCompletionEvent ¶ added in v1.14.0
type FlowResponseStreamMemberFlowCompletionEvent struct { Value FlowCompletionEvent // contains filtered or unexported fields }
Contains information about why the flow completed.
type FlowResponseStreamMemberFlowOutputEvent ¶ added in v1.14.0
type FlowResponseStreamMemberFlowOutputEvent struct { Value FlowOutputEvent // contains filtered or unexported fields }
Contains information about an output from flow invocation.
type FlowResponseStreamMemberFlowTraceEvent ¶ added in v1.24.0
type FlowResponseStreamMemberFlowTraceEvent struct { Value FlowTraceEvent // contains filtered or unexported fields }
Contains information about a trace, which tracks an input or output for a node in the flow.
type FlowTrace ¶ added in v1.24.0
type FlowTrace interface {
// contains filtered or unexported methods
}
Contains information about an input or output for a node in the flow. For more information, see Track each step in your prompt flow by viewing its trace in Amazon Bedrock.
The following types satisfy this interface:
FlowTraceMemberConditionNodeResultTrace FlowTraceMemberNodeInputTrace FlowTraceMemberNodeOutputTrace
Example (OutputUsage) ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/bedrockagentruntime/types" ) func main() { var union types.FlowTrace // type switches can be used to check the union value switch v := union.(type) { case *types.FlowTraceMemberConditionNodeResultTrace: _ = v.Value // Value is types.FlowTraceConditionNodeResultEvent case *types.FlowTraceMemberNodeInputTrace: _ = v.Value // Value is types.FlowTraceNodeInputEvent case *types.FlowTraceMemberNodeOutputTrace: _ = v.Value // Value is types.FlowTraceNodeOutputEvent case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) default: fmt.Println("union is nil or unknown type") } }
Output:
type FlowTraceCondition ¶ added in v1.24.0
type FlowTraceCondition struct { // The name of the condition. // // This member is required. ConditionName *string // contains filtered or unexported fields }
Contains information about a condition that was satisfied. For more information, see Track each step in your prompt flow by viewing its trace in Amazon Bedrock.
type FlowTraceConditionNodeResultEvent ¶ added in v1.24.0
type FlowTraceConditionNodeResultEvent struct { // The name of the condition node. // // This member is required. NodeName *string // An array of objects containing information about the conditions that were // satisfied. // // This member is required. SatisfiedConditions []FlowTraceCondition // The date and time that the trace was returned. // // This member is required. Timestamp *time.Time // contains filtered or unexported fields }
Contains information about an output from a condition node. For more information, see Track each step in your prompt flow by viewing its trace in Amazon Bedrock.
type FlowTraceEvent ¶ added in v1.24.0
type FlowTraceEvent struct { // The trace object containing information about an input or output for a node in // the flow. // // This member is required. Trace FlowTrace // contains filtered or unexported fields }
Contains information about a trace, which tracks an input or output for a node in the flow. For more information, see Track each step in your prompt flow by viewing its trace in Amazon Bedrock.
type FlowTraceMemberConditionNodeResultTrace ¶ added in v1.24.0
type FlowTraceMemberConditionNodeResultTrace struct { Value FlowTraceConditionNodeResultEvent // contains filtered or unexported fields }
Contains information about an output from a condition node.
type FlowTraceMemberNodeInputTrace ¶ added in v1.24.0
type FlowTraceMemberNodeInputTrace struct { Value FlowTraceNodeInputEvent // contains filtered or unexported fields }
Contains information about the input into a node.
type FlowTraceMemberNodeOutputTrace ¶ added in v1.24.0
type FlowTraceMemberNodeOutputTrace struct { Value FlowTraceNodeOutputEvent // contains filtered or unexported fields }
Contains information about the output from a node.
type FlowTraceNodeInputContent ¶ added in v1.24.0
type FlowTraceNodeInputContent interface {
// contains filtered or unexported methods
}
Contains the content of the node input. For more information, see Track each step in your prompt flow by viewing its trace in Amazon Bedrock.
The following types satisfy this interface:
FlowTraceNodeInputContentMemberDocument
Example (OutputUsage) ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/bedrockagentruntime/types" ) func main() { var union types.FlowTraceNodeInputContent // type switches can be used to check the union value switch v := union.(type) { case *types.FlowTraceNodeInputContentMemberDocument: _ = v.Value // Value is document.Interface case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) default: fmt.Println("union is nil or unknown type") } }
Output:
type FlowTraceNodeInputContentMemberDocument ¶ added in v1.24.0
type FlowTraceNodeInputContentMemberDocument struct { Value document.Interface // contains filtered or unexported fields }
The content of the node input.
type FlowTraceNodeInputEvent ¶ added in v1.24.0
type FlowTraceNodeInputEvent struct { // An array of objects containing information about each field in the input. // // This member is required. Fields []FlowTraceNodeInputField // The name of the node that received the input. // // This member is required. NodeName *string // The date and time that the trace was returned. // // This member is required. Timestamp *time.Time // contains filtered or unexported fields }
Contains information about the input into a node. For more information, see Track each step in your prompt flow by viewing its trace in Amazon Bedrock.
type FlowTraceNodeInputField ¶ added in v1.24.0
type FlowTraceNodeInputField struct { // The content of the node input. // // This member is required. Content FlowTraceNodeInputContent // The name of the node input. // // This member is required. NodeInputName *string // contains filtered or unexported fields }
Contains information about a field in the input into a node. For more information, see Track each step in your prompt flow by viewing its trace in Amazon Bedrock.
type FlowTraceNodeOutputContent ¶ added in v1.24.0
type FlowTraceNodeOutputContent interface {
// contains filtered or unexported methods
}
Contains the content of the node output. For more information, see Track each step in your prompt flow by viewing its trace in Amazon Bedrock.
The following types satisfy this interface:
FlowTraceNodeOutputContentMemberDocument
Example (OutputUsage) ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/bedrockagentruntime/types" ) func main() { var union types.FlowTraceNodeOutputContent // type switches can be used to check the union value switch v := union.(type) { case *types.FlowTraceNodeOutputContentMemberDocument: _ = v.Value // Value is document.Interface case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) default: fmt.Println("union is nil or unknown type") } }
Output:
type FlowTraceNodeOutputContentMemberDocument ¶ added in v1.24.0
type FlowTraceNodeOutputContentMemberDocument struct { Value document.Interface // contains filtered or unexported fields }
The content of the node output.
type FlowTraceNodeOutputEvent ¶ added in v1.24.0
type FlowTraceNodeOutputEvent struct { // An array of objects containing information about each field in the output. // // This member is required. Fields []FlowTraceNodeOutputField // The name of the node that yielded the output. // // This member is required. NodeName *string // The date and time that the trace was returned. // // This member is required. Timestamp *time.Time // contains filtered or unexported fields }
Contains information about the output from a node. For more information, see Track each step in your prompt flow by viewing its trace in Amazon Bedrock.
type FlowTraceNodeOutputField ¶ added in v1.24.0
type FlowTraceNodeOutputField struct { // The content of the node output. // // This member is required. Content FlowTraceNodeOutputContent // The name of the node output. // // This member is required. NodeOutputName *string // contains filtered or unexported fields }
Contains information about a field in the output from a node. For more information, see Track each step in your prompt flow by viewing its trace in Amazon Bedrock.
type FunctionDefinition ¶ added in v1.26.0
type FunctionDefinition struct { // A name for the function. // // This member is required. Name *string // A description of the function and its purpose. Description *string // The parameters that the agent elicits from the user to fulfill the function. Parameters map[string]ParameterDetail // Contains information if user confirmation is required to invoke the function. RequireConfirmation RequireConfirmation // contains filtered or unexported fields }
Defines parameters that the agent needs to invoke from the user to complete
the function. Corresponds to an action in an action group.
type FunctionInvocationInput ¶ added in v1.7.0
type FunctionInvocationInput struct { // The action group that the function belongs to. // // This member is required. ActionGroup *string // Contains information about the function to invoke, ActionInvocationType ActionInvocationType // The agent's ID. AgentId *string // The collaborator's name. CollaboratorName *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:
- In the returnControl field of the InvokeAgent response
type FunctionParameter ¶ added in v1.7.0
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:
- In the returnControl field of the InvokeAgent response
type FunctionResult ¶ added in v1.7.0
type FunctionResult struct { // The action group that the function belongs to. // // This member is required. ActionGroup *string // The agent's ID. AgentId *string // Contains the user confirmation information about the function that was called. ConfirmationState ConfirmationState // 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:
- In the returnControlInvocationResults of the InvokeAgent request
type FunctionSchema ¶ added in v1.26.0
type FunctionSchema interface {
// contains filtered or unexported methods
}
Contains details about the function schema for the action group or the JSON or
YAML-formatted payload defining the schema.
The following types satisfy this interface:
FunctionSchemaMemberFunctions
Example (OutputUsage) ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/bedrockagentruntime/types" ) func main() { var union types.FunctionSchema // type switches can be used to check the union value switch v := union.(type) { case *types.FunctionSchemaMemberFunctions: _ = v.Value // Value is []types.FunctionDefinition case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) default: fmt.Println("union is nil or unknown type") } }
Output:
type FunctionSchemaMemberFunctions ¶ added in v1.26.0
type FunctionSchemaMemberFunctions struct { Value []FunctionDefinition // contains filtered or unexported fields }
A list of functions that each define an action in the action group.
type GeneratedQuery ¶ added in v1.30.0
type GeneratedQuery struct { // An SQL query that corresponds to the natural language query. Sql *string // The type of transformed query. Type GeneratedQueryType // contains filtered or unexported fields }
Contains information about a query generated for a natural language query.
type GeneratedQueryType ¶ added in v1.30.0
type GeneratedQueryType string
const (
GeneratedQueryTypeRedshiftSql GeneratedQueryType = "REDSHIFT_SQL"
)
Enum values for GeneratedQueryType
func (GeneratedQueryType) Values ¶ added in v1.30.0
func (GeneratedQueryType) Values() []GeneratedQueryType
Values returns all known values for GeneratedQueryType. 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 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:
- – in the generatedResponsePart field
- – in the generatedResponsePart field
type GenerationConfiguration ¶ added in v1.5.0
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 // The latency configuration for the model. PerformanceConfig *PerformanceConfiguration // Contains the template for the prompt that's sent to the model for response // generation. Generation prompts must include the $search_results$ variable. For // more information, see [Use placeholder variables]in the user guide. // // [Use placeholder variables]: https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-placeholders.html 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:
type GuadrailAction ¶ added in v1.9.0
type GuadrailAction string
const ( GuadrailActionIntervened GuadrailAction = "INTERVENED" GuadrailActionNone GuadrailAction = "NONE" )
Enum values for GuadrailAction
func (GuadrailAction) Values ¶ added in v1.9.0
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 ¶ added in v1.11.0
type GuardrailAction string
const ( GuardrailActionIntervened GuardrailAction = "INTERVENED" GuardrailActionNone GuardrailAction = "NONE" )
Enum values for GuardrailAction
func (GuardrailAction) Values ¶ added in v1.11.0
func (GuardrailAction) Values() []GuardrailAction
Values returns all known values for GuardrailAction. Note that this can be expanded in the future, and so it is only as up to date as the client.
The ordering of this slice is not guaranteed to be stable across updates.
type GuardrailAssessment ¶ added in v1.11.0
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 ¶ added in v1.9.0
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 GuardrailConfigurationWithArn ¶ added in v1.26.0
type GuardrailConfigurationWithArn struct { // The unique identifier for the guardrail. // // This member is required. GuardrailIdentifier *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 ¶ added in v1.11.0
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 ¶ added in v1.11.0
type GuardrailContentFilterConfidence string
const ( GuardrailContentFilterConfidenceNone GuardrailContentFilterConfidence = "NONE" GuardrailContentFilterConfidenceLow GuardrailContentFilterConfidence = "LOW" GuardrailContentFilterConfidenceMedium GuardrailContentFilterConfidence = "MEDIUM" GuardrailContentFilterConfidenceHigh GuardrailContentFilterConfidence = "HIGH" )
Enum values for GuardrailContentFilterConfidence
func (GuardrailContentFilterConfidence) Values ¶ added in v1.11.0
func (GuardrailContentFilterConfidence) Values() []GuardrailContentFilterConfidence
Values returns all known values for GuardrailContentFilterConfidence. Note that this can be expanded in the future, and so it is only as up to date as the client.
The ordering of this slice is not guaranteed to be stable across updates.
type GuardrailContentFilterType ¶ added in v1.11.0
type GuardrailContentFilterType string
const ( GuardrailContentFilterTypeInsults GuardrailContentFilterType = "INSULTS" GuardrailContentFilterTypeHate GuardrailContentFilterType = "HATE" GuardrailContentFilterTypeSexual GuardrailContentFilterType = "SEXUAL" GuardrailContentFilterTypeViolence GuardrailContentFilterType = "VIOLENCE" GuardrailContentFilterTypeMisconduct GuardrailContentFilterType = "MISCONDUCT" GuardrailContentFilterTypePromptAttack GuardrailContentFilterType = "PROMPT_ATTACK" )
Enum values for GuardrailContentFilterType
func (GuardrailContentFilterType) Values ¶ added in v1.11.0
func (GuardrailContentFilterType) Values() []GuardrailContentFilterType
Values returns all known values for GuardrailContentFilterType. Note that this can be expanded in the future, and so it is only as up to date as the client.
The ordering of this slice is not guaranteed to be stable across updates.
type GuardrailContentPolicyAction ¶ added in v1.11.0
type GuardrailContentPolicyAction string
const (
GuardrailContentPolicyActionBlocked GuardrailContentPolicyAction = "BLOCKED"
)
Enum values for GuardrailContentPolicyAction
func (GuardrailContentPolicyAction) Values ¶ added in v1.11.0
func (GuardrailContentPolicyAction) Values() []GuardrailContentPolicyAction
Values returns all known values for GuardrailContentPolicyAction. Note that this can be expanded in the future, and so it is only as up to date as the client.
The ordering of this slice is not guaranteed to be stable across updates.
type GuardrailContentPolicyAssessment ¶ added in v1.11.0
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 ¶ added in v1.11.0
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 GuardrailEvent ¶ added in v1.28.0
type GuardrailEvent struct { // The guardrail action. Action GuadrailAction // contains filtered or unexported fields }
A guardrail event.
type GuardrailManagedWord ¶ added in v1.11.0
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 ¶ added in v1.11.0
type GuardrailManagedWordType string
const (
GuardrailManagedWordTypeProfanity GuardrailManagedWordType = "PROFANITY"
)
Enum values for GuardrailManagedWordType
func (GuardrailManagedWordType) Values ¶ added in v1.11.0
func (GuardrailManagedWordType) Values() []GuardrailManagedWordType
Values returns all known values for GuardrailManagedWordType. Note that this can be expanded in the future, and so it is only as up to date as the client.
The ordering of this slice is not guaranteed to be stable across updates.
type GuardrailPiiEntityFilter ¶ added in v1.11.0
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 ¶ added in v1.11.0
type GuardrailPiiEntityType string
const ( GuardrailPiiEntityTypeAddress GuardrailPiiEntityType = "ADDRESS" GuardrailPiiEntityTypeAge GuardrailPiiEntityType = "AGE" GuardrailPiiEntityTypeAwsAccessKey GuardrailPiiEntityType = "AWS_ACCESS_KEY" GuardrailPiiEntityTypeAwsSecretKey GuardrailPiiEntityType = "AWS_SECRET_KEY" GuardrailPiiEntityTypeCaHealthNumber GuardrailPiiEntityType = "CA_HEALTH_NUMBER" GuardrailPiiEntityTypeCaSocialInsuranceNumber GuardrailPiiEntityType = "CA_SOCIAL_INSURANCE_NUMBER" GuardrailPiiEntityTypeCreditDebitCardCvv GuardrailPiiEntityType = "CREDIT_DEBIT_CARD_CVV" GuardrailPiiEntityTypeCreditDebitCardExpiry GuardrailPiiEntityType = "CREDIT_DEBIT_CARD_EXPIRY" GuardrailPiiEntityTypeCreditDebitCardNumber GuardrailPiiEntityType = "CREDIT_DEBIT_CARD_NUMBER" GuardrailPiiEntityTypeDriverId GuardrailPiiEntityType = "DRIVER_ID" GuardrailPiiEntityTypeEmail GuardrailPiiEntityType = "EMAIL" GuardrailPiiEntityTypeInternationalBankAccountNumber GuardrailPiiEntityType = "INTERNATIONAL_BANK_ACCOUNT_NUMBER" GuardrailPiiEntityTypeIpAddress GuardrailPiiEntityType = "IP_ADDRESS" GuardrailPiiEntityTypeLicensePlate GuardrailPiiEntityType = "LICENSE_PLATE" GuardrailPiiEntityTypeMacAddress GuardrailPiiEntityType = "MAC_ADDRESS" GuardrailPiiEntityTypeName GuardrailPiiEntityType = "NAME" GuardrailPiiEntityTypePassword GuardrailPiiEntityType = "PASSWORD" GuardrailPiiEntityTypePhone GuardrailPiiEntityType = "PHONE" GuardrailPiiEntityTypePin GuardrailPiiEntityType = "PIN" GuardrailPiiEntityTypeSwiftCode GuardrailPiiEntityType = "SWIFT_CODE" GuardrailPiiEntityTypeUkNationalHealthServiceNumber GuardrailPiiEntityType = "UK_NATIONAL_HEALTH_SERVICE_NUMBER" GuardrailPiiEntityTypeUkNationalInsuranceNumber GuardrailPiiEntityType = "UK_NATIONAL_INSURANCE_NUMBER" GuardrailPiiEntityTypeUkUniqueTaxpayerReferenceNumber GuardrailPiiEntityType = "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER" GuardrailPiiEntityTypeUrl GuardrailPiiEntityType = "URL" GuardrailPiiEntityTypeUsername GuardrailPiiEntityType = "USERNAME" GuardrailPiiEntityTypeUsBankAccountNumber GuardrailPiiEntityType = "US_BANK_ACCOUNT_NUMBER" GuardrailPiiEntityTypeUsBankRoutingNumber GuardrailPiiEntityType = "US_BANK_ROUTING_NUMBER" GuardrailPiiEntityTypeUsIndividualTaxIdentificationNumber GuardrailPiiEntityType = "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER" GuardrailPiiEntityTypeUsPassportNumber GuardrailPiiEntityType = "US_PASSPORT_NUMBER" GuardrailPiiEntityTypeUsSocialSecurityNumber GuardrailPiiEntityType = "US_SOCIAL_SECURITY_NUMBER" GuardrailPiiEntityTypeVehicleIdentificationNumber GuardrailPiiEntityType = "VEHICLE_IDENTIFICATION_NUMBER" )
Enum values for GuardrailPiiEntityType
func (GuardrailPiiEntityType) Values ¶ added in v1.11.0
func (GuardrailPiiEntityType) Values() []GuardrailPiiEntityType
Values returns all known values for GuardrailPiiEntityType. Note that this can be expanded in the future, and so it is only as up to date as the client.
The ordering of this slice is not guaranteed to be stable across updates.
type GuardrailRegexFilter ¶ added in v1.11.0
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 ¶ added in v1.11.0
type GuardrailSensitiveInformationPolicyAction string
const ( GuardrailSensitiveInformationPolicyActionBlocked GuardrailSensitiveInformationPolicyAction = "BLOCKED" GuardrailSensitiveInformationPolicyActionAnonymized GuardrailSensitiveInformationPolicyAction = "ANONYMIZED" )
Enum values for GuardrailSensitiveInformationPolicyAction
func (GuardrailSensitiveInformationPolicyAction) Values ¶ added in v1.11.0
func (GuardrailSensitiveInformationPolicyAction) Values() []GuardrailSensitiveInformationPolicyAction
Values returns all known values for GuardrailSensitiveInformationPolicyAction. Note that this can be expanded in the future, and so it is only as up to date as the client.
The ordering of this slice is not guaranteed to be stable across updates.
type GuardrailSensitiveInformationPolicyAssessment ¶ added in v1.11.0
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 ¶ added in v1.11.0
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 ¶ added in v1.11.0
type GuardrailTopicPolicyAction string
const (
GuardrailTopicPolicyActionBlocked GuardrailTopicPolicyAction = "BLOCKED"
)
Enum values for GuardrailTopicPolicyAction
func (GuardrailTopicPolicyAction) Values ¶ added in v1.11.0
func (GuardrailTopicPolicyAction) Values() []GuardrailTopicPolicyAction
Values returns all known values for GuardrailTopicPolicyAction. Note that this can be expanded in the future, and so it is only as up to date as the client.
The ordering of this slice is not guaranteed to be stable across updates.
type GuardrailTopicPolicyAssessment ¶ added in v1.11.0
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 ¶ added in v1.11.0
type GuardrailTopicType string
const (
GuardrailTopicTypeDeny GuardrailTopicType = "DENY"
)
Enum values for GuardrailTopicType
func (GuardrailTopicType) Values ¶ added in v1.11.0
func (GuardrailTopicType) Values() []GuardrailTopicType
Values returns all known values for GuardrailTopicType. Note that this can be expanded in the future, and so it is only as up to date as the client.
The ordering of this slice is not guaranteed to be stable across updates.
type GuardrailTrace ¶ added in v1.11.0
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 ¶ added in v1.11.0
type GuardrailWordPolicyAction string
const (
GuardrailWordPolicyActionBlocked GuardrailWordPolicyAction = "BLOCKED"
)
Enum values for GuardrailWordPolicyAction
func (GuardrailWordPolicyAction) Values ¶ added in v1.11.0
func (GuardrailWordPolicyAction) Values() []GuardrailWordPolicyAction
Values returns all known values for GuardrailWordPolicyAction. Note that this can be expanded in the future, and so it is only as up to date as the client.
The ordering of this slice is not guaranteed to be stable across updates.
type GuardrailWordPolicyAssessment ¶ added in v1.11.0
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 ImplicitFilterConfiguration ¶ added in v1.28.0
type ImplicitFilterConfiguration struct { // Metadata that can be used in a filter. // // This member is required. MetadataAttributes []MetadataAttributeSchema // The model that generates the filter. // // This member is required. ModelArn *string // contains filtered or unexported fields }
Settings for implicit filtering, where a model generates a metadata filter based on the prompt.
type InferenceConfig ¶ added in v1.9.0
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 0.8, 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 InlineAgentFilePart ¶ added in v1.26.0
type InlineAgentFilePart struct { // Files containing intermediate response for the user. Files []OutputFile // contains filtered or unexported fields }
Contains intermediate response for code interpreter if any files have been generated.
type InlineAgentPayloadPart ¶ added in v1.26.0
type InlineAgentPayloadPart 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 InlineAgentResponseStream ¶ added in v1.26.0
type InlineAgentResponseStream interface {
// contains filtered or unexported methods
}
The response from invoking the agent and associated citations and trace information.
The following types satisfy this interface:
InlineAgentResponseStreamMemberChunk InlineAgentResponseStreamMemberFiles InlineAgentResponseStreamMemberReturnControl InlineAgentResponseStreamMemberTrace
Example (OutputUsage) ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/bedrockagentruntime/types" ) func main() { var union types.InlineAgentResponseStream // type switches can be used to check the union value switch v := union.(type) { case *types.InlineAgentResponseStreamMemberChunk: _ = v.Value // Value is types.InlineAgentPayloadPart case *types.InlineAgentResponseStreamMemberFiles: _ = v.Value // Value is types.InlineAgentFilePart case *types.InlineAgentResponseStreamMemberReturnControl: _ = v.Value // Value is types.InlineAgentReturnControlPayload case *types.InlineAgentResponseStreamMemberTrace: _ = v.Value // Value is types.InlineAgentTracePart case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) default: fmt.Println("union is nil or unknown type") } }
Output:
type InlineAgentResponseStreamMemberChunk ¶ added in v1.26.0
type InlineAgentResponseStreamMemberChunk struct { Value InlineAgentPayloadPart // contains filtered or unexported fields }
Contains a part of an agent response and citations for it.
type InlineAgentResponseStreamMemberFiles ¶ added in v1.26.0
type InlineAgentResponseStreamMemberFiles struct { Value InlineAgentFilePart // contains filtered or unexported fields }
Contains intermediate response for code interpreter if any files have been generated.
type InlineAgentResponseStreamMemberReturnControl ¶ added in v1.26.0
type InlineAgentResponseStreamMemberReturnControl struct { Value InlineAgentReturnControlPayload // 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 InlineAgentResponseStreamMemberTrace ¶ added in v1.26.0
type InlineAgentResponseStreamMemberTrace struct { Value InlineAgentTracePart // 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 InlineAgentReturnControlPayload ¶ added in v1.26.0
type InlineAgentReturnControlPayload 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 InvokeAgent response API operation.
type InlineAgentTracePart ¶ added in v1.26.0
type InlineAgentTracePart struct { // 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 InlineBedrockModelConfigurations ¶ added in v1.31.0
type InlineBedrockModelConfigurations struct { // The latency configuration for the model. PerformanceConfig *PerformanceConfiguration // contains filtered or unexported fields }
Settings for a model called with InvokeInlineAgent.
type InlineSessionState ¶ added in v1.26.0
type InlineSessionState struct { // Contains information about the files used by code interpreter. Files []InputFile // The identifier of the invocation of an action. This value must match the // invocationId returned in the InvokeInlineAgent response for the action whose // results are provided in the returnControlInvocationResults field. For more // information, see [Return control to the agent developer]. // // [Return control to the agent developer]: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-returncontrol.html InvocationId *string // Contains attributes that persist across a session and the values of those // attributes. PromptSessionAttributes map[string]string // Contains information about the results from the action group invocation. For // more information, see [Return control to the agent developer]. // // If you include this field in the sessionState field, the inputText field will // be ignored. // // [Return control to the agent developer]: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-returncontrol.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 InvokeInlineAgent request. Use session state attributes to control and provide conversational context for your inline agent and to help customize your agent's behavior. For more information, see Control session context
type InputFile ¶ added in v1.14.0
type InputFile struct { // The name of the source file. // // This member is required. Name *string // Specifies where the files are located. // // This member is required. Source *FileSource // Specifies how the source files will be used by the code interpreter. // // This member is required. UseCase FileUseCase // contains filtered or unexported fields }
Contains details of the source files.
type InputPrompt ¶ added in v1.25.0
type InputPrompt interface {
// contains filtered or unexported methods
}
Contains information about the prompt to optimize.
The following types satisfy this interface:
InputPromptMemberTextPrompt
Example (OutputUsage) ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/bedrockagentruntime/types" ) func main() { var union types.InputPrompt // type switches can be used to check the union value switch v := union.(type) { case *types.InputPromptMemberTextPrompt: _ = v.Value // Value is types.TextPrompt case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) default: fmt.Println("union is nil or unknown type") } }
Output:
type InputPromptMemberTextPrompt ¶ added in v1.25.0
type InputPromptMemberTextPrompt struct { Value TextPrompt // contains filtered or unexported fields }
Contains information about the text prompt to optimize.
type InputQueryType ¶ added in v1.30.0
type InputQueryType string
const (
InputQueryTypeText InputQueryType = "TEXT"
)
Enum values for InputQueryType
func (InputQueryType) Values ¶ added in v1.30.0
func (InputQueryType) Values() []InputQueryType
Values returns all known values for InputQueryType. 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 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 // The collaborator's invocation input. AgentCollaboratorInvocationInput *AgentCollaboratorInvocationInput // Contains information about the code interpreter to be invoked. CodeInterpreterInvocationInput *CodeInterpreterInvocationInput // 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 ¶ added in v1.7.0
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:
- In the returnControl field of the InvokeAgent response
The following types satisfy this interface:
InvocationInputMemberMemberApiInvocationInput InvocationInputMemberMemberFunctionInvocationInput
Example (OutputUsage) ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/bedrockagentruntime/types" ) 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") } }
Output:
type InvocationInputMemberMemberApiInvocationInput ¶ added in v1.7.0
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 ¶ added in v1.7.0
type InvocationInputMemberMemberFunctionInvocationInput struct { Value FunctionInvocationInput // contains filtered or unexported fields }
Contains information about the function that the agent predicts should be called.
type InvocationResultMember ¶ added in v1.7.0
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:
The following types satisfy this interface:
InvocationResultMemberMemberApiResult InvocationResultMemberMemberFunctionResult
Example (OutputUsage) ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/bedrockagentruntime/types" ) 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") } }
Output:
type InvocationResultMemberMemberApiResult ¶ added in v1.7.0
type InvocationResultMemberMemberApiResult struct { Value ApiResult // contains filtered or unexported fields }
The result from the API response from the action group invocation.
type InvocationResultMemberMemberFunctionResult ¶ added in v1.7.0
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" InvocationTypeActionGroupCodeInterpreter InvocationType = "ACTION_GROUP_CODE_INTERPRETER" InvocationTypeAgentCollaborator InvocationType = "AGENT_COLLABORATOR" )
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 KnowledgeBase ¶ added in v1.26.0
type KnowledgeBase struct { // The description of the knowledge base associated with the inline agent. // // This member is required. Description *string // The unique identifier for a knowledge base associated with the inline agent. // // This member is required. KnowledgeBaseId *string // The configurations to apply to the knowledge base during query. For more // information, see [Query configurations]. // // [Query configurations]: https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html RetrievalConfiguration *KnowledgeBaseRetrievalConfiguration // contains filtered or unexported fields }
Details of the knowledge base associated withe inline agent.
type KnowledgeBaseConfiguration ¶ added in v1.14.0
type KnowledgeBaseConfiguration struct { // The unique identifier for a knowledge base attached to the agent. // // This member is required. KnowledgeBaseId *string // The configurations to apply to the knowledge base during query. For more // information, see [Query configurations]. // // [Query configurations]: https://docs.aws.amazon.com/bedrock/latest/userguide/kb-test-config.html // // This member is required. RetrievalConfiguration *KnowledgeBaseRetrievalConfiguration // contains filtered or unexported fields }
Configurations to apply to a knowledge base attached to the agent during query. For more information, see Knowledge base retrieval configurations.
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:
- – 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 knowledge base query. For more information, see Query configurations.
This data type is used in the following API operations:
- – in the retrievalConfiguration field
- – in the retrievalConfiguration field
type KnowledgeBaseRetrievalResult ¶
type KnowledgeBaseRetrievalResult struct { // Contains information about the content of the chunk. // // 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:
- – in the retrievalResults field
type KnowledgeBaseRetrieveAndGenerateConfiguration ¶
type KnowledgeBaseRetrieveAndGenerateConfiguration struct { // The unique identifier of the knowledge base that is queried. // // This member is required. KnowledgeBaseId *string // The ARN of the foundation model or [inference profile] used to generate a response. // // [inference profile]: https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference.html // // This member is required. ModelArn *string // Contains configurations for response generation based on the knowledge base // query results. GenerationConfiguration *GenerationConfiguration // Settings for how the model processes the prompt prior to retrieval and // generation. OrchestrationConfiguration *OrchestrationConfiguration // 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:
- – in the knowledgeBaseConfiguration field
- – 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 // Settings for implicit filtering. ImplicitFilterConfiguration *ImplicitFilterConfiguration // 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 configurations for reranking the retrieved results. For more // information, see [Improve the relevance of query responses with a reranker model]. // // [Improve the relevance of query responses with a reranker model]: https://docs.aws.amazon.com/bedrock/latest/userguide/rerank.html RerankingConfiguration *VectorSearchRerankingConfiguration // 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:
- – in the vectorSearchConfiguration field
- – in the vectorSearchConfiguration field
type Memory ¶ added in v1.14.0
type Memory interface {
// contains filtered or unexported methods
}
Contains sessions summaries.
The following types satisfy this interface:
MemoryMemberSessionSummary
Example (OutputUsage) ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/bedrockagentruntime/types" ) func main() { var union types.Memory // type switches can be used to check the union value switch v := union.(type) { case *types.MemoryMemberSessionSummary: _ = v.Value // Value is types.MemorySessionSummary case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) default: fmt.Println("union is nil or unknown type") } }
Output:
type MemoryMemberSessionSummary ¶ added in v1.14.0
type MemoryMemberSessionSummary struct { Value MemorySessionSummary // contains filtered or unexported fields }
Contains summary of a session.
type MemorySessionSummary ¶ added in v1.14.0
type MemorySessionSummary struct { // The unique identifier of the memory where the session summary is stored. MemoryId *string // The time when the memory duration for the session is set to end. SessionExpiryTime *time.Time // The identifier for this session. SessionId *string // The start time for this session. SessionStartTime *time.Time // The summarized text for this session. SummaryText *string // contains filtered or unexported fields }
Contains details of a session summary.
type MemoryType ¶ added in v1.14.0
type MemoryType string
const (
MemoryTypeSessionSummary MemoryType = "SESSION_SUMMARY"
)
Enum values for MemoryType
func (MemoryType) Values ¶ added in v1.14.0
func (MemoryType) Values() []MemoryType
Values returns all known values for MemoryType. 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 Message ¶ added in v1.29.0
type Message struct { // The message's content. // // This member is required. Content []ContentBlock // The message's role. // // This member is required. Role ConversationRole // contains filtered or unexported fields }
Details about a message.
type Metadata ¶ added in v1.16.0
type Metadata struct { // Contains details of the foundation model usage. Usage *Usage // contains filtered or unexported fields }
Provides details of the foundation model.
type MetadataAttributeSchema ¶ added in v1.28.0
type MetadataAttributeSchema struct { // The attribute's description. // // This member is required. Description *string // The attribute's key. // // This member is required. Key *string // The attribute's type. // // This member is required. Type AttributeType // contains filtered or unexported fields }
Details about a metadata attribute.
type MetadataConfigurationForReranking ¶ added in v1.28.0
type MetadataConfigurationForReranking struct { // Specifies whether to consider all metadata when reranking, or only the metadata // that you select. If you specify SELECTIVE , include the // selectiveModeConfiguration field. // // This member is required. SelectionMode RerankingMetadataSelectionMode // Contains configurations for the metadata fields to include or exclude when // considering reranking. SelectiveModeConfiguration RerankingMetadataSelectiveModeConfiguration // contains filtered or unexported fields }
Contains configurations for the metadata to use in reranking.
type ModelInvocationInput ¶
type ModelInvocationInput struct { // The identifier of a foundation model. FoundationModel *string // 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 ModelNotReadyException ¶ added in v1.31.0
type ModelNotReadyException struct { Message *string ErrorCodeOverride *string // contains filtered or unexported fields }
The model specified in the request is not ready to serve inference requests.
The AWS SDK will automatically retry the operation up to 5 times. For information about configuring automatic retries, see Retry behaviorin the AWS SDKs and Tools reference guide.
func (*ModelNotReadyException) Error ¶ added in v1.31.0
func (e *ModelNotReadyException) Error() string
func (*ModelNotReadyException) ErrorCode ¶ added in v1.31.0
func (e *ModelNotReadyException) ErrorCode() string
func (*ModelNotReadyException) ErrorFault ¶ added in v1.31.0
func (e *ModelNotReadyException) ErrorFault() smithy.ErrorFault
func (*ModelNotReadyException) ErrorMessage ¶ added in v1.31.0
func (e *ModelNotReadyException) ErrorMessage() string
type ModelPerformanceConfiguration ¶ added in v1.31.0
type ModelPerformanceConfiguration struct { // The latency configuration for the model. PerformanceConfig *PerformanceConfiguration // contains filtered or unexported fields }
The performance configuration for a model called with InvokeFlow.
type NodeType ¶ added in v1.14.0
type NodeType string
const ( NodeTypeFlowInputNode NodeType = "FlowInputNode" NodeTypeFlowOutputNode NodeType = "FlowOutputNode" NodeTypeLambdaFunctionNode NodeType = "LambdaFunctionNode" NodeTypeKnowledgeBaseNode NodeType = "KnowledgeBaseNode" NodeTypePromptNode NodeType = "PromptNode" NodeTypeConditionNode NodeType = "ConditionNode" NodeTypeLexNode NodeType = "LexNode" )
Enum values for NodeType
type Observation ¶
type Observation struct { // Contains the JSON-formatted string returned by the API invoked by the action // group. ActionGroupInvocationOutput *ActionGroupInvocationOutput // A collaborator's invocation output. AgentCollaboratorInvocationOutput *AgentCollaboratorInvocationOutput // Contains the JSON-formatted string returned by the API invoked by the code // interpreter. CodeInterpreterInvocationOutput *CodeInterpreterInvocationOutput // 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 OptimizedPrompt ¶ added in v1.25.0
type OptimizedPrompt interface {
// contains filtered or unexported methods
}
Contains information about the optimized prompt.
The following types satisfy this interface:
OptimizedPromptMemberTextPrompt
Example (OutputUsage) ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/bedrockagentruntime/types" ) func main() { var union types.OptimizedPrompt // type switches can be used to check the union value switch v := union.(type) { case *types.OptimizedPromptMemberTextPrompt: _ = v.Value // Value is types.TextPrompt case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) default: fmt.Println("union is nil or unknown type") } }
Output:
type OptimizedPromptEvent ¶ added in v1.25.0
type OptimizedPromptEvent struct { // Contains information about the optimized prompt. OptimizedPrompt OptimizedPrompt // contains filtered or unexported fields }
An event in which the prompt was optimized.
type OptimizedPromptMemberTextPrompt ¶ added in v1.25.0
type OptimizedPromptMemberTextPrompt struct { Value TextPrompt // contains filtered or unexported fields }
Contains information about the text in the prompt that was optimized.
type OptimizedPromptStream ¶ added in v1.25.0
type OptimizedPromptStream interface {
// contains filtered or unexported methods
}
The stream containing events in the prompt optimization process.
The following types satisfy this interface:
OptimizedPromptStreamMemberAnalyzePromptEvent OptimizedPromptStreamMemberOptimizedPromptEvent
Example (OutputUsage) ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/bedrockagentruntime/types" ) func main() { var union types.OptimizedPromptStream // type switches can be used to check the union value switch v := union.(type) { case *types.OptimizedPromptStreamMemberAnalyzePromptEvent: _ = v.Value // Value is types.AnalyzePromptEvent case *types.OptimizedPromptStreamMemberOptimizedPromptEvent: _ = v.Value // Value is types.OptimizedPromptEvent case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) default: fmt.Println("union is nil or unknown type") } }
Output:
type OptimizedPromptStreamMemberAnalyzePromptEvent ¶ added in v1.25.0
type OptimizedPromptStreamMemberAnalyzePromptEvent struct { Value AnalyzePromptEvent // contains filtered or unexported fields }
An event in which the prompt was analyzed in preparation for optimization.
type OptimizedPromptStreamMemberOptimizedPromptEvent ¶ added in v1.25.0
type OptimizedPromptStreamMemberOptimizedPromptEvent struct { Value OptimizedPromptEvent // contains filtered or unexported fields }
An event in which the prompt was optimized.
type OrchestrationConfiguration ¶ added in v1.14.0
type OrchestrationConfiguration 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 // Configuration settings for inference when using RetrieveAndGenerate to // generate responses while using a knowledge base as a source. InferenceConfig *InferenceConfig // The latency configuration for the model. PerformanceConfig *PerformanceConfiguration // Contains the template for the prompt that's sent to the model. Orchestration // prompts must include the $conversation_history$ and // $output_format_instructions$ variables. For more information, see [Use placeholder variables] in the user // guide. // // [Use placeholder variables]: https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-placeholders.html PromptTemplate *PromptTemplate // To split up the prompt and retrieve multiple sources, set the transformation // type to QUERY_DECOMPOSITION . QueryTransformationConfiguration *QueryTransformationConfiguration // contains filtered or unexported fields }
Settings for how the model processes the prompt prior to retrieval and generation.
type OrchestrationModelInvocationOutput ¶ added in v1.16.0
type OrchestrationModelInvocationOutput struct { // Contains information about the foundation model output from the orchestration // step. Metadata *Metadata // Contains details of the raw response from the foundation model output. RawResponse *RawResponse // The unique identifier of the trace. TraceId *string // contains filtered or unexported fields }
The foundation model output from the orchestration step.
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 OrchestrationTraceMemberModelInvocationOutput OrchestrationTraceMemberObservation OrchestrationTraceMemberRationale
Example (OutputUsage) ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/bedrockagentruntime/types" ) 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.OrchestrationTraceMemberModelInvocationOutput: _ = v.Value // Value is types.OrchestrationModelInvocationOutput 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") } }
Output:
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 OrchestrationTraceMemberModelInvocationOutput ¶ added in v1.16.0
type OrchestrationTraceMemberModelInvocationOutput struct { Value OrchestrationModelInvocationOutput // contains filtered or unexported fields }
Contains information pertaining to the output from the foundation model that is being invoked.
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 OutputFile ¶ added in v1.14.0
type OutputFile struct { // The byte count of files that contains response from code interpreter. Bytes []byte // The name of the file containing response from code interpreter. Name *string // The type of file that contains response from the code interpreter. Type *string // contains filtered or unexported fields }
Contains details of the response from code interpreter.
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 ParameterDetail ¶ added in v1.26.0
type ParameterDetail struct { // The data type of the parameter. // // This member is required. Type ParameterType // A description of the parameter. Helps the foundation model determine how to // elicit the parameters from the user. Description *string // Whether the parameter is required for the agent to complete the function for // action group invocation. Required *bool // contains filtered or unexported fields }
Contains details about a parameter in a function for an action group.
type ParameterType ¶ added in v1.26.0
type ParameterType string
const ( ParameterTypeString ParameterType = "string" ParameterTypeNumber ParameterType = "number" ParameterTypeInteger ParameterType = "integer" ParameterTypeBoolean ParameterType = "boolean" ParameterTypeArray ParameterType = "array" )
Enum values for ParameterType
func (ParameterType) Values ¶ added in v1.26.0
func (ParameterType) Values() []ParameterType
Values returns all known values for ParameterType. 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 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 PayloadType ¶ added in v1.29.0
type PayloadType string
const ( PayloadTypeText PayloadType = "TEXT" PayloadTypeReturnControl PayloadType = "RETURN_CONTROL" )
Enum values for PayloadType
func (PayloadType) Values ¶ added in v1.29.0
func (PayloadType) Values() []PayloadType
Values returns all known values for PayloadType. 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 PerformanceConfigLatency ¶ added in v1.31.0
type PerformanceConfigLatency string
const ( PerformanceConfigLatencyStandard PerformanceConfigLatency = "standard" PerformanceConfigLatencyOptimized PerformanceConfigLatency = "optimized" )
Enum values for PerformanceConfigLatency
func (PerformanceConfigLatency) Values ¶ added in v1.31.0
func (PerformanceConfigLatency) Values() []PerformanceConfigLatency
Values returns all known values for PerformanceConfigLatency. Note that this can be expanded in the future, and so it is only as up to date as the client.
The ordering of this slice is not guaranteed to be stable across updates.
type PerformanceConfiguration ¶ added in v1.31.0
type PerformanceConfiguration struct { // To use a latency-optimized version of the model, set to optimized . Latency PerformanceConfigLatency // contains filtered or unexported fields }
Performance settings for a model.
type PostProcessingModelInvocationOutput ¶
type PostProcessingModelInvocationOutput struct { // Contains information about the foundation model output from the // post-processing step. Metadata *Metadata // Details about the response from the Lambda parsing of the output of the // post-processing step. ParsedResponse *PostProcessingParsedResponse // Details of the raw response from the foundation model output. RawResponse *RawResponse // 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 ( "fmt" "github.com/aws/aws-sdk-go-v2/service/bedrockagentruntime/types" ) 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") } }
Output:
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 { // Contains information about the foundation model output from the pre-processing // step. Metadata *Metadata // Details about the response from the Lambda parsing of the output of the // pre-processing step. ParsedResponse *PreProcessingParsedResponse // Details of the raw response from the foundation model output. RawResponse *RawResponse // 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 ( "fmt" "github.com/aws/aws-sdk-go-v2/service/bedrockagentruntime/types" ) 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") } }
Output:
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 PromptConfiguration ¶ added in v1.26.0
type PromptConfiguration struct { // Defines the prompt template with which to replace the default prompt template. // You can use placeholder variables in the base prompt template to customize the // prompt. For more information, see [Prompt template placeholder variables]. For more information, see [Configure the prompt templates]. // // [Configure the prompt templates]: https://docs.aws.amazon.com/bedrock/latest/userguide/advanced-prompts-configure.html // [Prompt template placeholder variables]: https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-placeholders.html BasePromptTemplate *string // Contains inference parameters to use when the agent invokes a foundation model // in the part of the agent sequence defined by the promptType . 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 InferenceConfiguration *InferenceConfiguration // 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 . If you set the field as OVERRIDEN , the overrideLambda field in // the [PromptOverrideConfiguration]must be specified with the ARN of a Lambda function. // // [PromptOverrideConfiguration]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_PromptOverrideConfiguration.html ParserMode CreationMode // Specifies whether to override the default prompt template for this promptType . // Set this value to OVERRIDDEN to use the prompt that you provide in the // basePromptTemplate . If you leave it as DEFAULT , the agent uses a default // prompt template. PromptCreationMode CreationMode // Specifies whether to allow the inline agent to carry out the step specified in // the promptType . If you set this value to DISABLED , the agent skips that step. // The default state for each promptType is as follows. // // - PRE_PROCESSING – ENABLED // // - ORCHESTRATION – ENABLED // // - KNOWLEDGE_BASE_RESPONSE_GENERATION – ENABLED // // - POST_PROCESSING – DISABLED PromptState PromptState // The step in the agent sequence that this prompt configuration applies to. PromptType PromptType // contains filtered or unexported fields }
Contains configurations to override a prompt template in one part of an agent
sequence. For more information, see Advanced prompts.
type PromptOverrideConfiguration ¶ added in v1.26.0
type PromptOverrideConfiguration struct { // Contains configurations to override a prompt template in one part of an agent // sequence. For more information, see [Advanced prompts]. // // [Advanced prompts]: https://docs.aws.amazon.com/bedrock/latest/userguide/advanced-prompts.html // // This member is required. PromptConfigurations []PromptConfiguration // The ARN of the Lambda function to use when parsing the raw foundation model // output in parts of the agent sequence. If you specify this field, at least one // of the promptConfigurations must contain a parserMode value that is set to // OVERRIDDEN . For more information, see [Parser Lambda function in Amazon Bedrock Agents]. // // [Parser Lambda function in Amazon Bedrock Agents]: https://docs.aws.amazon.com/bedrock/latest/userguide/lambda-parser.html OverrideLambda *string // contains filtered or unexported fields }
Contains configurations to override prompts in different parts of an agent sequence. For more information, see Advanced prompts.
type PromptState ¶ added in v1.26.0
type PromptState string
const ( PromptStateEnabled PromptState = "ENABLED" PromptStateDisabled PromptState = "DISABLED" )
Enum values for PromptState
func (PromptState) Values ¶ added in v1.26.0
func (PromptState) Values() []PromptState
Values returns all known values for PromptState. 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 PromptTemplate ¶ added in v1.5.0
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:
- – 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" PromptTypeRoutingClassifier PromptType = "ROUTING_CLASSIFIER" )
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 ¶ added in v1.7.0
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 QueryGenerationInput ¶ added in v1.30.0
type QueryGenerationInput struct { // The text of the query. // // This member is required. Text *string // The type of the query. // // This member is required. Type InputQueryType // contains filtered or unexported fields }
Contains information about a natural language query to transform into SQL.
type QueryTransformationConfiguration ¶ added in v1.14.0
type QueryTransformationConfiguration struct { // The type of transformation to apply to the prompt. // // This member is required. Type QueryTransformationType // contains filtered or unexported fields }
To split up the prompt and retrieve multiple sources, set the transformation type to QUERY_DECOMPOSITION .
type QueryTransformationMode ¶ added in v1.30.0
type QueryTransformationMode string
const (
QueryTransformationModeTextToSql QueryTransformationMode = "TEXT_TO_SQL"
)
Enum values for QueryTransformationMode
func (QueryTransformationMode) Values ¶ added in v1.30.0
func (QueryTransformationMode) Values() []QueryTransformationMode
Values returns all known values for QueryTransformationMode. 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 QueryTransformationType ¶ added in v1.14.0
type QueryTransformationType string
const (
QueryTransformationTypeQueryDecomposition QueryTransformationType = "QUERY_DECOMPOSITION"
)
Enum values for QueryTransformationType
func (QueryTransformationType) Values ¶ added in v1.14.0
func (QueryTransformationType) Values() []QueryTransformationType
Values returns all known values for QueryTransformationType. 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 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 RawResponse ¶ added in v1.16.0
type RawResponse struct { // The foundation model's raw output content. Content *string // contains filtered or unexported fields }
Contains the raw output from the foundation model.
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 RequireConfirmation ¶ added in v1.26.0
type RequireConfirmation string
const ( RequireConfirmationEnabled RequireConfirmation = "ENABLED" RequireConfirmationDisabled RequireConfirmation = "DISABLED" )
Enum values for RequireConfirmation
func (RequireConfirmation) Values ¶ added in v1.26.0
func (RequireConfirmation) Values() []RequireConfirmation
Values returns all known values for RequireConfirmation. 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 RerankDocument ¶ added in v1.28.0
type RerankDocument struct { // The type of document to rerank. // // This member is required. Type RerankDocumentType // Contains a JSON document to rerank. JsonDocument document.Interface // Contains information about a text document to rerank. TextDocument *RerankTextDocument // contains filtered or unexported fields }
Contains information about a document to rerank. Choose the type to define and include the field that corresponds to the type.
type RerankDocumentType ¶ added in v1.28.0
type RerankDocumentType string
const ( RerankDocumentTypeText RerankDocumentType = "TEXT" RerankDocumentTypeJson RerankDocumentType = "JSON" )
Enum values for RerankDocumentType
func (RerankDocumentType) Values ¶ added in v1.28.0
func (RerankDocumentType) Values() []RerankDocumentType
Values returns all known values for RerankDocumentType. 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 RerankQuery ¶ added in v1.28.0
type RerankQuery struct { // Contains information about a text query. // // This member is required. TextQuery *RerankTextDocument // The type of the query. // // This member is required. Type RerankQueryContentType // contains filtered or unexported fields }
Contains information about a query to submit to the reranker model.
type RerankQueryContentType ¶ added in v1.28.0
type RerankQueryContentType string
const (
RerankQueryContentTypeText RerankQueryContentType = "TEXT"
)
Enum values for RerankQueryContentType
func (RerankQueryContentType) Values ¶ added in v1.28.0
func (RerankQueryContentType) Values() []RerankQueryContentType
Values returns all known values for RerankQueryContentType. 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 RerankResult ¶ added in v1.28.0
type RerankResult struct { // The ranking of the document. The lower a number, the higher the document is // ranked. // // This member is required. Index *int32 // The relevance score of the document. // // This member is required. RelevanceScore *float32 // Contains information about the document. Document *RerankDocument // contains filtered or unexported fields }
Contains information about a document that was reranked.
type RerankSource ¶ added in v1.28.0
type RerankSource struct { // Contains an inline definition of a source for reranking. // // This member is required. InlineDocumentSource *RerankDocument // The type of the source. // // This member is required. Type RerankSourceType // contains filtered or unexported fields }
Contains information about a source for reranking.
type RerankSourceType ¶ added in v1.28.0
type RerankSourceType string
const (
RerankSourceTypeInline RerankSourceType = "INLINE"
)
Enum values for RerankSourceType
func (RerankSourceType) Values ¶ added in v1.28.0
func (RerankSourceType) Values() []RerankSourceType
Values returns all known values for RerankSourceType. 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 RerankTextDocument ¶ added in v1.28.0
type RerankTextDocument struct { // The text of the document. Text *string // contains filtered or unexported fields }
Contains information about a text document to rerank.
type RerankingConfiguration ¶ added in v1.28.0
type RerankingConfiguration struct { // Contains configurations for an Amazon Bedrock reranker. // // This member is required. BedrockRerankingConfiguration *BedrockRerankingConfiguration // The type of reranker that the configurations apply to. // // This member is required. Type RerankingConfigurationType // contains filtered or unexported fields }
Contains configurations for reranking.
type RerankingConfigurationType ¶ added in v1.28.0
type RerankingConfigurationType string
const (
RerankingConfigurationTypeBedrockRerankingModel RerankingConfigurationType = "BEDROCK_RERANKING_MODEL"
)
Enum values for RerankingConfigurationType
func (RerankingConfigurationType) Values ¶ added in v1.28.0
func (RerankingConfigurationType) Values() []RerankingConfigurationType
Values returns all known values for RerankingConfigurationType. 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 RerankingMetadataSelectionMode ¶ added in v1.28.0
type RerankingMetadataSelectionMode string
const ( RerankingMetadataSelectionModeSelective RerankingMetadataSelectionMode = "SELECTIVE" RerankingMetadataSelectionModeAll RerankingMetadataSelectionMode = "ALL" )
Enum values for RerankingMetadataSelectionMode
func (RerankingMetadataSelectionMode) Values ¶ added in v1.28.0
func (RerankingMetadataSelectionMode) Values() []RerankingMetadataSelectionMode
Values returns all known values for RerankingMetadataSelectionMode. 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 RerankingMetadataSelectiveModeConfiguration ¶ added in v1.28.0
type RerankingMetadataSelectiveModeConfiguration interface {
// contains filtered or unexported methods
}
Contains configurations for the metadata fields to include or exclude when considering reranking. If you include the fieldsToExclude field, the reranker ignores all the metadata fields that you specify. If you include the fieldsToInclude field, the reranker uses only the metadata fields that you specify and ignores all others. You can include only one of these fields.
The following types satisfy this interface:
RerankingMetadataSelectiveModeConfigurationMemberFieldsToExclude RerankingMetadataSelectiveModeConfigurationMemberFieldsToInclude
Example (OutputUsage) ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/bedrockagentruntime/types" ) func main() { var union types.RerankingMetadataSelectiveModeConfiguration // type switches can be used to check the union value switch v := union.(type) { case *types.RerankingMetadataSelectiveModeConfigurationMemberFieldsToExclude: _ = v.Value // Value is []types.FieldForReranking case *types.RerankingMetadataSelectiveModeConfigurationMemberFieldsToInclude: _ = v.Value // Value is []types.FieldForReranking case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) default: fmt.Println("union is nil or unknown type") } }
Output:
type RerankingMetadataSelectiveModeConfigurationMemberFieldsToExclude ¶ added in v1.28.0
type RerankingMetadataSelectiveModeConfigurationMemberFieldsToExclude struct { Value []FieldForReranking // contains filtered or unexported fields }
An array of objects, each of which specifies a metadata field to exclude from consideration when reranking.
type RerankingMetadataSelectiveModeConfigurationMemberFieldsToInclude ¶ added in v1.28.0
type RerankingMetadataSelectiveModeConfigurationMemberFieldsToInclude struct { Value []FieldForReranking // contains filtered or unexported fields }
An array of objects, each of which specifies a metadata field to include in consideration when reranking. The remaining metadata fields are ignored.
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 (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault
func (*ResourceNotFoundException) ErrorMessage ¶
func (e *ResourceNotFoundException) ErrorMessage() string
type ResponseState ¶ added in v1.7.0
type ResponseState string
const ( ResponseStateFailure ResponseState = "FAILURE" ResponseStateReprompt ResponseState = "REPROMPT" )
Enum values for ResponseState
func (ResponseState) Values ¶ added in v1.7.0
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 ResponseStreamMemberFiles ResponseStreamMemberReturnControl ResponseStreamMemberTrace
Example (OutputUsage) ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/bedrockagentruntime/types" ) func main() { var union types.ResponseStream // type switches can be used to check the union value switch v := union.(type) { case *types.ResponseStreamMemberChunk: _ = v.Value // Value is types.PayloadPart case *types.ResponseStreamMemberFiles: _ = v.Value // Value is types.FilePart 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") } }
Output:
type ResponseStreamMemberChunk ¶
type ResponseStreamMemberChunk struct { Value PayloadPart // contains filtered or unexported fields }
Contains a part of an agent response and citations for it.
type ResponseStreamMemberFiles ¶ added in v1.14.0
type ResponseStreamMemberFiles struct { Value FilePart // contains filtered or unexported fields }
Contains intermediate response for code interpreter if any files have been generated.
type ResponseStreamMemberReturnControl ¶ added in v1.7.0
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 ¶ added in v1.6.0
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:
- – in the filter field
- – 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 ( "fmt" "github.com/aws/aws-sdk-go-v2/service/bedrockagentruntime/types" ) 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") } }
Output:
type RetrievalFilterMemberAndAll ¶ added in v1.6.0
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 ¶ added in v1.6.0
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 ¶ added in v1.6.0
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 ¶ added in v1.6.0
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 ¶ added in v1.6.0
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 ¶ added in v1.6.0
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 ¶ added in v1.6.0
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 ¶ added in v1.10.0
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 ¶ added in v1.6.0
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 ¶ added in v1.6.0
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 ¶ added in v1.6.0
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 ¶ added in v1.6.0
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 ¶ added in v1.10.0
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 RetrievalResultConfluenceLocation ¶ added in v1.14.0
type RetrievalResultConfluenceLocation struct { // The Confluence host URL for the data source location. Url *string // contains filtered or unexported fields }
The Confluence data source location.
type RetrievalResultContent ¶
type RetrievalResultContent struct { // A data URI with base64-encoded content from the data source. The URI is in the // following format: returned in the following format: // data:image/jpeg;base64,${base64-encoded string} . ByteContent *string // Specifies information about the rows with the cells to return in retrieval. Row []RetrievalResultContentColumn // The cited text from the data source. Text *string // The type of content in the retrieval result. Type RetrievalResultContentType // contains filtered or unexported fields }
Contains information about a chunk of text from a data source in the knowledge base. If the result is from a structured data source, the cell in the database and the type of the value is also identified.
This data type is used in the following API operations:
- – in the content field
- – in the content field
- – in the content field
type RetrievalResultContentColumn ¶ added in v1.30.0
type RetrievalResultContentColumn struct { // The name of the column. ColumnName *string // The value in the column. ColumnValue *string // The data type of the value. Type RetrievalResultContentColumnType // contains filtered or unexported fields }
Contains information about a column with a cell to return in retrieval.
type RetrievalResultContentColumnType ¶ added in v1.30.0
type RetrievalResultContentColumnType string
const ( RetrievalResultContentColumnTypeBlob RetrievalResultContentColumnType = "BLOB" RetrievalResultContentColumnTypeBoolean RetrievalResultContentColumnType = "BOOLEAN" RetrievalResultContentColumnTypeDouble RetrievalResultContentColumnType = "DOUBLE" RetrievalResultContentColumnTypeNull RetrievalResultContentColumnType = "NULL" RetrievalResultContentColumnTypeLong RetrievalResultContentColumnType = "LONG" RetrievalResultContentColumnTypeString RetrievalResultContentColumnType = "STRING" )
Enum values for RetrievalResultContentColumnType
func (RetrievalResultContentColumnType) Values ¶ added in v1.30.0
func (RetrievalResultContentColumnType) Values() []RetrievalResultContentColumnType
Values returns all known values for RetrievalResultContentColumnType. 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 RetrievalResultContentType ¶ added in v1.30.0
type RetrievalResultContentType string
const ( RetrievalResultContentTypeText RetrievalResultContentType = "TEXT" RetrievalResultContentTypeImage RetrievalResultContentType = "IMAGE" RetrievalResultContentTypeRow RetrievalResultContentType = "ROW" )
Enum values for RetrievalResultContentType
func (RetrievalResultContentType) Values ¶ added in v1.30.0
func (RetrievalResultContentType) Values() []RetrievalResultContentType
Values returns all known values for RetrievalResultContentType. 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 RetrievalResultCustomDocumentLocation ¶ added in v1.28.0
type RetrievalResultCustomDocumentLocation struct { // The ID of the document. Id *string // contains filtered or unexported fields }
Contains information about the location of a document in a custom data source.
type RetrievalResultKendraDocumentLocation ¶ added in v1.30.0
type RetrievalResultKendraDocumentLocation struct { // The document's uri. Uri *string // contains filtered or unexported fields }
The location of a result in Amazon Kendra.
type RetrievalResultLocation ¶
type RetrievalResultLocation struct { // The type of data source location. // // This member is required. Type RetrievalResultLocationType // The Confluence data source location. ConfluenceLocation *RetrievalResultConfluenceLocation // Specifies the location of a document in a custom data source. CustomDocumentLocation *RetrievalResultCustomDocumentLocation // The location of a document in Amazon Kendra. KendraDocumentLocation *RetrievalResultKendraDocumentLocation // The S3 data source location. S3Location *RetrievalResultS3Location // The Salesforce data source location. SalesforceLocation *RetrievalResultSalesforceLocation SharePointLocation *RetrievalResultSharePointLocation // Specifies information about the SQL query used to retrieve the result. SqlLocation *RetrievalResultSqlLocation // The web URL/URLs data source location. WebLocation *RetrievalResultWebLocation // contains filtered or unexported fields }
Contains information about the data source location.
This data type is used in the following API operations:
- – in the location field
- – in the location field
- – in the location field
type RetrievalResultLocationType ¶
type RetrievalResultLocationType string
const ( RetrievalResultLocationTypeS3 RetrievalResultLocationType = "S3" RetrievalResultLocationTypeWeb RetrievalResultLocationType = "WEB" RetrievalResultLocationTypeConfluence RetrievalResultLocationType = "CONFLUENCE" RetrievalResultLocationTypeSalesforce RetrievalResultLocationType = "SALESFORCE" RetrievalResultLocationTypeCustom RetrievalResultLocationType = "CUSTOM" RetrievalResultLocationTypeKendra RetrievalResultLocationType = "KENDRA" RetrievalResultLocationTypeSql RetrievalResultLocationType = "SQL" )
Enum values for RetrievalResultLocationType
func (RetrievalResultLocationType) Values ¶
func (RetrievalResultLocationType) Values() []RetrievalResultLocationType
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 for the data source location. Uri *string // contains filtered or unexported fields }
The S3 data source location.
This data type is used in the following API operations:
- – in the s3Location field
- – in the s3Location field
- – in the s3Location field
type RetrievalResultSalesforceLocation ¶ added in v1.14.0
type RetrievalResultSalesforceLocation struct { // The Salesforce host URL for the data source location. Url *string // contains filtered or unexported fields }
The Salesforce data source location.
type RetrievalResultSharePointLocation ¶ added in v1.14.0
type RetrievalResultSharePointLocation struct { string // contains filtered or unexported fields }Url *
The SharePoint data source location.
type RetrievalResultSqlLocation ¶ added in v1.30.0
type RetrievalResultSqlLocation struct { // The SQL query used to retrieve the result. Query *string // contains filtered or unexported fields }
Contains information about the SQL query used to retrieve the result.
type RetrievalResultWebLocation ¶ added in v1.14.0
type RetrievalResultWebLocation struct { // The web URL/URLs for the data source location. Url *string // contains filtered or unexported fields }
The web URL/URLs data source location.
type RetrieveAndGenerateConfiguration ¶
type RetrieveAndGenerateConfiguration struct { // The type of resource that contains your data for retrieving information and // generating responses. // // If you choose ot use EXTERNAL_SOURCES , then currently only Claude 3 Sonnet // models for knowledge bases are supported. // // This member is required. Type RetrieveAndGenerateType // The configuration for the external source wrapper object in the // retrieveAndGenerate function. ExternalSourcesConfiguration *ExternalSourcesRetrieveAndGenerateConfiguration // Contains details about the knowledge base for retrieving information and // generating responses. KnowledgeBaseConfiguration *KnowledgeBaseRetrieveAndGenerateConfiguration // contains filtered or unexported fields }
Contains details about the resource being queried.
This data type is used in the following API operations:
- – 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:
- – 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:
- – in the output field
type RetrieveAndGenerateOutputEvent ¶ added in v1.28.0
type RetrieveAndGenerateOutputEvent struct { // A text response. // // This member is required. Text *string // contains filtered or unexported fields }
A retrieve and generate output event.
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:
- – in the sessionConfiguration field
type RetrieveAndGenerateStreamResponseOutput ¶ added in v1.28.0
type RetrieveAndGenerateStreamResponseOutput interface {
// contains filtered or unexported methods
}
A retrieve and generate stream response output.
The following types satisfy this interface:
RetrieveAndGenerateStreamResponseOutputMemberCitation RetrieveAndGenerateStreamResponseOutputMemberGuardrail RetrieveAndGenerateStreamResponseOutputMemberOutput
Example (OutputUsage) ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/bedrockagentruntime/types" ) func main() { var union types.RetrieveAndGenerateStreamResponseOutput // type switches can be used to check the union value switch v := union.(type) { case *types.RetrieveAndGenerateStreamResponseOutputMemberCitation: _ = v.Value // Value is types.CitationEvent case *types.RetrieveAndGenerateStreamResponseOutputMemberGuardrail: _ = v.Value // Value is types.GuardrailEvent case *types.RetrieveAndGenerateStreamResponseOutputMemberOutput: _ = v.Value // Value is types.RetrieveAndGenerateOutputEvent case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) default: fmt.Println("union is nil or unknown type") } }
Output:
type RetrieveAndGenerateStreamResponseOutputMemberCitation ¶ added in v1.28.0
type RetrieveAndGenerateStreamResponseOutputMemberCitation struct { Value CitationEvent // contains filtered or unexported fields }
A citation event.
type RetrieveAndGenerateStreamResponseOutputMemberGuardrail ¶ added in v1.28.0
type RetrieveAndGenerateStreamResponseOutputMemberGuardrail struct { Value GuardrailEvent // contains filtered or unexported fields }
A guardrail event.
type RetrieveAndGenerateStreamResponseOutputMemberOutput ¶ added in v1.28.0
type RetrieveAndGenerateStreamResponseOutputMemberOutput struct { Value RetrieveAndGenerateOutputEvent // contains filtered or unexported fields }
An output event.
type RetrieveAndGenerateType ¶
type RetrieveAndGenerateType string
const ( RetrieveAndGenerateTypeKnowledgeBase RetrieveAndGenerateType = "KNOWLEDGE_BASE" RetrieveAndGenerateTypeExternalSources RetrieveAndGenerateType = "EXTERNAL_SOURCES" )
Enum values for RetrieveAndGenerateType
func (RetrieveAndGenerateType) Values ¶
func (RetrieveAndGenerateType) Values() []RetrieveAndGenerateType
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:
- – in the retrievedReferences field
- – in the retrievedReferences field
type ReturnControlPayload ¶ added in v1.7.0
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:
type ReturnControlResults ¶ added in v1.29.0
type ReturnControlResults struct { // The action's invocation ID. InvocationId *string // The action invocation result. ReturnControlInvocationResults []InvocationResultMember // contains filtered or unexported fields }
An action invocation result.
type RoutingClassifierModelInvocationOutput ¶ added in v1.29.0
type RoutingClassifierModelInvocationOutput struct { // The invocation's metadata. Metadata *Metadata // The invocation's raw response. RawResponse *RawResponse // The invocation's trace ID. TraceId *string // contains filtered or unexported fields }
Invocation output from a routing classifier model.
type RoutingClassifierTrace ¶ added in v1.29.0
type RoutingClassifierTrace interface {
// contains filtered or unexported methods
}
A trace for a routing classifier.
The following types satisfy this interface:
RoutingClassifierTraceMemberInvocationInput RoutingClassifierTraceMemberModelInvocationInput RoutingClassifierTraceMemberModelInvocationOutput RoutingClassifierTraceMemberObservation
Example (OutputUsage) ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/bedrockagentruntime/types" ) func main() { var union types.RoutingClassifierTrace // type switches can be used to check the union value switch v := union.(type) { case *types.RoutingClassifierTraceMemberInvocationInput: _ = v.Value // Value is types.InvocationInput case *types.RoutingClassifierTraceMemberModelInvocationInput: _ = v.Value // Value is types.ModelInvocationInput case *types.RoutingClassifierTraceMemberModelInvocationOutput: _ = v.Value // Value is types.RoutingClassifierModelInvocationOutput case *types.RoutingClassifierTraceMemberObservation: _ = v.Value // Value is types.Observation case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) default: fmt.Println("union is nil or unknown type") } }
Output:
type RoutingClassifierTraceMemberInvocationInput ¶ added in v1.29.0
type RoutingClassifierTraceMemberInvocationInput struct { Value InvocationInput // contains filtered or unexported fields }
The classifier's invocation input.
type RoutingClassifierTraceMemberModelInvocationInput ¶ added in v1.29.0
type RoutingClassifierTraceMemberModelInvocationInput struct { Value ModelInvocationInput // contains filtered or unexported fields }
The classifier's model invocation input.
type RoutingClassifierTraceMemberModelInvocationOutput ¶ added in v1.29.0
type RoutingClassifierTraceMemberModelInvocationOutput struct { Value RoutingClassifierModelInvocationOutput // contains filtered or unexported fields }
The classifier's model invocation output.
type RoutingClassifierTraceMemberObservation ¶ added in v1.29.0
type RoutingClassifierTraceMemberObservation struct { Value Observation // contains filtered or unexported fields }
The classifier's observation.
type S3Identifier ¶ added in v1.26.0
type S3Identifier struct { // The name of the S3 bucket. S3BucketName *string // The S3 object key for the S3 resource. S3ObjectKey *string // contains filtered or unexported fields }
The identifier information for an Amazon S3 bucket.
type S3ObjectDoc ¶ added in v1.8.0
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 S3ObjectFile ¶ added in v1.14.0
type S3ObjectFile struct { // The uri of the s3 object. // // This member is required. Uri *string // contains filtered or unexported fields }
Contains details of the s3 object where the source file is located.
type SearchType ¶ added in v1.4.0
type SearchType string
const ( SearchTypeHybrid SearchType = "HYBRID" SearchTypeSemantic SearchType = "SEMANTIC" )
Enum values for SearchType
func (SearchType) Values ¶ added in v1.4.0
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 (e *ServiceQuotaExceededException) Error() string
func (*ServiceQuotaExceededException) ErrorCode ¶
func (e *ServiceQuotaExceededException) ErrorCode() string
func (*ServiceQuotaExceededException) ErrorFault ¶
func (e *ServiceQuotaExceededException) ErrorFault() smithy.ErrorFault
func (*ServiceQuotaExceededException) ErrorMessage ¶
func (e *ServiceQuotaExceededException) ErrorMessage() string
type SessionState ¶
type SessionState struct { // The state's conversation history. ConversationHistory *ConversationHistory // Contains information about the files used by code interpreter. Files []InputFile // 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 // An array of configurations, each of which applies to a knowledge base attached // to the agent. KnowledgeBaseConfigurations []KnowledgeBaseConfiguration // 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
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:
- – in the span field
- – in the span field
type StreamingConfigurations ¶ added in v1.27.0
type StreamingConfigurations struct { // The guardrail interval to apply as response is generated. ApplyGuardrailInterval *int32 // Specifies whether to enable streaming for the final response. This is set to // false by default. StreamFinalResponse bool // contains filtered or unexported fields }
Configurations for streaming.
type TextInferenceConfig ¶ added in v1.9.0
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 TextPrompt ¶ added in v1.25.0
type TextPrompt struct { // The text in the text prompt to optimize. // // This member is required. Text *string // contains filtered or unexported fields }
Contains information about the text prompt to optimize.
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:
- – in the textResponsePart field
- – in the textResponsePart field
type TextToSqlConfiguration ¶ added in v1.30.0
type TextToSqlConfiguration struct { // The type of resource to use in transformation. // // This member is required. Type TextToSqlConfigurationType // Specifies configurations for a knowledge base to use in transformation. KnowledgeBaseConfiguration *TextToSqlKnowledgeBaseConfiguration // contains filtered or unexported fields }
Contains configurations for transforming text to SQL.
type TextToSqlConfigurationType ¶ added in v1.30.0
type TextToSqlConfigurationType string
const (
TextToSqlConfigurationTypeKnowledgeBase TextToSqlConfigurationType = "KNOWLEDGE_BASE"
)
Enum values for TextToSqlConfigurationType
func (TextToSqlConfigurationType) Values ¶ added in v1.30.0
func (TextToSqlConfigurationType) Values() []TextToSqlConfigurationType
Values returns all known values for TextToSqlConfigurationType. 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 TextToSqlKnowledgeBaseConfiguration ¶ added in v1.30.0
type TextToSqlKnowledgeBaseConfiguration struct { // The ARN of the knowledge base // // This member is required. KnowledgeBaseArn *string // contains filtered or unexported fields }
Contains configurations for a knowledge base to use in transformation.
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:
TraceMemberCustomOrchestrationTrace TraceMemberFailureTrace TraceMemberGuardrailTrace TraceMemberOrchestrationTrace TraceMemberPostProcessingTrace TraceMemberPreProcessingTrace TraceMemberRoutingClassifierTrace
Example (OutputUsage) ¶
package main import ( "fmt" "github.com/aws/aws-sdk-go-v2/service/bedrockagentruntime/types" ) func main() { var union types.Trace // type switches can be used to check the union value switch v := union.(type) { case *types.TraceMemberCustomOrchestrationTrace: _ = v.Value // Value is types.CustomOrchestrationTrace 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.TraceMemberRoutingClassifierTrace: _ = v.Value // Value is types.RoutingClassifierTrace case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) default: fmt.Println("union is nil or unknown type") } }
Output:
type TraceMemberCustomOrchestrationTrace ¶ added in v1.27.0
type TraceMemberCustomOrchestrationTrace struct { Value CustomOrchestrationTrace // contains filtered or unexported fields }
Details about the custom orchestration step in which the agent determines the
order in which actions are executed.
type TraceMemberFailureTrace ¶
type TraceMemberFailureTrace struct { Value FailureTrace // contains filtered or unexported fields }
Contains information about the failure of the interaction.
type TraceMemberGuardrailTrace ¶ added in v1.11.0
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 TraceMemberRoutingClassifierTrace ¶ added in v1.29.0
type TraceMemberRoutingClassifierTrace struct { Value RoutingClassifierTrace // contains filtered or unexported fields }
A routing classifier's trace.
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 part's caller chain. CallerChain []Caller // The part's collaborator name. CollaboratorName *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 TransformationConfiguration ¶ added in v1.30.0
type TransformationConfiguration struct { // The mode of the transformation. // // This member is required. Mode QueryTransformationMode // Specifies configurations for transforming text to SQL. TextToSqlConfiguration *TextToSqlConfiguration // contains filtered or unexported fields }
Contains configurations for transforming the natural language query into SQL.
type Type ¶
type Type string
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 Usage ¶ added in v1.16.0
type Usage struct { // Contains information about the input tokens from the foundation model usage. InputTokens *int32 // Contains information about the output tokens from the foundation model usage. OutputTokens *int32 // contains filtered or unexported fields }
Contains information of the usage of the foundation model.
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
type VectorSearchBedrockRerankingConfiguration ¶ added in v1.28.0
type VectorSearchBedrockRerankingConfiguration struct { // Contains configurations for the reranker model. // // This member is required. ModelConfiguration *VectorSearchBedrockRerankingModelConfiguration // Contains configurations for the metadata to use in reranking. MetadataConfiguration *MetadataConfigurationForReranking // The number of results to return after reranking. NumberOfRerankedResults *int32 // contains filtered or unexported fields }
Contains configurations for reranking with an Amazon Bedrock reranker model.
type VectorSearchBedrockRerankingModelConfiguration ¶ added in v1.28.0
type VectorSearchBedrockRerankingModelConfiguration struct { // The ARN of the reranker model to use. // // This member is required. ModelArn *string // A JSON object whose keys are request fields for the model and whose values are // values for those fields. AdditionalModelRequestFields map[string]document.Interface // contains filtered or unexported fields }
Contains configurations for an Amazon Bedrock reranker model.
type VectorSearchRerankingConfiguration ¶ added in v1.28.0
type VectorSearchRerankingConfiguration struct { // The type of reranker model. // // This member is required. Type VectorSearchRerankingConfigurationType // Contains configurations for an Amazon Bedrock reranker model. BedrockRerankingConfiguration *VectorSearchBedrockRerankingConfiguration // contains filtered or unexported fields }
Contains configurations for reranking the retrieved results.
type VectorSearchRerankingConfigurationType ¶ added in v1.28.0
type VectorSearchRerankingConfigurationType string
const (
VectorSearchRerankingConfigurationTypeBedrockRerankingModel VectorSearchRerankingConfigurationType = "BEDROCK_RERANKING_MODEL"
)
Enum values for VectorSearchRerankingConfigurationType
func (VectorSearchRerankingConfigurationType) Values ¶ added in v1.28.0
func (VectorSearchRerankingConfigurationType) Values() []VectorSearchRerankingConfigurationType
Values returns all known values for VectorSearchRerankingConfigurationType. 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.