mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-08 16:19:02 +08:00
Update extraction-service.ts
This commit is contained in:
parent
b8a30a50e2
commit
64607f3f20
@ -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) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user