Documentation ¶
Index ¶
- Variables
- type Client
- func (c *Client) ChatCompletion(ctx context.Context, request model.ChatCompletionRequest) (res model.ChatCompletionResponse, err error)
- func (c *Client) ChatCompletionStream(ctx context.Context, request model.ChatCompletionRequest) (responseChan chan *model.ChatCompletionResponse, err error)
- func (c *Client) Image(ctx context.Context, request model.ImageRequest) (res model.ImageResponse, err error)
- func (c *Client) Speech(ctx context.Context, request model.SpeechRequest) (res model.SpeechResponse, err error)
- func (c *Client) Transcription(ctx context.Context, request model.AudioRequest) (res model.AudioResponse, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var AwsModelIDMap = map[string]string{
"claude-2.0": "anthropic.claude-v2",
"claude-2.1": "anthropic.claude-v2:1",
"claude-3-sonnet-20240229": "anthropic.claude-3-sonnet-20240229-v1:0",
"claude-3-5-sonnet-20240620": "anthropic.claude-3-5-sonnet-20240620-v1:0",
"claude-3-5-sonnet-20241022": "anthropic.claude-3-5-sonnet-20241022-v2:0",
"claude-3-haiku-20240307": "anthropic.claude-3-haiku-20240307-v1:0",
"claude-3-5-haiku-20241022": "anthropic.claude-3-5-haiku-20241022-v1:0",
"claude-3-opus-20240229": "anthropic.claude-3-opus-20240229-v1:0",
"claude-instant-1.2": "anthropic.claude-instant-v1",
}
https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewAwsClient ¶
func NewGcpClient ¶
func (*Client) ChatCompletion ¶
func (c *Client) ChatCompletion(ctx context.Context, request model.ChatCompletionRequest) (res model.ChatCompletionResponse, err error)
func (*Client) ChatCompletionStream ¶
func (c *Client) ChatCompletionStream(ctx context.Context, request model.ChatCompletionRequest) (responseChan chan *model.ChatCompletionResponse, err error)
func (*Client) Image ¶
func (c *Client) Image(ctx context.Context, request model.ImageRequest) (res model.ImageResponse, err error)
func (*Client) Speech ¶
func (c *Client) Speech(ctx context.Context, request model.SpeechRequest) (res model.SpeechResponse, err error)
func (*Client) Transcription ¶
func (c *Client) Transcription(ctx context.Context, request model.AudioRequest) (res model.AudioResponse, err error)
Click to show internal directories.
Click to hide internal directories.