mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-16 23:41:43 +00:00
(test) test chunk_ids match across chunks for bedrock
This commit is contained in:
parent
d455833dfb
commit
64a387d09b
1 changed files with 7 additions and 0 deletions
|
|
@ -733,8 +733,15 @@ def test_completion_bedrock_claude_stream():
|
|||
complete_response = ""
|
||||
has_finish_reason = False
|
||||
# Add any assertions here to check the response
|
||||
first_chunk_id = None
|
||||
for idx, chunk in enumerate(response):
|
||||
# print
|
||||
if idx == 0:
|
||||
first_chunk_id = chunk.id
|
||||
else:
|
||||
assert (
|
||||
chunk.id == first_chunk_id
|
||||
), f"chunk ids do not match: {chunk.id} != first chunk id{first_chunk_id}"
|
||||
chunk, finished = streaming_format_tests(idx, chunk)
|
||||
has_finish_reason = finished
|
||||
complete_response += chunk
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue