Skip to content

Commit 017a1fb

Browse files
committed
fix: remove safetyFactor from local token estimate for the context condensation
1 parent f1faec6 commit 017a1fb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/api/providers/base-provider.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export abstract class BaseProvider implements ApiHandler {
9797
return apiCount
9898
} catch (error) {
9999
const localEstimate = await localCountTokens(content, { useWorker: true })
100-
return localEstimate * this.tokenComparator.getSafetyFactor()
100+
return localEstimate
101101
}
102102
}
103103

@@ -131,6 +131,6 @@ export abstract class BaseProvider implements ApiHandler {
131131
}
132132
}
133133

134-
return localEstimate * this.tokenComparator.getSafetyFactor()
134+
return localEstimate
135135
}
136136
}

0 commit comments

Comments
 (0)