mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
(testing) add unit tests for LLMCachingHandler Class (#6279)
* add unit testing for test_async_set_cache * test test_async_log_cache_hit_on_callbacks * assert the correct response type is returned * test_convert_cached_result_to_model_response * unit testing for caching handler
This commit is contained in:
parent
202b5cc2cd
commit
f724f3131d
3 changed files with 361 additions and 2 deletions
|
@ -512,7 +512,16 @@ class LLMCachingHandler:
|
|||
model: str,
|
||||
args: Tuple[Any, ...],
|
||||
custom_llm_provider: Optional[str] = None,
|
||||
) -> Optional[Any]:
|
||||
) -> Optional[
|
||||
Union[
|
||||
ModelResponse,
|
||||
TextCompletionResponse,
|
||||
EmbeddingResponse,
|
||||
RerankResponse,
|
||||
TranscriptionResponse,
|
||||
CustomStreamWrapper,
|
||||
]
|
||||
]:
|
||||
"""
|
||||
Internal method to process the cached result
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue