stricter caching

This commit is contained in:
ishaan-jaff 2023-08-10 14:54:17 -07:00
parent 35bb67c2de
commit e664797b48

View file

@ -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}")