From b69751d88f4ed01a19ae8bdfe1c6ac062be1ea9a Mon Sep 17 00:00:00 2001 From: DavidYu00 <125090336+DavidYu00@users.noreply.github.com> Date: Sat, 8 Mar 2025 22:45:49 -0500 Subject: [PATCH] Add author name before their message in Chainlit team sample (#5878) ## Why are these changes needed? This PR makes it clear which agent is speaking per message in the Chainlit team sample. Previously, messages would be exchanged without showing who is communicating. ## Related issue number Closes #5609 ## Checks - [x] I've included any doc changes needed for . See to build and test documentation locally. - [x] I've added tests (if relevant) corresponding to the changes introduced in this PR. - [x] I've made sure all auto checks have passed. Co-authored-by: Eric Zhu --- python/samples/agentchat_chainlit/app_team.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/samples/agentchat_chainlit/app_team.py b/python/samples/agentchat_chainlit/app_team.py index ef47205d5..c9d30aeb6 100644 --- a/python/samples/agentchat_chainlit/app_team.py +++ b/python/samples/agentchat_chainlit/app_team.py @@ -79,7 +79,7 @@ async def chat(message: cl.Message) -> None: # Stream the model client response to the user. if streaming_response is None: # Start a new streaming response. - streaming_response = cl.Message(content="", author=msg.source) + streaming_response = cl.Message(content=msg.source + ": ", author=msg.source) await streaming_response.stream_token(msg.content) elif streaming_response is not None: # Done streaming the model client response.