Make a completion request and return response with usage stats.
(
self,
model: str,
messages: List[Dict[str, Any]],
**kwargs,
)
| 148 | return litellm.completion(**completion_kwargs) |
| 149 | |
| 150 | def completion_with_usage( |
| 151 | self, |
| 152 | model: str, |
| 153 | messages: List[Dict[str, Any]], |
| 154 | **kwargs, |
| 155 | ) -> Tuple[Any, Dict[str, int]]: |
| 156 | """Make a completion request and return response with usage stats.""" |
| 157 | response = self.completion(model=model, messages=messages, **kwargs) |
| 158 | usage = extract_token_usage(response.usage) |
| 159 | return response, usage |
| 160 | |
| 161 | |
| 162 | _default_client: Optional[LLMClient] = None |
nothing calls this directly
no test coverage detected