types

package
v1.8.1 Latest Latest
Warning

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

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

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessDeniedException

type AccessDeniedException struct {
	Message *string

	ErrorCodeOverride *string
	// contains filtered or unexported fields
}

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

func (*AccessDeniedException) Error

func (e *AccessDeniedException) Error() string

func (*AccessDeniedException) ErrorCode

func (e *AccessDeniedException) ErrorCode() string

func (*AccessDeniedException) ErrorFault

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

func (*AccessDeniedException) ErrorMessage

func (e *AccessDeniedException) ErrorMessage() string

type ActionGroupInvocationInput

type ActionGroupInvocationInput struct {

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

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

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

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

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

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

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

type ActionGroupInvocationOutput

type ActionGroupInvocationOutput struct {

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

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

type ApiInvocationInput added in v1.7.0

type ApiInvocationInput struct {

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

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

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

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

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

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

This data type is used in the following API operations:

type ApiParameter 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:

Retrieve response

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:

Retrieve response

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 path to the API operation.
	ApiPath *string

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

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

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

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

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

This data type is used in the following API operations:

type Attribution

type Attribution struct {

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

Contains citations for a part of an agent response.

type BadGatewayException

type BadGatewayException struct {
	Message *string

	ErrorCodeOverride *string

	ResourceName *string
	// contains filtered or unexported fields
}

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

func (*BadGatewayException) Error

func (e *BadGatewayException) Error() string

func (*BadGatewayException) ErrorCode

func (e *BadGatewayException) ErrorCode() string

func (*BadGatewayException) ErrorFault

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

func (*BadGatewayException) ErrorMessage

func (e *BadGatewayException) ErrorMessage() string

type ByteContentDoc 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 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:

Retrieve response

  • – in the citations field

RetrieveAndGenerate response

  • – in the citations field

type ConflictException

type ConflictException struct {
	Message *string

	ErrorCodeOverride *string
	// contains filtered or unexported fields
}

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

func (*ConflictException) Error

func (e *ConflictException) Error() string

func (*ConflictException) ErrorCode

func (e *ConflictException) ErrorCode() string

func (*ConflictException) ErrorFault

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

func (*ConflictException) ErrorMessage

func (e *ConflictException) ErrorMessage() string

type ContentBody 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:

type CreationMode

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

Enum values for CreationMode

func (CreationMode) Values

func (CreationMode) Values() []CreationMode

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

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

type DependencyFailedException

type DependencyFailedException struct {
	Message *string

	ErrorCodeOverride *string

	ResourceName *string
	// contains filtered or unexported fields
}

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

func (*DependencyFailedException) Error

func (e *DependencyFailedException) Error() string

func (*DependencyFailedException) ErrorCode

func (e *DependencyFailedException) ErrorCode() string

func (*DependencyFailedException) ErrorFault

func (*DependencyFailedException) ErrorMessage

func (e *DependencyFailedException) ErrorMessage() string

type ExternalSource 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

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 {

	// 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 modelArn used with the external source wrapper object in the
	// retrieveAndGenerate function.
	//
	// This member is required.
	ModelArn *string

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

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

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

type FailureTrace

type FailureTrace struct {

	// The reason the interaction failed.
	FailureReason *string

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

Contains information about the failure of the interaction.

type FilterAttribute 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:

RetrieveAndGenerate request

type FinalResponse

type FinalResponse struct {

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

Contains details about the response to the user.

type FunctionInvocationInput added in v1.7.0

type FunctionInvocationInput struct {

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

	// The name of the function.
	Function *string

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

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

This data type is used in the following API operations:

type FunctionParameter 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:

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 name of the function that was called.
	Function *string

	// The response from the function call using the parameters. The response may be
	// returned directly or from the Lambda function.
	ResponseBody map[string]ContentBody

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

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

This data type is used in the following API operations:

type GeneratedResponsePart

type GeneratedResponsePart struct {

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

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

This data type is used in the following API operations:

Retrieve response

  • – in the generatedResponsePart field

RetrieveAndGenerate response

  • – in the generatedResponsePart field

type GenerationConfiguration added in v1.5.0

type GenerationConfiguration struct {

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

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

This data type is used in the following API operations:

RetrieveAndGenerate request

type InferenceConfiguration

type InferenceConfiguration struct {

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

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

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

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

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

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

type InternalServerException

type InternalServerException struct {
	Message *string

	ErrorCodeOverride *string
	// contains filtered or unexported fields
}

An internal server error occurred. Retry your request.

func (*InternalServerException) Error

func (e *InternalServerException) Error() string

func (*InternalServerException) ErrorCode

func (e *InternalServerException) ErrorCode() string

func (*InternalServerException) ErrorFault

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

func (*InternalServerException) ErrorMessage

func (e *InternalServerException) ErrorMessage() string

type InvocationInput

type InvocationInput struct {

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

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

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

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

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

type InvocationInputMember 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:

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 action group invocation.

This data type is used in the following API operations:

Retrieve request

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"
)

Enum values for InvocationType

func (InvocationType) Values

func (InvocationType) Values() []InvocationType

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

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

type KnowledgeBaseLookupInput

type KnowledgeBaseLookupInput struct {

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

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

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

type KnowledgeBaseLookupOutput

type KnowledgeBaseLookupOutput struct {

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

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

type KnowledgeBaseQuery

type KnowledgeBaseQuery struct {

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

Contains the query made to the knowledge base.

This data type is used in the following API operations:

Retrieve request

  • – in the retrievalQuery field

type KnowledgeBaseRetrievalConfiguration

type KnowledgeBaseRetrievalConfiguration struct {

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

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

This data type is used in the following API operations:

Retrieve request

  • – in the retrievalConfiguration field

RetrieveAndGenerate request

  • – in the retrievalConfiguration field

type KnowledgeBaseRetrievalResult

type KnowledgeBaseRetrievalResult struct {

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

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

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

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

Details about a result from querying the knowledge base.

This data type is used in the following API operations:

Retrieve response

  • – in the retrievalResults field

type KnowledgeBaseRetrieveAndGenerateConfiguration

type KnowledgeBaseRetrieveAndGenerateConfiguration struct {

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

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

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

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

Contains details about the resource being queried.

This data type is used in the following API operations:

Retrieve request

  • – in the knowledgeBaseConfiguration field

RetrieveAndGenerate request

  • – in the knowledgeBaseConfiguration field

type KnowledgeBaseVectorSearchConfiguration

type KnowledgeBaseVectorSearchConfiguration struct {

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

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

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

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

This data type is used in the following API operations:

Retrieve request

  • – in the vectorSearchConfiguration field

RetrieveAndGenerate request

  • – in the vectorSearchConfiguration field

type ModelInvocationInput

type ModelInvocationInput struct {

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

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

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

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

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

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

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

The input for the pre-processing step.

  • The type matches the agent step.

  • The text contains the prompt.

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

type Observation

type Observation struct {

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

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

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

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

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

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

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

type OrchestrationTrace

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

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

The following types satisfy this interface:

OrchestrationTraceMemberInvocationInput
OrchestrationTraceMemberModelInvocationInput
OrchestrationTraceMemberObservation
OrchestrationTraceMemberRationale
Example (OutputUsage)
package main

import (
	"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.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 OrchestrationTraceMemberObservation

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

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

type OrchestrationTraceMemberRationale

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

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

type Parameter

type Parameter struct {

	// The name of the parameter.
	Name *string

	// The type of the parameter.
	Type *string

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

A parameter for the API request or function.

type PayloadPart

type PayloadPart struct {

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

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

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

type PostProcessingModelInvocationOutput

type PostProcessingModelInvocationOutput struct {

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

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

The foundation model output from the post-processing step.

type PostProcessingParsedResponse

type PostProcessingParsedResponse struct {

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

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

type PostProcessingTrace

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

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

The following types satisfy this interface:

PostProcessingTraceMemberModelInvocationInput
PostProcessingTraceMemberModelInvocationOutput
Example (OutputUsage)
package main

import (
	"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 {

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

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

The foundation model output from the pre-processing step.

type PreProcessingParsedResponse

type PreProcessingParsedResponse struct {

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

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

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

type PreProcessingTrace

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

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

The following types satisfy this interface:

PreProcessingTraceMemberModelInvocationInput
PreProcessingTraceMemberModelInvocationOutput
Example (OutputUsage)
package main

import (
	"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 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:

RetrieveAndGenerate request

  • – in the filter field

type PromptType

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

Enum values for PromptType

func (PromptType) Values

func (PromptType) Values() []PromptType

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

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

type PropertyParameters 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 Rationale

type Rationale struct {

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

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

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

type RepromptResponse

type RepromptResponse struct {

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

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

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

type RequestBody

type RequestBody struct {

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

The parameters in the API request body.

type ResourceNotFoundException

type ResourceNotFoundException struct {
	Message *string

	ErrorCodeOverride *string
	// contains filtered or unexported fields
}

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

func (*ResourceNotFoundException) Error

func (e *ResourceNotFoundException) Error() string

func (*ResourceNotFoundException) ErrorCode

func (e *ResourceNotFoundException) ErrorCode() string

func (*ResourceNotFoundException) ErrorFault

func (*ResourceNotFoundException) ErrorMessage

func (e *ResourceNotFoundException) ErrorMessage() string

type ResponseState 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
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.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 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.

This data type is used in the following API operations:

Retrieve request

  • – in the filter field

RetrieveAndGenerate request

  • – in the filter field

The following types satisfy this interface:

RetrievalFilterMemberAndAll
RetrievalFilterMemberEquals
RetrievalFilterMemberGreaterThan
RetrievalFilterMemberGreaterThanOrEquals
RetrievalFilterMemberIn
RetrievalFilterMemberLessThan
RetrievalFilterMemberLessThanOrEquals
RetrievalFilterMemberNotEquals
RetrievalFilterMemberNotIn
RetrievalFilterMemberOrAll
RetrievalFilterMemberStartsWith
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.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.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 whose metadata attributes fulfill all the filter conditions inside this list are returned.

type RetrievalFilterMemberEquals added in v1.6.0

type RetrievalFilterMemberEquals 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 matches the value in this object are returned.

type RetrievalFilterMemberGreaterThan added in v1.6.0

type RetrievalFilterMemberGreaterThan 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 is greater than the value in this object are returned.

type RetrievalFilterMemberGreaterThanOrEquals added in v1.6.0

type RetrievalFilterMemberGreaterThanOrEquals 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 is greater than or equal to the value in this object are returned.

type RetrievalFilterMemberIn added in v1.6.0

type RetrievalFilterMemberIn 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 is in the list specified in the value in this object are returned.

type RetrievalFilterMemberLessThan added in v1.6.0

type RetrievalFilterMemberLessThan 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 is less than the value in this object are returned.

type RetrievalFilterMemberLessThanOrEquals added in v1.6.0

type RetrievalFilterMemberLessThanOrEquals 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 is less than or equal to the value in this object are returned.

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.

type RetrievalFilterMemberNotIn added in v1.6.0

type RetrievalFilterMemberNotIn 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 isn't in the list specified in the value in this object are returned.

type RetrievalFilterMemberOrAll added in v1.6.0

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

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

type RetrievalFilterMemberStartsWith added in v1.6.0

type RetrievalFilterMemberStartsWith 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 starts with the value in this object are returned. This filter is currently only supported for Amazon OpenSearch Serverless vector stores.

type RetrievalResultContent

type RetrievalResultContent struct {

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

Contains the cited text from the data source.

This data type is used in the following API operations:

Retrieve response

  • – in the content field

RetrieveAndGenerate response

  • – in the content field

Retrieve response

  • – in the content field

type RetrievalResultLocation

type RetrievalResultLocation struct {

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

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

Contains information about the location of the data source.

This data type is used in the following API operations:

Retrieve response

  • – in the location field

RetrieveAndGenerate response

  • – in the location field

Retrieve response

  • – in the locatino field

type RetrievalResultLocationType

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

Enum values for RetrievalResultLocationType

func (RetrievalResultLocationType) Values

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

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

type RetrievalResultS3Location

type RetrievalResultS3Location struct {

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

Contains the S3 location of the data source.

This data type is used in the following API operations:

Retrieve response

  • – in the s3Location field

RetrieveAndGenerate response

  • – in the s3Location field

Retrieve response

  • – in the s3Location field

type RetrieveAndGenerateConfiguration

type RetrieveAndGenerateConfiguration struct {

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

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

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

Contains details about the resource being queried.

This data type is used in the following API operations:

RetrieveAndGenerate request

  • – in the retrieveAndGenerateConfiguration field

type RetrieveAndGenerateInput

type RetrieveAndGenerateInput struct {

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

Contains the query made to the knowledge base.

This data type is used in the following API operations:

RetrieveAndGenerate request

  • – in the input field

type RetrieveAndGenerateOutput

type RetrieveAndGenerateOutput struct {

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

Contains the response generated from querying the knowledge base.

This data type is used in the following API operations:

RetrieveAndGenerate response

  • – in the output field

type RetrieveAndGenerateSessionConfiguration

type RetrieveAndGenerateSessionConfiguration struct {

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

Contains configuration about the session with the knowledge base.

This data type is used in the following API operations:

RetrieveAndGenerate request

  • – in the sessionConfiguration field

type RetrieveAndGenerateType

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

Enum values for RetrieveAndGenerateType

func (RetrieveAndGenerateType) Values

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

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

type RetrievedReference

type RetrievedReference struct {

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

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

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

Contains metadata about a source cited for the generated response.

This data type is used in the following API operations:

RetrieveAndGenerate response

  • – in the retrievedReferences field

Retrieve response

  • – 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:

Retrieve response

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 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 (*ServiceQuotaExceededException) ErrorCode

func (e *ServiceQuotaExceededException) ErrorCode() string

func (*ServiceQuotaExceededException) ErrorFault

func (*ServiceQuotaExceededException) ErrorMessage

func (e *ServiceQuotaExceededException) ErrorMessage() string

type SessionState

type SessionState struct {

	// The identifier of the invocation.
	InvocationId *string

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

	// Contains information about the results from the action group invocation.
	ReturnControlInvocationResults []InvocationResultMember

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

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

type Source

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

Enum values for Source

func (Source) Values

func (Source) Values() []Source

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

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

type Span

type Span struct {

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

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

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

This data type is used in the following API operations:

RetrieveAndGenerate response

  • – in the span field

Retrieve response

  • – in the span field

type TextResponsePart

type TextResponsePart struct {

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

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

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

This data type is used in the following API operations:

RetrieveAndGenerate response

  • – in the textResponsePart field

Retrieve response

  • – in the textResponsePart field

type ThrottlingException

type ThrottlingException struct {
	Message *string

	ErrorCodeOverride *string
	// contains filtered or unexported fields
}

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

func (*ThrottlingException) Error

func (e *ThrottlingException) Error() string

func (*ThrottlingException) ErrorCode

func (e *ThrottlingException) ErrorCode() string

func (*ThrottlingException) ErrorFault

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

func (*ThrottlingException) ErrorMessage

func (e *ThrottlingException) ErrorMessage() string

type Trace

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

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

The following types satisfy this interface:

TraceMemberFailureTrace
TraceMemberOrchestrationTrace
TraceMemberPostProcessingTrace
TraceMemberPreProcessingTrace
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.TraceMemberFailureTrace:
		_ = v.Value // Value is types.FailureTrace

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

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

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

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

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

	}
}
Output:

type TraceMemberFailureTrace

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

Contains information about the failure of the interaction.

type TraceMemberOrchestrationTrace

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

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

type TraceMemberPostProcessingTrace

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

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

type TraceMemberPreProcessingTrace

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

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

type TracePart

type TracePart struct {

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

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

	// The version of the agent.
	AgentVersion *string

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

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

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

type Type

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

Enum values for Type

func (Type) Values

func (Type) Values() []Type

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

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

type UnknownUnionMember

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

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

type ValidationException

type ValidationException struct {
	Message *string

	ErrorCodeOverride *string
	// contains filtered or unexported fields
}

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

func (*ValidationException) Error

func (e *ValidationException) Error() string

func (*ValidationException) ErrorCode

func (e *ValidationException) ErrorCode() string

func (*ValidationException) ErrorFault

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

func (*ValidationException) ErrorMessage

func (e *ValidationException) ErrorMessage() string

Jump to

Keyboard shortcuts

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