diff --git a/python/packages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_magentic_one/_magentic_one_orchestrator.py b/python/packages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_magentic_one/_magentic_one_orchestrator.py index b328ba308bd9..f0f927ac5a1c 100644 --- a/python/packages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_magentic_one/_magentic_one_orchestrator.py +++ b/python/packages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_magentic_one/_magentic_one_orchestrator.py @@ -1,5 +1,6 @@ import json import logging +import re from typing import Any, Dict, List, Mapping from autogen_core import AgentId, CancellationToken, DefaultTopicId, MessageContext, event, rpc @@ -80,14 +81,12 @@ def __init__( self._plan = "" self._n_rounds = 0 self._n_stalls = 0 - self._team_description = "\n".join( - [ - f"{topic_type}: {description}".strip() - for topic_type, description in zip( - self._participant_topic_types, self._participant_descriptions, strict=True - ) - ] - ) + + # Produce a team description. Each agent sould appear on a single line. + self._team_description = "" + for topic_type, description in zip(self._participant_topic_types, self._participant_descriptions, strict=True): + self._team_description += re.sub(r"\s+", " ", f"{topic_type}: {description}").strip() + "\n" + self._team_description = self._team_description.strip() def _get_task_ledger_facts_prompt(self, task: str) -> str: return ORCHESTRATOR_TASK_LEDGER_FACTS_PROMPT.format(task=task) diff --git a/python/packages/autogen-ext/src/autogen_ext/agents/web_surfer/_multimodal_web_surfer.py b/python/packages/autogen-ext/src/autogen_ext/agents/web_surfer/_multimodal_web_surfer.py index b848ae8f59ba..90ddbdb2b9c0 100644 --- a/python/packages/autogen-ext/src/autogen_ext/agents/web_surfer/_multimodal_web_surfer.py +++ b/python/packages/autogen-ext/src/autogen_ext/agents/web_surfer/_multimodal_web_surfer.py @@ -176,9 +176,9 @@ async def main() -> None: DEFAULT_DESCRIPTION = """ A helpful assistant with access to a web browser. - Ask them to perform web searches, open pages, and interact with content (e.g., clicking links, scrolling the viewport, etc., filling in form fields, etc.). + Ask them to perform web searches, open pages, and interact with content (e.g., clicking links, scrolling the viewport, filling in form fields, etc.). It can also summarize the entire page, or answer questions based on the content of the page. - It can also be asked to sleep and wait for pages to load, in cases where the pages seem to be taking a while to load. + It can also be asked to sleep and wait for pages to load, in cases where the page seems not yet fully loaded. """ DEFAULT_START_PAGE = "https://www.bing.com/"