MCPcopy Create free account
hub / github.com/WeixiangYAN/ClinicalLab / count_tokens

Method count_tokens

code/inference/evaluators/pulse.py:50–51  ·  view source on GitHub ↗
(self, prompt)

Source from the content-addressed store, hash-verified

48
49 @retry(wait=wait_random_exponential(min=1, max=60), stop=stop_after_attempt(6))
50 def count_tokens(self, prompt):
51 return len(self.tokenizer(prompt)['input_ids'])

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected