0

Update scrape.ts

This commit is contained in:
Nicolas 2024-04-30 16:35:44 -07:00
parent dfcf39f4c0
commit a386259511

View File

@ -117,7 +117,7 @@ export async function scrapeController(req: Request, res: Response) {
); );
const endTime = new Date().getTime(); const endTime = new Date().getTime();
const timeTakenInSeconds = (endTime - startTime) / 1000; const timeTakenInSeconds = (endTime - startTime) / 1000;
const numTokens = numTokensFromString(result.data.markdown, "gpt-3.5-turbo") const numTokens = (result.data && result.data.markdown) ? numTokensFromString(result.data.markdown, "gpt-3.5-turbo") : 0;
logJob({ logJob({
success: result.success, success: result.success,