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

Enable Tool Calls #3512

Draft
wants to merge 5 commits into
base: autogenstudio
Choose a base branch
from

Conversation

SailorJoe6
Copy link
Collaborator

Why are these changes needed?

AutoGen supports the OpenAI "tool calls" API but AutoGenStudio lacks support. Instead, the "Skills" in AutoGenStudio are currently handled via standard code execution, which doesn't always work as expected, especially when the code execution environment is Docker.

Related issue number

addresses roadmap #3058

Checks

@SailorJoe6
Copy link
Collaborator Author

@victordibia - Here you go. Let me know what you think.

if sender_configs and receiver_configs:
self._connect_tools(sender_configs, receiver_configs)
else:
raise ValueError("parameter 'use_tool_calls' invalid with hard-coded Agents")
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ooof... another experiment I was doing. Never mind the "hard coded agents" message. I'll get that out of there.

@SailorJoe6
Copy link
Collaborator Author

Hey @victordibia, I was thinking about the conversation we were having in the older PR.
Salient points for reference:

  • Configuring for Tool Calls should be done on the Agent or on the Workflow? (current thinking is on the Agent)
  • Currently only have a tools_call flag, we will modify later with an agent field
  • Will use a down and dirty hack for DB update, and then a more organized alembic upgrade process later on.

So, I thought of a reason we may want to configure tool calls on the Workflow after all. When configuring tool calls in code, there always needs to be 2 agents. 1) You have to decide which agent gets to call the tool, and 2) choose which agent will execute it. In the current iteration of this code, I always chose the Agent that has the "Skill" as the Agent who gets to call the code. Then, I randomly pick any old Agent to execute it (because it seemed to hardly matter to me). This works. However, I realized users may want to choose a UserProxy with Human_Input_Mode = always so they can intercept tool calls and decide if they agree or disagree with the tool being chosen.

Anyway, food for thought.

…underlying AutoGen framework is just populating history.
- Add constants to control tool calls on or off
- Bug fix for Agents are dicts work when running from a local JSON file
- Trying to get a good display of tool call arguments. (+1 squashed commit)
@jackgerrits jackgerrits added the proj-studio Related to AutoGen Studio. label Sep 26, 2024
@rysweet
Copy link
Collaborator

rysweet commented Oct 10, 2024

This PR is against AutoGen 0.2. AutoGen 0.2 has been moved to the 0.2 branch. Please rebase your PR on the 0.2 branch or update it to work with the new AutoGen 0.4 that is now in main.

1 similar comment
@rysweet
Copy link
Collaborator

rysweet commented Oct 10, 2024

This PR is against AutoGen 0.2. AutoGen 0.2 has been moved to the 0.2 branch. Please rebase your PR on the 0.2 branch or update it to work with the new AutoGen 0.4 that is now in main.

@rysweet rysweet added 0.2 Issues which are related to the pre 0.4 codebase awaiting-op-response Issue or pr has been triaged or responded to and is now awaiting a reply from the original poster labels Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.2 Issues which are related to the pre 0.4 codebase awaiting-op-response Issue or pr has been triaged or responded to and is now awaiting a reply from the original poster proj-studio Related to AutoGen Studio.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants