Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertParametersToSchema ¶ added in v1.7.0
func ConvertParametersToSchema(params any) (anthropic.ToolInputSchemaParam, error)
ConvertParametersToSchema converts parameters to Anthropic Schema format
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents an Anthropic client wrapper implementing provider.Provider It holds the anthropic client and model config
func NewClient ¶
func NewClient(ctx context.Context, cfg *latest.ModelConfig, env environment.Provider, opts ...options.Opt) (*Client, error)
NewClient creates a new Anthropic client from the provided configuration
func (*Client) CreateChatCompletionStream ¶
func (c *Client) CreateChatCompletionStream( ctx context.Context, messages []chat.Message, requestTools []tools.Tool, ) (chat.MessageStream, error)
CreateChatCompletionStream creates a streaming chat completion request
func (*Client) Options ¶ added in v1.7.1
func (c *Client) Options() options.ModelOptions
Options returns the effective model options used by this client.
Click to show internal directories.
Click to hide internal directories.