Claude is a family of foundational AI models by Anthropic that can be used in a variety of applications.

Authentication

Set your ANTHROPIC_API_KEY environment. You can get one from Anthropic here.

export ANTHROPIC_API_KEY=***

Usage

Use Claude with your Assistant:

from phi.assistant import Assistant
from phi.llm.anthropic import Claude

assistant = Assistant(
    llm=Claude(
        model="claude-3-opus-20240229",
        max_tokens=1024,
    )
)

# -*- Print a response
assistant.print_response('Share a 5 word horror story.', markdown=True)