mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-09 03:18:44 +00:00
stricter caching
This commit is contained in:
parent
35bb67c2de
commit
e664797b48
1 changed files with 2 additions and 3 deletions
|
|
@ -33,11 +33,10 @@ def test_completion_with_cache_gpt4():
|
|||
second_call_time = end-start
|
||||
print(f"second call: {second_call_time}")
|
||||
|
||||
if second_call_time > first_call_time/2:
|
||||
# the 2nd call should be less than half of the first call
|
||||
if second_call_time > 1:
|
||||
# the 2nd call should be less than 1s
|
||||
pytest.fail(f"Cache is not working")
|
||||
# Add any assertions here to check the response
|
||||
print(response)
|
||||
except Exception as e:
|
||||
pytest.fail(f"Error occurred: {e}")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue