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

Method token_limit

camel/models/base_model.py:146–158  ·  view source on GitHub ↗

r"""Returns the maximum token limit for a given model. This method retrieves the maximum token limit either from the `model_config_dict` or from the model's default token limit. Returns: int: The maximum token limit for the given model.

(self)

Source from the content-addressed store, hash-verified

144
145 @property
146 def token_limit(self) -> int:
147 r"""Returns the maximum token limit for a given model.
148
149 This method retrieves the maximum token limit either from the
150 `model_config_dict` or from the model's default token limit.
151
152 Returns:
153 int: The maximum token limit for the given model.
154 """
155 return (
156 self.model_config_dict.get("max_tokens")
157 or self.model_type.token_limit
158 )
159
160 @property
161 def stream(self) -> bool:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected