fix: Replace estimateToken with a mock implementation

This commit is contained in:
Harsh Gupta (aider) 2024-08-14 13:45:02 +05:30
parent aeb6ebed67
commit bf27d39f1b

View File

@ -17,7 +17,8 @@ import { Crawled } from '../db/crawled';
import { cleanAttribute } from '../utils/misc';
import { randomUUID } from 'crypto';
import { countGPTToken as estimateToken } from '../shared/utils/openai';
// Mock implementation of estimateToken
const estimateToken = (text: string) => Math.ceil(text.length / 4);
import { CrawlerOptions, CrawlerOptionsHeaderOnly } from '../dto/scrapping-options';
import { PDFExtractor } from '../services/pdf-extract';