mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-16 23:41:43 +00:00
(test) same response id across chunks
This commit is contained in:
parent
39b4f19bd8
commit
d455833dfb
1 changed files with 8 additions and 2 deletions
|
|
@ -1408,9 +1408,15 @@ def test_completion_sagemaker_stream():
|
|||
)
|
||||
|
||||
complete_streaming_response = ""
|
||||
|
||||
for chunk in response:
|
||||
first_chunk_id, chunk_id = None, None
|
||||
for i, chunk in enumerate(response):
|
||||
print(chunk)
|
||||
chunk_id = chunk.id
|
||||
print(chunk_id)
|
||||
if i == 0:
|
||||
first_chunk_id = chunk_id
|
||||
else:
|
||||
assert chunk_id == first_chunk_id
|
||||
complete_streaming_response += chunk.choices[0].delta.content or ""
|
||||
# Add any assertions here to check the response
|
||||
# print(response)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue