Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix: Web surfer creating incomplete copy of messages #4050

Open
wants to merge 4 commits into
base: 0.2
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions autogen/agentchat/contrib/web_surfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def _page_down() -> str:
def _find_on_page_ctrl_f(
search_string: Annotated[
str, "The string to search for on the page. This search string supports wildcards like '*'"
]
],
) -> str:
find_result = self.browser.find_on_page(search_string)
header, content = _browser_state()
Expand Down Expand Up @@ -344,7 +344,7 @@ def generate_surfer_reply(

# Clone the messages to give context
self._assistant.chat_messages[self._user_proxy] = list()
history = messages[0 : len(messages) - 1]
history = messages[:]
for message in history:
self._assistant.chat_messages[self._user_proxy].append(message)

Expand Down