Anthropic Model
Configure Anthropic as your model provider
The anthropic
function configures Anthropic’s Claude as your model provider.
Configuration
The anthropic
function accepts a model name string or a configuration object:
defaultParameters.max_tokens
is required.Options
ID of the model to use. See the model endpoint compatibility table for details on which models work with the Anthropic API.
This option has been moved to the defaultParameters
option.
The maximum number of tokens to generate before stopping.
The Anthropic API key to use for authenticating your request. By default we’ll
search for and use the ANTHROPIC_API_KEY
environment variable.
The beta headers to enable, eg. for computer use, prompt caching, and so on.
The base URL for the Anthropic API.
The default parameters to use for the model (ex: temperature
, max_tokens
,
etc).
Note: defaultParameters.max_tokens
is required.