bedrock

package
v1.4.211 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package bedrock provides a plugin to use Amazon Bedrock models. Supported models are defined in the MODELS variable. To add additional models, append them to the MODELS array. Models must support the Converse and ConverseStream operations Authentication uses the AWS credential provider chain, similar.to the AWS CLI and SDKs https://docs.aws.amazon.com/sdkref/latest/guide/standardized-credentials.html

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BedrockClient

type BedrockClient struct {
	*plugins.PluginBase
	// contains filtered or unexported fields
}

BedrockClient is a plugin to add support for Amazon Bedrock

func NewClient

func NewClient() (ret *BedrockClient)

NewClient returns a new Bedrock plugin client

func (*BedrockClient) ListModels

func (c *BedrockClient) ListModels() ([]string, error)

ListModels lists the models available for use with the Bedrock plugin

func (*BedrockClient) NeedsRawMode

func (c *BedrockClient) NeedsRawMode(modelName string) bool

func (*BedrockClient) Send

func (c *BedrockClient) Send(ctx context.Context, msgs []*goopenai.ChatCompletionMessage, opts *common.ChatOptions) (ret string, err error)

Send sends the messages the Bedrock Converse API

func (*BedrockClient) SendStream

func (c *BedrockClient) SendStream(msgs []*goopenai.ChatCompletionMessage, opts *common.ChatOptions, channel chan string) (err error)

SendStream sends the messages to the the Bedrock ConverseStream API

Jump to

Keyboard shortcuts

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