Documentation ¶
Index ¶
Constants ¶
View Source
const ( TITAN_EMBED_TEXT_V1 = ModelID("amazon.titan-embed-text-v1") TITAN_EMBED_TEXT_V2 = ModelID("amazon.titan-embed-text-v2:0") )
See https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html
View Source
const ( EMBEDDING_SIZE_256 = 256 EMBEDDING_SIZE_512 = 512 EMBEDDING_SIZE_1024 = 1024 )
View Source
const Version = "bedrock/v0.1.2"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func New ¶
Creates AWS BedRock embeddings client.
By default `us-east-1` region is used, supply custom `aws.Config` to alter behavior.
The client is configurable using
WithConfig(cfg aws.Config)
func (*Client) ConsumedTokens ¶
Number of tokens consumed within the session
type FoundationModel ¶ added in v0.1.0
type FoundationModel struct { constructs.Construct // contains filtered or unexported fields }
Foundation Model L3 construct simplify grant access
func NewFoundationModel ¶ added in v0.1.0
func NewFoundationModel(scope constructs.Construct, id *string, foundationModelId awsbedrock.FoundationModelIdentifier) *FoundationModel
func NewTitanTextEmbeddingsV1 ¶ added in v0.1.0
func NewTitanTextEmbeddingsV1(scope constructs.Construct) *FoundationModel
func NewTitanTextEmbeddingsV2 ¶ added in v0.1.0
func NewTitanTextEmbeddingsV2(scope constructs.Construct) *FoundationModel
func (*FoundationModel) GrantAccess ¶ added in v0.1.0
func (c *FoundationModel) GrantAccess(grantee awsiam.IGrantable)
type Option ¶
type Option func(*Client)
func WithConfig ¶
func WithDimension ¶ added in v0.1.0
func WithTitanV1 ¶ added in v0.1.0
func WithTitanV1() Option
func WithTitanV2 ¶ added in v0.1.0
func WithTitanV2() Option
Click to show internal directories.
Click to hide internal directories.