Anthropic has launched some thrilling beta options within the final couple of days which have largely gone underneath the radar. Considered one of these was the flexibility to course of PDFs with their fashions, which may now perceive each textual content and visible content material inside PDF paperwork. I’ll possibly write up one thing on that at a later date.
The opposite thrilling beta function, and the topic of this text, was the introduction of token counting. Crucially, you may rely the tokens in consumer messages, PDFs and pictures earlier than you ship them to Claude. This is good news for individuals who like to observe their token utilization prices carefully.
Based on the official announcement from Anthropic (hyperlink right here),
“The token counting endpoint accepts the identical structured checklist of inputs for making a message, together with assist for system prompts, instruments, photographs, and PDFs. The response comprises the full variety of enter tokens.”
And helps the next fashions,
“Claude 3.5 Sonnet
Claude 3.5 Haiku
Claude 3 Haiku
Claude 3 Opus”