We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aad21d0 commit 8128559Copy full SHA for 8128559
codeflash/code_utils/code_utils.py
@@ -10,10 +10,14 @@
10
11
from codeflash.cli_cmds.console import logger
12
13
+
14
def encoded_tokens_len(s: str) -> int:
- '''Function for returning the approximate length of the encoded tokens
15
- 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
+ """Return the approximate length of the encoded tokens.
17
+ It's an approximation of BPE encoding (https://cdn.openai.com/better-language-models/language_models_are_unsupervised_multitask_learners.pdf).
18
+ """
19
+ return len(s) // 2
20
21
22
def get_qualified_name(module_name: str, full_qualified_name: str) -> str:
23
if not full_qualified_name:
0 commit comments