Add message id to OpenAI chat response update (#561)

This commit is contained in:
Tao Chen
2025-08-29 12:52:30 -07:00
committed by GitHub
Unverified
parent cc7fb43fde
commit 15f0147164
4 changed files with 12 additions and 0 deletions
@@ -580,6 +580,8 @@ async def test_get_streaming(
messages=chat_history,
):
assert msg is not None
assert msg.message_id is not None
assert msg.response_id is not None
mock_create.assert_awaited_once_with(
model=azure_openai_unit_test_env["AZURE_OPENAI_CHAT_DEPLOYMENT_NAME"],
stream=True,
@@ -683,6 +685,8 @@ async def test_azure_openai_chat_client_streaming() -> None:
async for chunk in response:
assert chunk is not None
assert isinstance(chunk, ChatResponseUpdate)
assert chunk.message_id is not None
assert chunk.response_id is not None
for content in chunk.contents:
if isinstance(content, TextContent) and content.text:
full_message += content.text