mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-18 20:25:54 +08:00
feat(llmExtract): add token tracking to all calls
This commit is contained in:
parent
438ea19f16
commit
6d2347b5f8
@ -295,6 +295,10 @@ export async function generateCompletions({
|
||||
result.usage?.promptTokens ?? 0,
|
||||
result.usage?.completionTokens ?? 0,
|
||||
),
|
||||
tokens: {
|
||||
input: result.usage?.promptTokens ?? 0,
|
||||
output: result.usage?.completionTokens ?? 0,
|
||||
}
|
||||
});
|
||||
|
||||
extract = result.text;
|
||||
@ -347,6 +351,10 @@ export async function generateCompletions({
|
||||
result.usage?.promptTokens ?? 0,
|
||||
result.usage?.completionTokens ?? 0,
|
||||
),
|
||||
tokens: {
|
||||
input: result.usage?.promptTokens ?? 0,
|
||||
output: result.usage?.completionTokens ?? 0,
|
||||
}
|
||||
});
|
||||
|
||||
return {
|
||||
|
Loading…
x
Reference in New Issue
Block a user