The changes in this PR update the test_chat_stream and test_stream_equals_true functions in the test_async_client.py and test_client.py files.
Summary
The test_chat_stream function now collects chat_event.event_type in a set called events during the loop iteration.
Additional assertions have been added to test_chat_stream to ensure that specific event types ("text-generation", "stream-start", and "stream-end") are present in the events set.
The test_stream_equals_true function now includes a ValueError assertion for the co.chat call.
Details
test_async_client.py:
The test_chat_stream function now collects chat_event.event_type in a set called events during the asynchronous loop iteration.
Additional assertions have been added to test_chat_stream to ensure that the "text-generation", "stream-start", and "stream-end" event types are present in the events set.
test_client.py:
The test_chat_stream function now collects chat_event.event_type in a set called events during the loop iteration.
Additional assertions have been added to test_chat_stream to ensure that the "text-generation", "stream-start", and "stream-end" event types are present in the events set.
The test_stream_equals_true function now includes a ValueError assertion for the co.chat call.
The changes in this PR update the
test_chat_stream
andtest_stream_equals_true
functions in thetest_async_client.py
andtest_client.py
files.Summary
test_chat_stream
function now collectschat_event.event_type
in a set calledevents
during the loop iteration.test_chat_stream
to ensure that specific event types ("text-generation", "stream-start", and "stream-end") are present in theevents
set.test_stream_equals_true
function now includes aValueError
assertion for theco.chat
call.Details
test_async_client.py
:test_chat_stream
function now collectschat_event.event_type
in a set calledevents
during the asynchronous loop iteration.test_chat_stream
to ensure that the "text-generation", "stream-start", and "stream-end" event types are present in theevents
set.test_client.py
:test_chat_stream
function now collectschat_event.event_type
in a set calledevents
during the loop iteration.test_chat_stream
to ensure that the "text-generation", "stream-start", and "stream-end" event types are present in theevents
set.test_stream_equals_true
function now includes aValueError
assertion for theco.chat
call.