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

Adding autogen integration #57

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

manfredcalvo
Copy link

Related Issues/PRs

None

What changes are proposed in this pull request?

Implement function calling agent using Autogen. Tested with UC tool and vector search retriever tool

How is this PR tested?

I conducted manual tests using the review app and the playground in the Databricks workspace.

Screenshot 2024-12-18 at 12 06 43 PM Screenshot 2024-12-18 at 12 08 47 PM Screenshot 2024-12-18 at 12 05 17 PM Screenshot 2024-12-18 at 12 05 40 PM

@FMurray
Copy link

FMurray commented Dec 18, 2024

@manfredcalvo I know it's not specific to your PR necessarily because you used the openaisdk as a template, but the pattern of having

agents/
-- ...
config/
-- agents/
-- ...

Feels very unclear. Do you have thoughts on how it could be restructured?


FC_AGENT_DEFAULT_YAML_CONFIG_FILE_NAME = "function_calling_agent_config.yaml"

class FunctionCallingAgent(mlflow.pyfunc.PythonModel):
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to wrap this in a pyfunc? I thought MLFlow supported Autogen

Copy link
Author

@manfredcalvo manfredcalvo Dec 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MLflow seems to support only auto-log for autogen; check that here: https://mlflow.org/docs/latest/_modules/mlflow/autogen.html. The tricky part is that to create an agent with two actors (assistant and user), you need two conversable agents, so your model ends up having two objects instead of one, like in langchain/langgraph. I want to explore group chats in the future and see if I can add both actors and have only one object that wraps both.

@manfredcalvo
Copy link
Author

manfredcalvo commented Dec 19, 2024

Feels very unclear. Do you have thoughts on how it could be restructured?

For sure we could change that and keep the config inside the each folder (agents, data_pipeline). Like:

agents/config/FunctionCallingAgentConfig
agents/FunctionCallingAgent

data_pipeline/config/DataPipelineConfig,

so we have info config local to each component (agent, data pipeline, etc).

I did not change that structure because I believe we should agree on a specific approach, make the necessary changes, and then move it to a shared folder that can be accessed by different libraries. The data pipeline folder is identical in both the langgraph and openai_sdk, so once we refactor that we can change the structure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants