UNPKG

@bobmatnyc/ai-code-review

Version:

A TypeScript-based tool for automated code reviews using AI models from Google Gemini, Anthropic Claude, and OpenRouter

31 lines (30 loc) 941 B
/** * @fileoverview Tokenizer implementation for Anthropic Claude models. * * This module provides a tokenizer implementation for Anthropic Claude models * using the @anthropic-ai/tokenizer library. */ import { Tokenizer } from './baseTokenizer'; /** * Tokenizer for Anthropic Claude models */ export declare class ClaudeTokenizer implements Tokenizer { private modelPatterns; /** * Count the number of tokens in a text using the Claude tokenizer * @param text Text to count tokens for * @returns Actual token count */ countTokens(text: string): number; /** * Get the model name for this tokenizer * @returns 'claude' */ getModelName(): string; /** * Check if this tokenizer supports a given model * @param modelName Name of the model to check * @returns True if the model is supported, false otherwise */ supportsModel(modelName: string): boolean; }