AnthropicClient constructor
AnthropicClient({})
Creates an AnthropicClient.
apiKey is required. All other parameters have sensible defaults.
You can swap model to any supported Claude model name, such as
'claude-3-7-sonnet-latest', 'claude-3-5-sonnet-latest', or 'claude-3-5-haiku-latest'.
Implementation
AnthropicClient({
required this.apiKey,
this.model = 'claude-3-5-sonnet-latest',
this.baseUrl = 'https://api.anthropic.com/v1/messages',
this.apiVersion = '2023-06-01',
this.maxTokens = 4096,
this.temperature,
this.onRetry,
http.Client? httpClient,
}) : _httpClient = httpClient ?? http.Client();