graphrag-benchmark / utils /token_counter.py
VedantDhavan's picture
Deploy GraphRAG benchmark backend
83aed13
Raw
History Blame Contribute Delete
84 Bytes
def count_tokens(text: str) -> int:
# Approximation
return len(text.split())