- Remove outdated documentation files (7 files) - Remove deprecated code (database.ts, authController.ts, auth.ts) - Extract constants to backend/src/config/constants.ts - Consolidate shared types (processing, llm, document, job) - Create LLM modularization structure: - llmPrompts/ directory for prompt builders - llmProviders/ directory for provider implementations - llmUtils/ directory for utility functions - Extract common error handling patterns to errorHandlers.ts - Organize scripts into subdirectories (monitoring/, testing/, debugging/, setup/) - Update README.md with current documentation references All functionality preserved, structure improved for maintainability.
16 lines
389 B
TypeScript
16 lines
389 B
TypeScript
/**
|
|
* Cost Calculation Utilities
|
|
* Estimates LLM API costs based on token usage and model
|
|
*/
|
|
|
|
import { estimateLLMCost } from '../../config/constants';
|
|
|
|
/**
|
|
* Estimate cost for a given number of tokens and model
|
|
* Uses the centralized cost estimation from constants
|
|
*/
|
|
export function estimateCost(tokens: number, model: string): number {
|
|
return estimateLLMCost(tokens, model);
|
|
}
|
|
|