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)
| 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: |
nothing calls this directly
no outgoing calls
no test coverage detected