Update scrape.ts
This commit is contained in:
parent
dfcf39f4c0
commit
a386259511
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user