Merge pull request #2692 from BerriAI/litellm_streaming_fixes

fix(utils.py): ensure last chunk is always empty delta w/ finish reason
This commit is contained in:
Krish Dholakia 2024-03-25 21:57:04 -07:00 committed by GitHub
commit eb859f5dba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 278 additions and 305 deletions

View file

@ -547,7 +547,7 @@ def test_redis_cache_completion_stream():
response_2_id = ""
for chunk in response2:
print(chunk)
response_2_id += chunk.id
response_2_id = chunk.id
assert (
response_1_id == response_2_id
), f"Response 1 != Response 2. Same params, Response 1{response_1_id} != Response 2{response_2_id}"