Skip to content

Adding autogen integration#57

Draft
manfredcalvo wants to merge 3 commits into
databricks:mainfrom
manfredcalvo:autogen_integration_dic_2024
Draft

Adding autogen integration#57
manfredcalvo wants to merge 3 commits into
databricks:mainfrom
manfredcalvo:autogen_integration_dic_2024

Conversation

@manfredcalvo

Copy link
Copy Markdown

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

FMurray commented Dec 18, 2024

Copy link
Copy Markdown

@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
Copy Markdown

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

@manfredcalvo manfredcalvo Dec 19, 2024

Copy link
Copy Markdown
Author

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

manfredcalvo commented Dec 19, 2024

Copy link
Copy Markdown
Author

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