Documentation ¶
Index ¶
- type BedrockRuntime
- func (s *BedrockRuntime) Connect(parentSegment ...*xray.XRayParentSegment) (err error)
- func (s *BedrockRuntime) Disconnect()
- func (s *BedrockRuntime) InvokeModel(modelId string, requestBody []byte) (responseBody []byte, err error)
- func (s *BedrockRuntime) UpdateParentSegment(parentSegment *xray.XRayParentSegment)
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