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

[Bug]: 'GroupChatManager' object has no attribute '_groupchat' #1641

Closed
MehrCurry opened this issue Feb 12, 2024 · 13 comments
Closed

[Bug]: 'GroupChatManager' object has no attribute '_groupchat' #1641

MehrCurry opened this issue Feb 12, 2024 · 13 comments
Labels
proj-studio Related to AutoGen Studio.

Comments

@MehrCurry
Copy link

Describe the bug

I created a group chat workflow and on the first input i get an error:

  File "/Users/gzo/.pyenv/versions/3.11.6/lib/python3.11/site-packages/autogenstudio/web/app.py", line 70, in add_message
    response_message: Message = chatmanager.chat(
                                ^^^^^^^^^^^^^^^^^
  File "/Users/gzo/.pyenv/versions/3.11.6/lib/python3.11/site-packages/autogenstudio/chatmanager.py", line 22, in chat
    flow = AutoGenWorkFlowManager(config=flow_config, history=history, work_dir=scratch_dir)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/gzo/.pyenv/versions/3.11.6/lib/python3.11/site-packages/autogenstudio/workflowmanager.py", line 41, in __init__
    self.receiver._groupchat.agents = self.receiver._groupchat.agents + \
                                      ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'GroupChatManager' object has no attribute '_groupchat'

Steps to reproduce

  1. create an group chat workflow with two primary agents (default)
  2. Run the workflow with a simple question: "What is a smart meter?"

Expected Behavior

The agents should try to get the answer.

Screenshots and logs

No response

Additional Information

Autogen: autogenstudio-0.0.44a0
OS: MacOS
Python Version: 3.11.6

This happens with all group chat workflows. I also tried the travel agent workflow.

@MehrCurry MehrCurry added the bug label Feb 12, 2024
@MehrCurry MehrCurry changed the title [Bug]: [Bug]: 'GroupChatManager' object has no attribute '_groupchat' Feb 12, 2024
@victordibia victordibia added the proj-studio Related to AutoGen Studio. label Feb 12, 2024
@victordibia
Copy link
Collaborator

Hi @MehrCurry,

This may be related to a regression in v0.0.43a
Can you update your autogenstudio to the latest version and let me know if you are still having these issues.

pip install -U autogenstudio 

@MehrCurry
Copy link
Author

MehrCurry commented Feb 13, 2024

Looks good. I tried deinstalling and reinstalling before but that does not solved the problem. Your solution did the trick.
Thank you.

@MehrCurry
Copy link
Author

That was too early. With my new installation and started with a fresh appdir, the Gerneral Agent Workflow works. But the Travel Agent Workflow again comes with that message:

Traceback (most recent call last):
  File "/Users/gzo/.pyenv/versions/3.11.6/lib/python3.11/site-packages/autogenstudio/web/app.py", line 70, in add_message
    response_message: Message = chatmanager.chat(
                                ^^^^^^^^^^^^^^^^^
  File "/Users/gzo/.pyenv/versions/3.11.6/lib/python3.11/site-packages/autogenstudio/chatmanager.py", line 22, in chat
    flow = AutoGenWorkFlowManager(config=flow_config, history=history, work_dir=scratch_dir)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/gzo/.pyenv/versions/3.11.6/lib/python3.11/site-packages/autogenstudio/workflowmanager.py", line 41, in __init__
    self.receiver._groupchat.agents = self.receiver._groupchat.agents + \
                                      ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'GroupChatManager' object has no attribute '_groupchat'

@MehrCurry MehrCurry reopened this Feb 13, 2024
@MehrCurry
Copy link
Author

Seems my environment has an influence. I create a Dockerfile and when starting Studio from within docker every thing runs fine.

FROM python:3.11

COPY requirements.txt /app/

WORKDIR /app

RUN pip install --upgrade pip && pip install -r requirements.txt

# Set the path
ENV PATH="/home/app/.local/bin:${PATH}"

VOLUME [ "/data" ]

EXPOSE 8081

CMD ["autogenstudio", "ui", "--host", "0.0.0.0", "--port", "8081", "--appdir", "/data"]
docker build -t ags .
docker run -it --rm -p 8081:8081 --env-file .env ags

@victordibia
Copy link
Collaborator

In your requirements.txt can you add a version
eg

autogenstudio>=0.0.44a

The reason is because sometimes docker will use previous caches images or versions or libraries of the docker file is unchanged.

@PirateUnderAPalm
Copy link

I am on Linux and ran:
pip install -U autogenstudio

and I am seeing the same issue. I am running 0.0.44a and I am still seeing this error message for the group chat managers.

@jamiluamsft
Copy link

I had the same issue with 0.0.44a and was able to resolve the issue by going back to 0.0.42a. (I have not had a chance to debug 0.0.44a to find out what the breaking change might have been yet though).

@LordProfit
Copy link

Same issue

@junaidtitan
Copy link

Was anyone able to get past this? I've hit a brick wall.

@HENECIASS501
Copy link

HENECIASS501 commented Feb 26, 2024

same issue,i tried to solve this by going back to 0.0.42a,but it didn't work.

@junaidtitan
Copy link

junaidtitan commented Feb 26, 2024 via email

@victordibia
Copy link
Collaborator

Hi,
Can you share your autogenstudio version ? Ie pip show autogenstudio.

Also, please upgrade to the latest version and confirm you still see this error.

pip install -U autogenstudio

@junaidtitan
Copy link

junaidtitan commented Mar 29, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proj-studio Related to AutoGen Studio.
Projects
None yet
Development

No branches or pull requests

7 participants