Documentation
¶
Overview ¶
anthropic implements an API client for anthropic (https://docs.anthropic.com/en/api/getting-started)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Callback ¶
type Callback func(*Delta)
Stream response, which is called with each delta in the conversation or nil if the conversation is complete
type Client ¶
type Client struct {
*client.Client
}
func (*Client) Messages ¶
func (c *Client) Messages(ctx context.Context, messages []*schema.Message, opt ...Opt) ([]schema.Content, error)
Send a structured list of input messages with text and/or image content, and the model will generate the next message in the conversation. Use a context to cancel the request, instead of the client-related timeout.
type Opt ¶
type Opt func(*reqMessage) error
Opt is a function which can be used to set options on a request
func OptStopSequence ¶
Custom text sequence that will cause the model to stop generating.
func OptTemperature ¶
Amount of randomness injected into the response.
Click to show internal directories.
Click to hide internal directories.