bedrockruntime

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BedrockRuntime

type BedrockRuntime struct {
	// define the AWS region that BedrockRuntime is located at
	AwsRegion awsregion.AWSRegion

	// custom http2 client options
	HttpOptions *awshttp2.HttpClientSettings
	// contains filtered or unexported fields
}

BedrockRuntime struct encapsulates the AWS BedrockRuntime access functionality

func (*BedrockRuntime) Connect

func (s *BedrockRuntime) Connect(parentSegment ...*xray.XRayParentSegment) (err error)

Connect will establish a connection to the BedrockRuntime service

func (*BedrockRuntime) Disconnect

func (s *BedrockRuntime) Disconnect()

Disconnect will clear bedrockruntime client

func (*BedrockRuntime) InvokeModel

func (s *BedrockRuntime) InvokeModel(modelId string, requestBody []byte) (responseBody []byte, err error)

Invokes the specified Amazon Bedrock model to run inference using the prompt and inference parameters provided in the request body. You use model inference to generate text, images, and embeddings. For example code, see Invoke model code examples in the Amazon Bedrock User Guide. This operation requires permission for the bedrock:InvokeModel action.

func (*BedrockRuntime) UpdateParentSegment

func (s *BedrockRuntime) UpdateParentSegment(parentSegment *xray.XRayParentSegment)

UpdateParentSegment updates this struct's xray parent segment, if no parent segment, set nil

Jump to

Keyboard shortcuts

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