MCPcopy Create free account
hub / github.com/Paper2Poster/Paper2Poster / token_counter

Method token_counter

camel/models/samba_model.py:110–119  ·  view source on GitHub ↗

r"""Initialize the token counter for the model backend. Returns: BaseTokenCounter: The token counter following the model's tokenization style.

(self)

Source from the content-addressed store, hash-verified

108
109 @property
110 def token_counter(self) -> BaseTokenCounter:
111 r"""Initialize the token counter for the model backend.
112
113 Returns:
114 BaseTokenCounter: The token counter following the model's
115 tokenization style.
116 """
117 if not self._token_counter:
118 self._token_counter = OpenAITokenCounter(ModelType.GPT_4O_MINI)
119 return self._token_counter
120
121 def check_model_config(self):
122 r"""Check whether the model configuration contains any

Callers

nothing calls this directly

Calls 1

OpenAITokenCounterClass · 0.90

Tested by

no test coverage detected