#In a group chat, Code Execution never starts

5 messages · Page 1 of 1 (latest)

orchid tapir
#

I have 3 roles:

seo_specialist, developer, product_manager
and a user_proxy

The task is to scrape web page, extract product description and build a list of keywords

After the first round, senior developer comes up with a code block:

senior_developer (to chat_manager):

Here's the code to scrape the product page and extract the product description, meta description, and keywords:

import requests
from bs4 import BeautifulSoup
...

But chat manager does not forward it to user_proxy for execution. I tried with docker, and without it. Tried it on gtp-3 and gpt-4, no luck

updated to latest pre-version pyautogen==0.2.0b4

dreamy lava
#

did you specify a system_message for the user proxy? The groupchat manager needs that info

orchid tapir
# dreamy lava did you specify a system_message for the user proxy? The groupchat manager needs...

That's my case:

user_proxy = autogen.UserProxyAgent(
name="user_proxy",
human_input_mode="NEVER",
max_consecutive_auto_reply=10,
is_termination_msg=lambda x: x.get("content", "").rstrip().endswith("TERMINATE"),
code_execution_config={
"work_dir": "research",
"use_docker": False, # set to True or image name like "python:3" to use docker
},
system_message=""""Executor. Execute the code written by the engineer and report the result.
"""
)

dreamy lava
#

What about changing the name to be "Executor"?

orchid tapir
#

yep, I construct UserProxyAgent differently:

user_proxy = autogen.UserProxyAgent(
name="Executor",
system_message="Executor. Execute the code written by the engineer and report the result.",
human_input_mode="NEVER",
code_execution_config={"last_n_messages": 3, "work_dir": "paper"},
)

now it started to execute.

I was considering UserProxy to perform always as an code executor, which seems to be wrong