diff --git a/tests/ci_use/EB_Lite/test_EB_Lite_serving.py b/tests/ci_use/EB_Lite/test_EB_Lite_serving.py index 0c73f0c04..5279a71e3 100644 --- a/tests/ci_use/EB_Lite/test_EB_Lite_serving.py +++ b/tests/ci_use/EB_Lite/test_EB_Lite_serving.py @@ -385,14 +385,14 @@ def test_streaming_with_stop_str(openai_client): messages=[{"role": "user", "content": "Hello, how are you?"}], temperature=1, max_tokens=5, - extra_body={"include_stop_str_in_output": True}, + extra_body={"min_tokens": 1, "include_stop_str_in_output": True}, stream=True, ) # Assertions to check the response structure last_token = "" for chunk in response: last_token = chunk.choices[0].delta.content - assert last_token.endswith("") + assert last_token.endswith(""), f"last_token did not end with '': {last_token!r}" response = openai_client.chat.completions.create( model="default", diff --git a/tests/e2e/test_EB_Lite_serving.py b/tests/e2e/test_EB_Lite_serving.py index b959ffcdc..64bee78c1 100644 --- a/tests/e2e/test_EB_Lite_serving.py +++ b/tests/e2e/test_EB_Lite_serving.py @@ -539,14 +539,14 @@ def test_streaming_with_stop_str(openai_client): messages=[{"role": "user", "content": "Hello, how are you?"}], temperature=1, max_tokens=5, - extra_body={"include_stop_str_in_output": True}, + extra_body={"min_tokens": 1, "include_stop_str_in_output": True}, stream=True, ) # Assertions to check the response structure last_token = "" for chunk in response: last_token = chunk.choices[0].delta.content - assert last_token.endswith("") + assert last_token.endswith(""), f"last_token did not end with '': {last_token!r}" response = openai_client.chat.completions.create( model="default",