Versions in this module Expand all Collapse all v0 v0.1.0 Apr 18, 2024 Changes in this version + type Client struct + Messages *MessagesService + func NewClient(httpClient *http.Client) *Client + func (c *Client) Do(ctx context.Context, req *http.Request, v any) (*http.Response, error) + func (c *Client) NewRequest(method, path string, body any) (*http.Request, error) + type Content struct + Text string + Type string + type CreateMessageInput struct + MaxTokens int + Messages []Message + Model LanguageModel + StopSequences []string + System string + Temperature *float64 + TopK *int + TopP *float64 + type CreateMessageOutput struct + Content []*Content + ID *string + Model *string + Role *string + StopReason *string + StopSequence *string + Type *string + Usage *Usage + func (c *CreateMessageOutput) String() string + type LanguageModel string + const Claude20 + const Claude21 + const Claude3Haiku20240229 + const Claude3Opus20240229 + const Claude3Sonnet20240229 + const ClaudeInstant12 + type Message struct + Content string + Role string + type MessagesService service + func (c *MessagesService) Create(ctx context.Context, in *CreateMessageInput) (*CreateMessageOutput, *http.Response, error) + type Transport struct + APIKey string + func (t *Transport) Client() *http.Client + func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) + type Usage struct + InputTokens int + OutputTokens int + func (u *Usage) String() string