mirror of
https://github.com/Skyvern-AI/skyvern.git
synced 2026-04-29 12:10:28 +00:00
5 lines
121 B
Python
5 lines
121 B
Python
import tiktoken
|
|
|
|
|
|
def count_tokens(text: str) -> int:
|
|
return len(tiktoken.encoding_for_model("gpt-4o").encode(text))
|