mirror of
https://github.com/intergalacticalvariable/reader.git
synced 2024-11-16 11:42:32 +08:00
fix: Replace estimateToken with a mock implementation
This commit is contained in:
parent
aeb6ebed67
commit
bf27d39f1b
|
@ -17,7 +17,8 @@ import { Crawled } from '../db/crawled';
|
||||||
import { cleanAttribute } from '../utils/misc';
|
import { cleanAttribute } from '../utils/misc';
|
||||||
import { randomUUID } from 'crypto';
|
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 { CrawlerOptions, CrawlerOptionsHeaderOnly } from '../dto/scrapping-options';
|
||||||
import { PDFExtractor } from '../services/pdf-extract';
|
import { PDFExtractor } from '../services/pdf-extract';
|
||||||
|
|
Loading…
Reference in New Issue
Block a user