mirror of
https://github.com/Skyvern-AI/skyvern.git
synced 2026-04-30 20:50:05 +00:00
Some checks failed
Run tests and pre-commit / test (push) Failing after 23s
Publish Fern Docs / run (push) Failing after 46s
Run tests and pre-commit / fe-lint-build (push) Successful in 1m12s
Sync to skyvern-cloud / sync (push) Failing after 2s
Build Skyvern SDK and publish to PyPI / check-version-change (push) Successful in 12s
Build Skyvern SDK and publish to PyPI / run-ci (push) Has been skipped
Build Skyvern SDK and publish to PyPI / build-sdk (push) Has been skipped
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))
|