@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) • 904 B
TypeScript
/**
* @fileoverview Tokenizer implementation for OpenAI GPT models.
*
* This module provides a tokenizer implementation for OpenAI GPT models
* using the gpt-tokenizer library.
*/
import { Tokenizer } from './baseTokenizer';
/**
* Tokenizer for OpenAI GPT models
*/
export declare class GPTTokenizer implements Tokenizer {
private modelPatterns;
/**
* Count the number of tokens in a text using the GPT tokenizer
* @param text Text to count tokens for
* @returns Actual token count
*/
countTokens(text: string): number;
/**
* Get the model name for this tokenizer
* @returns 'gpt'
*/
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;
}