Update extraction-service.ts

This commit is contained in:
Nicolas 2025-01-18 22:40:53 -03:00
parent b8a30a50e2
commit 64607f3f20

View File

@ -675,12 +675,11 @@ export async function performExtraction(
const totalTokensUsed = tokenUsage.reduce((a, b) => a + b.totalTokens, 0); const totalTokensUsed = tokenUsage.reduce((a, b) => a + b.totalTokens, 0);
const llmUsage = estimateTotalCost(tokenUsage); const llmUsage = estimateTotalCost(tokenUsage);
const tokensToBill = calculateFinalResultCost(finalResult); let tokensToBill = calculateFinalResultCost(finalResult);
let linksBilled = links.length * 5;
if (CUSTOM_U_TEAMS.includes(teamId)) { if (CUSTOM_U_TEAMS.includes(teamId)) {
linksBilled = 1; tokensToBill = 1;
} }
// Bill team for usage // Bill team for usage
billTeam(teamId, subId, tokensToBill, logger, true).catch((error) => { billTeam(teamId, subId, tokensToBill, logger, true).catch((error) => {