Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/e-p-armstrong/augmentoolkit
/ count_tokens
Function
count_tokens
generation/core_components/chunking.py:206–207 ·
view source on GitHub ↗
(message)
Source
from the content-addressed store, hash-verified
204
205
206
def
count_tokens(message):
207
return
len(tokenizer.encode(message))
208
209
210
def
count_tokens_specific_model(model):
Callers
11
check_token_length
Function · 0.90
inner
Function · 0.90
find_message_exceeding_threshold
Function · 0.90
simple_chat_loop
Function · 0.70
chunking_algorithm_file
Function · 0.70
chunking_algorithm_str
Function · 0.70
format_conversation_history
Function · 0.70
submit_chat_to_server
Function · 0.50
submit_chat_to_server
Function · 0.50
submit_chat_to_server_streaming
Function · 0.50
rptoolkit_pipeline
Function · 0.50
Calls
no outgoing calls
Tested by
no test coverage detected