Anthropic
Connecting
To send a message to Anthropic, you can use the OpenAI Client. The Arcade Engine will convert the OpenAI requests and responses to and from the Anthropic chat formats.
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.arcade-ai.com/v1",
api_key=os.environ.get("ARCADE_API_KEY"))
response = client.chat.completions.create(
model = "claude-3-5-sonnet-20240620",
user = "[email protected]",
messages = [
{"role": "user", "content": "Summarize my last 10 emails"}
]
)
Configuration
This is a simple example on enabling Anthropic in the Arcade Engine
llm:
models:
- id: anthropic
anthropic:
api_key: <ANTHROPIC API KEY>
For more advanced configuration, see the model docs