Skip to content

Commit 6d2d249

Browse files
Merge pull request #231 from codeflash-ai/remove-tiktoken
Hotfix for tiktoken removal
2 parents dcc87df + c4a24e8 commit 6d2d249

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

codeflash/code_utils/code_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
def encoded_tokens_len(s: str) -> int:
1414
'''Function for returning the approximate length of the encoded tokens
1515
It's an approximation of BPE encoding (https://cdn.openai.com/better-language-models/language_models_are_unsupervised_multitask_learners.pdf)'''
16-
return len(s)//2
16+
return int(len(s)*0.25)
1717

1818
def get_qualified_name(module_name: str, full_qualified_name: str) -> str:
1919
if not full_qualified_name:

0 commit comments

Comments
 (0)