-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
[Bug]: Code execution seems strange for AUTOGEN STUDIO's group chat feature #1423
Comments
Major issue |
I am seeing the same. I have a group chat, and I can see in the chat log that scripts are being suggested, however the bots never create or run those scripts |
@victordibia Is this a known bug? |
Hi @victordibia , this is really sad to see the state of AutogenStudio. Autogenstudio : |
Is it a known bug? I saw some similar issues in the past weeks that seem to relate to this problem. |
MARK! it's very important |
can only get code exeuction to work with two agent chat. once i add the same agents to a group chat, they fail to be able to execute code and return a generic error instead: |
works for me... but maybe my fork is too different @victordibia maybe we should sync up to see the differences and find a way to pull some changes to yours.. theres some dependencies that your autogen doesnt have like persistence but we can work around those things i think |
Would you mind sharing your version for autogenstudio and autogen? Thanks a lot. |
@ALL, The way GroupChat is configured is critical to the behaviors you see.
As an example, I am attaching a sample workflow config that shows a team structured to generate art content. 3 agents
Results are in the attached video. groupchat.mp4 |
@victordibia Thanks for sharing the workflow and video. It still seems strange to me that agents within the groupchat (underneath the groupchatmanager) can't execute any code. It doesnt serve any role separation, meaning I would have to stack all of the skills with the userproxy. Is that correct or am I still missing something? |
Can you explain what you mean by "agents within the groupchat cannot execute code?". |
Thanks @victordibia's great explanation, it helps a lot! Also, it is a bit counterintuitive that you have to add USERPROXY agent again after you click receiver (make sure to add it in group chat agents). It works for me now. @khayyamkhan. |
I added the USERPROXY agent into the groupchat but it still doesnt work. What am I missing here? |
If you'd like to share some more detail maybe I can try to figure out what's going on. |
Hello dear friends! |
@hqnicolas , do you have a user_proxy in your groupchat? Please revew the painter team example above. |
@victordibia yes i'm using userproxy and not user_proxy Two agents example: Just change the LLM to your GPT4 agent and run
|
@victordibia I have edited the original userproxy Here is the Fixed Workflow workflow_Youtube Video Transcript With Group Chat.json Huge Thanks |
Describe the bug
Hi @victordibia, I did a clean installation to test the group chat feature, and it seems the role selection is quite strange when it comes to tool/function calling. From my experience working with autogen's native group chat, the code execution is done by userproxy agent, however, in autogen studio, code execution will be assigned to assistant agent. The assistant agent will try to execute the code but fail for sure, and even hallucinate under certain tries, giving false result (in my case claiming the image is generated but nothing showed up under scratch folder).
Steps to reproduce
Expected Behavior
The tool/function call will not be executed correctly. In my case, an assistant agent will try to execute the code and give false results. It will even hallucinate under certain tries, saying the code is executed successfully and image is being generated, however nothing will present under scratch folder.
Screenshots and logs
Below is the workflow setup:
Workflow Name:
Creative Art Group Workflow
Workflow Description:
Creative Art Group Workflow
Summary Method:
last
Sender:
{"type": "userproxy", "config": {"name": "userproxy", "llm_config": false, "human_input_mode": "NEVER", "max_consecutive_auto_reply": 5, "system_message": "", "is_termination_msg": null, "code_execution_config": {"work_dir": null, "use_docker": false}}, "id": "c98af1ec-af7c-483e-86f6-0d2ec3b4cc05", "timestamp": "2024-01-26T17:20:22.881648", "user_id": "default", "skills": null, "description": "User proxy agent to execute code"}
Receiver (content for skills is not included, it is the default skill comes with dbdefaults.json):
{"type": "groupchat", "config": {"name": "group_chat_manager", "llm_config": {"config_list": [{"model": "gpt-4-1106-preview"}], "temperature": 0.1, "cache_seed": null, "timeout": 600}, "human_input_mode": "NEVER", "max_consecutive_auto_reply": 8, "system_message": "Group chat manager", "is_termination_msg": null, "code_execution_config": null}, "groupchat_config": {"agents": [{"type": "assistant", "config": {"name": "primary_assistant", "llm_config": {"config_list": [{"model": "gpt-4-1106-preview"}], "temperature": 0.1, "cache_seed": null, "timeout": 600}, "human_input_mode": "NEVER", "max_consecutive_auto_reply": 8, "system_message": "You are a helpful assistant that can provide creative art work for a user. You are the primary coordinator who will receive suggestions or advice from other agents (paint_assistant, design_assistant). You must ensure that the finally work integrates the suggestions and results from other agents or team members. YOUR FINAL RESPONSE MUST BE THE COMPLETE PLAN that ends with the word TERMINATE. ", "is_termination_msg": null, "code_execution_config": null}, "id": "c5861e30-0a56-476a-a372-576ffd811682", "timestamp": "2024-01-26T17:20:22.881968", "user_id": "default", "skills": null, "description": null}, {"type": "assistant", "config": {"name": "design_assistant", "llm_config": {"config_list": [{"model": "gpt-4-1106-preview"}], "temperature": 0.1, "cache_seed": null, "timeout": 600}, "human_input_mode": "NEVER", "max_consecutive_auto_reply": 8, "system_message": "You are a creative design assistant that provides design ideas for artists based on user requests.", "is_termination_msg": null, "code_execution_config": null}, "id": "05e3806e-cc76-4959-a9a1-55169b2fd220", "timestamp": "2024-01-26T17:20:22.882009", "user_id": "default", "skills": null, "description": "Design assistant is responsible for the creative design ideas of an art work."}, {"type": "assistant", "config": {"name": "paint_assistant", "llm_config": {"config_list": [{"model": "gpt-4-1106-preview"}], "temperature": 0.1, "cache_seed": null, "timeout": 600}, "human_input_mode": "NEVER", "max_consecutive_auto_reply": 8, "system_message": "You are a helpful assistant that can use available functions when needed to generate painting.", "is_termination_msg": null, "code_execution_config": null}, "id": "9251df00-dd77-4fa4-babe-1d729b59d035", "timestamp": "2024-01-26T17:15:44.452450", "user_id": "default", "skills": [{"title": "generate_images", "file_name": "generate_images.py", "content": (content for generate_images.py), "id": "b8c34d70-e8b3-4df6-aee0-77adfb4e81cc", "description": "This skill generates images from a given query using OpenAI's DALL-E model and saves them to disk.", "timestamp": "2024-01-26T17:15:44.452448", "user_id": "default"}], "description": "A paint assistant agent that code to generate images based on design_assistant's request."}], "admin_name": "groupchat_assistant", "messages": [], "max_round": 10, "speaker_selection_method": "auto", "allow_repeat_speaker": false}, "id": "e673a664-cb9d-473d-b04a-ffd86522f2a3", "timestamp": "2024-01-26T17:20:22.882050", "user_id": "default", "description": ""}
Below is the execution result in console:
Inside the execution result, it seems the execution is successful and the file is created however, nothing is generated under scratch folder!
Also worth noting is that assistant agent (design_assistant) is trying to execute code instead of user proxy agent.
Additional Information
autogenstudio==0.0.33a0
pyautogen==0.2.0
The text was updated successfully, but these errors were encountered: