Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var APIKeyMeta = provider.ProviderMeta{ Provider: provider.ProviderAnthropic, AuthMethod: provider.AuthAPIKey, EnvVars: []string{"ANTHROPIC_API_KEY"}, DisplayName: "Direct API", }
APIKeyMeta is the metadata for Anthropic via API Key
View Source
var VertexMeta = provider.ProviderMeta{ Provider: provider.ProviderAnthropic, AuthMethod: provider.AuthVertex, EnvVars: []string{"CLOUD_ML_REGION", "ANTHROPIC_VERTEX_PROJECT_ID"}, DisplayName: "Vertex AI", }
VertexMeta is the metadata for Anthropic via Vertex AI
Functions ¶
func NewAPIKeyClient ¶
func NewAPIKeyClient(ctx context.Context) (provider.LLMProvider, error)
NewAPIKeyClient creates a new Anthropic client using API Key authentication
func NewVertexClient ¶
func NewVertexClient(ctx context.Context) (provider.LLMProvider, error)
NewVertexClient creates a new Anthropic client using Vertex AI authentication
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements the LLMProvider interface using the Anthropic SDK
func (*Client) ListModels ¶
ListModels returns the available models for Anthropic Anthropic doesn't have a list models API, so we return defaults. The caller is responsible for caching via Store.CacheModels.
func (*Client) Stream ¶
func (c *Client) Stream(ctx context.Context, opts provider.CompletionOptions) <-chan provider.StreamChunk
Stream sends a completion request and returns a channel of streaming chunks
Click to show internal directories.
Click to hide internal directories.