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

type object 'Team' has no attribute 'load_component' with AutoGen Studio v0.4.0.4 #5319

Closed
qmatteoq opened this issue Feb 1, 2025 · 3 comments
Labels
proj-studio Related to AutoGen Studio.

Comments

@qmatteoq
Copy link

qmatteoq commented Feb 1, 2025

What happened?

I have upgraded my AutoGen Studio installation to 0.4.0.4, which reset my existing team and configuration. As such, I've recreated it from scratch, considering some of the differences with the older version in terms of UI and configuration.

My sample team consists of 3 agents which simulate a rap battle: two agents are hip hop stars (who rap following a given style) and one is the MC, who judges the lyrics. The MC also returns to the participants a list of words that the battle participants must use to generate the lyrics.

The team is configured in the following way:

  • 2 agents who are the rappers, which are using gpt-4o-mini from OpenAI
  • 1 agent who is the MC, which is using gpt-4o-mini and it has as, as tool, a Python function that returns a list of words.
  • Two termination conditions: maximum 10 turns or when one of the agents writes the word TERMINATE.

Everything was working fine until 0.4.0.3a, but now that I switched to 0.4.0.4, as soon as I try to start a session, I get the following error:

type object 'Team' has no attribute 'load_component'
Image

What did you expect to happen?

My multi-agent scenario starts successfully: the rap battle starts and concludes successfully.

How can we reproduce it (as minimally and precisely as possible)?

I'm attaching the JSON configuration of my team (I've just stripped my OpenAI key from it)

team-config.json

AutoGen version

0.4.0.4

Which package was this bug in

AutoGen Studio

Model used

gpt-4o-mini

Python version

3.10

Operating system

Windows 11

Any additional info you think would be helpful for fixing this bug

No response

@victordibia
Copy link
Collaborator

victordibia commented Feb 1, 2025

Hi @qmatteoq ,

Thanks for reporting. Can you show what version autogen_agentchat you are on?
It should be >= 0.4.5. Else, please try out

pip install -U autogen-agentchat

Thanks for pointing this out, I just updated the requirements for autogenstudio to require the correct version of agentchat (0.4.5 and above).

Let me know if you are still facing issues.

@victordibia victordibia added proj-studio Related to AutoGen Studio. and removed needs-triage labels Feb 1, 2025
@qmatteoq
Copy link
Author

qmatteoq commented Feb 1, 2025

Thanks Victor! It seems I got caught in a "half broken" update across two releases. I've tried to update again AutoGen Studio and then I run your command. Everything is working now. Thanks a ton!

@victordibia
Copy link
Collaborator

victordibia commented Feb 1, 2025

Great, thanks for the feedback!

Btw .. did you know that now you can create your agents in python (test and change things) and immediately use the exact same thing in autogenstudio? Any chance you have tried that new feature?

from autogen_agentchat.agents import AssistantAgent
from autogen_agentchat.teams import RoundRobinGroupChat
from autogen_ext.models.openai import OpenAIChatCompletionClient
from autogen_agentchat.conditions import  TextMentionTermination

agent = AssistantAgent(
        name="weather_agent",
        model_client=OpenAIChatCompletionClient(
            model="gpt-4o-mini",
        ),
    )

agent_team = RoundRobinGroupChat([agent], termination_condition=TextMentionTermination("TERMINATE"))
config = agent_team.dump_component()
print(config.model_dump_json())

The json that you can when you run the above can be "pasted" directly into autogenstudio and run.
We will build on this to enable more debug capabilities in Studio. Stay tuned!!

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

2 participants