[CI] fix test_chat_truncation_content_not_null test (#31488)

Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
This commit is contained in:
Chauncey
2025-12-29 20:47:08 +08:00
committed by GitHub
parent bf73a3e4d7
commit 48d5ca4e8b

View File

@@ -999,9 +999,15 @@ async def test_function_call_with_previous_input_messages(
async def test_chat_truncation_content_not_null(client: OpenAI, model_name: str):
response = await client.chat.completions.create(
model=model_name,
messages=[{"role": "user", "content": "What is the role of AI in medicine?"}],
messages=[
{
"role": "user",
"content": "What is the role of AI in medicine?"
"The response must exceed 350 words.",
}
],
temperature=0.0,
max_tokens=250,
max_tokens=350,
)
choice = response.choices[0]