Skip to content

Commit

Permalink
fix type
Browse files Browse the repository at this point in the history
  • Loading branch information
gmpetrov committed May 14, 2024
1 parent 3fbfd38 commit 1a060d6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/lib/tokens-estimate/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ export function promptTokensEstimate({
tool_choice === 'none'
? 1
: stringTokens(
tool_choice?.function?.name || '',
(tool_choice as ChatCompletionNamedToolChoice)?.function?.name ||
'',
useFastApproximation
) + 4;
}
Expand Down

0 comments on commit 1a060d6

Please sign in to comment.