From 83537a190c56c4d8a07034f5426b90e7518a6fc4 Mon Sep 17 00:00:00 2001 From: zhijianma Date: Tue, 23 Jul 2024 10:45:59 +0800 Subject: [PATCH] [HOTFIX] Fix msg colored name and enlarge demo image of streaming mode (#357) --- README.md | 4 ++-- README_ZH.md | 4 ++-- src/agentscope/message.py | 5 +++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 960a74b3f..d0f361efe 100644 --- a/README.md +++ b/README.md @@ -43,8 +43,8 @@ Start building LLM-empowered multi-agent applications in an easier way. - new**[2024-07-18]** AgentScope supports streaming mode now! Refer to our [tutorial](https://modelscope.github.io/agentscope/en/tutorial/203-stream.html) and example [conversation in stream mode](https://github.com/modelscope/agentscope/tree/main/examples/conversation_in_stream_mode) for more details.
-agentscope-logo -agentscope-logo +agentscope-logo +agentscope-logo
- new**[2024-07-15]** AgentScope has implemented the Mixture-of-Agents algorithm. Refer to our [MoA example](https://github.com/modelscope/agentscope/blob/main/examples/conversation_mixture_of_agents) for more details. diff --git a/README_ZH.md b/README_ZH.md index 92a5cbbb1..a82e53e12 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -44,8 +44,8 @@ - new**[2024-07-18]** AgentScope 已支持模型流式输出。请参考我们的 [**教程**](https://modelscope.github.io/agentscope/zh_CN/tutorial/203-stream.html) 和 [**流式对话样例**](https://github.com/modelscope/agentscope/tree/main/examples/conversation_in_stream_mode)!
-agentscope-logo -agentscope-logo +agentscope-logo +agentscope-logo
- new**[2024-07-15]** AgentScope 中添加了 Mixture of Agents 算法。使用样例请参考 [MoA 示例](https://github.com/modelscope/agentscope/blob/main/examples/conversation_mixture_of_agents)。 diff --git a/src/agentscope/message.py b/src/agentscope/message.py index 0aed606d3..b93a05275 100644 --- a/src/agentscope/message.py +++ b/src/agentscope/message.py @@ -160,12 +160,13 @@ def __init__( metadata=metadata, **kwargs, ) - if echo: - logger.chat(self) m1, m2 = _map_string_to_color_mark(self.name) self._colored_name = f"{m1}{self.name}{m2}" + if echo: + logger.chat(self) + def formatted_str(self, colored: bool = False) -> str: """Return the formatted string of the message. If the message has an url, the url will be appended to the content.