The Anthropic provider allows you to interact with the Claude family of models.
To use this provider, you must set the ANTHROPIC_API_KEY environment variable.
# In your .env file
ANTHROPIC_API_KEY="sk-ant-..."Use the ProviderRegistry to get an instance of the Anthropic provider.
from allos.providers import ProviderRegistry
anthropic_provider = ProviderRegistry.get_provider(
"anthropic", model="claude-3-5-sonnet-20240620"
)The provider is compatible with all models available through the Anthropic Messages API. Common models include:
claude-3-5-sonnet-20240620claude-3-opus-20240229claude-3-sonnet-20240229claude-3-haiku-20240307
For a full list, refer to the official Anthropic documentation.