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

autogen_core.models should be in a seperate package (autogen_models) #4929

Closed
gabayben opened this issue Jan 7, 2025 · 2 comments
Closed

Comments

@gabayben
Copy link

gabayben commented Jan 7, 2025

I feel strongly that ChatCompletionClient, and the LLMMessage definitions do not belong in autogen_core. It may be the most convenient place to put them, but autogen_core is supposed to be "AI-agnostic", in the sense that it is all about the implementation of the actor-model architecture for agentic systems, and nothing else.

The only places where ChatCompletionClient, LLMMessage and ModelContext are actually used are in autogen_agentchat and autogen_magentic_one.

When building their own agents, developers might not want to use ChatCompletionClient, and may instead opt to use the OpenAI sdk directly, or perhaps use their own client.

autogen_core also has a dependency on openai, which doesn't make sense, again, because it is supposed to be unaware of that stuff.

There is no better time than now to migigate these mistakes early on. I strongly suggest to move ChatCompletionClient, all LLM-related definitions, and autogen_core.tools to an autogen_models package before the official release of 0.4.

autogen_agentchat can have a dependency on autogen_models, and autogen_models can have a dependency on autogen_core.

It's possible that autogen_models may not even need a dependency on autogen_core. In which case, autogen_agentchat can have a dependency on both autogen_models and autogen_core.

@jackgerrits
Copy link
Member

Thanks for opening the discussion, when we started down the path of splitting up the packages we did consider more fine grained packages than what we've landed on here. However, we opted for simply core, agentchat and ext to reduce the number of places to search and reduce the burden of developing and maintaining. It's already a bit confusing to know which package you should be importing from for some things and we didn't want to make that worse.

The intention of the core package is to provide the foundational interfaces (and a few limited implementations) that all other packages and extensions implement and rely on. It includes the actor framework, but it is not meant to be an "AI-agnostic" package. We might need to update the descriptions to make this clearer.

You're right core is meant to be lean and the OpenAI dependency was a left over from an earlier time. I actually removed that dependecy only hours before you opened this issue (#4919).

@gabayben
Copy link
Author

gabayben commented Jan 8, 2025

Ok I see. That makes sense. I will close this issue.

@gabayben gabayben closed this as completed Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants