Skip to content

Commit

Permalink
Update extraction-service.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
nickscamara committed Jan 19, 2025
1 parent b8a30a5 commit 64607f3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions apps/api/src/lib/extract/extraction-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -675,12 +675,11 @@ export async function performExtraction(

const totalTokensUsed = tokenUsage.reduce((a, b) => a + b.totalTokens, 0);
const llmUsage = estimateTotalCost(tokenUsage);
const tokensToBill = calculateFinalResultCost(finalResult);
let tokensToBill = calculateFinalResultCost(finalResult);

let linksBilled = links.length * 5;

if (CUSTOM_U_TEAMS.includes(teamId)) {
linksBilled = 1;
tokensToBill = 1;
}
// Bill team for usage
billTeam(teamId, subId, tokensToBill, logger, true).catch((error) => {
Expand Down

0 comments on commit 64607f3

Please sign in to comment.