Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) Complete(ctx context.Context, req *anthropic.CompletionRequest) (*anthropic.CompletionResponse, error)
- func (c *Client) CompleteStream(ctx context.Context, req *anthropic.CompletionRequest) (<-chan *anthropic.StreamResponse, <-chan error)
- func (c *Client) Message(ctx context.Context, req *anthropic.MessageRequest) (*anthropic.MessageResponse, error)
- func (c *Client) MessageStream(ctx context.Context, req *anthropic.MessageRequest) (<-chan *anthropic.MessageStreamResponse, <-chan error)
- type CompleteRequest
- type Config
- type MessageRequest
Constants ¶
View Source
const ( AnthropicVersion = "bedrock-2023-05-31" BedrockModelClaude35Sonnet = "anthropic.claude-3-5-sonnet-20241022-v2:0" BedrockModelClaude35Sonnet_20241022 = "anthropic.claude-3-5-sonnet-20241022-v2:0" BedrockModelClaude35Sonnet_20240620 = "anthropic.claude-3-5-sonnet-20240620-v1:0" BedrockModelClaude35Haiku = "anthropic.claude-3-5-haiku-20241022-v1:0" BedrockModelClaude35Haiku_20241022 = "anthropic.claude-3-5-haiku-20241022-v1:0" BedrockModelClaude3Opus = "anthropic.claude-3-opus-20240229-v1:0" BedrockModelClaude3Sonnet = "anthropic.claude-3-sonnet-20240229-v1:0" BedrockModelClaude3Haiku = "anthropic.claude-3-haiku-20240307-v1:0" BedrockModelClaudeV2_1 = "anthropic.claude-v2:1" // Cross-region top-level region code CRUS = "us" CREU = "eu" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Complete ¶
func (c *Client) Complete(ctx context.Context, req *anthropic.CompletionRequest) (*anthropic.CompletionResponse, error)
func (*Client) CompleteStream ¶
func (c *Client) CompleteStream(ctx context.Context, req *anthropic.CompletionRequest) (<-chan *anthropic.StreamResponse, <-chan error)
func (*Client) Message ¶
func (c *Client) Message(ctx context.Context, req *anthropic.MessageRequest) (*anthropic.MessageResponse, error)
func (*Client) MessageStream ¶
func (c *Client) MessageStream(ctx context.Context, req *anthropic.MessageRequest) (<-chan *anthropic.MessageStreamResponse, <-chan error)
type CompleteRequest ¶
type CompleteRequest struct { anthropic.CompletionRequest AnthropicVersion string `json:"anthropic_version"` Model bool `json:"model,omitempty"` // shadow for Model Stream bool `json:"stream,omitempty"` // shadow for Stream }
type MessageRequest ¶
type MessageRequest struct { anthropic.MessageRequest AnthropicVersion string `json:"anthropic_version"` Model bool `json:"model,omitempty"` // shadow for Model Stream bool `json:"stream,omitempty"` // shadow for Stream }
MessageRequest is an override for the default message request to adapt the request for the Bedrock API.
Click to show internal directories.
Click to hide internal directories.