-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Add MagenticOne CLI #4788
Merged
Merged
Add MagenticOne CLI #4788
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ekzhu
approved these changes
Dec 23, 2024
python/packages/autogen-ext/src/autogen_ext/teams/magentic_one_cli.py
Outdated
Show resolved
Hide resolved
gagb
added a commit
that referenced
this pull request
Dec 24, 2024
* Add MagenticOne API * Add CodeExecutorAgent to MagenticOne for enhanced task execution * Refactor MagenticOne class to inherit from MagenticOneGroupChat and streamline initialization * Enhance MagenticOne class documentation with detailed usage examples and initialization instructions * Refactor MagenticOne module structure and update import paths * Remove unused imports * Add documentation for MagenticOne module and remove redundant initialization comments * Enhance MagenticOne class with human-in-the-loop mode and update examples * Update MagenticOne class documentation with safety precautions and architecture details * Run poe format * Add blog post reference to MagenticOne class documentation * change default of websurfer use_ocr to false because of refusals * Refactor MagenticOne class to use ChatCompletionClient instead of OpenAIChatCompletionClient * Add client capability validation to MagenticOne initialization * Poe format * Refactor imports in MagenticOne class for clarity and organization * Add stacklevel parameter to warning in client capability validation * Update README to recommend using Magentic-One API for improved integration * Add create_args property to OpenAIChatCompletionClient for better access to initialization arguments * Enhance client capability validation in MagenticOne to ensure compatibility with OpenAI GPT-4o model * Refactor client capability validation in MagenticOne for improved clarity * Update magentic_one.py Co-authored-by: Eric Zhu <[email protected]> * Remove create_args property from OpenAIChatCompletionClient and update validation logic in MagenticOne to directly access _create_args * Refactor documentation in MagenticOne for improved readability and consistency * Refactor client capability validation in MagenticOne to remove unnecessary model check for GPT-4o * Add MagenticOne CLI (#4788) * Add MagenticOne CLI script for task execution with OpenAI GPT-4o integration * Fix argument parsing in MagenticOne CLI to require a single task input * Add docstring to main function in MagenticOne CLI for improved usage clarity * Fix example usage in docstring of MagenticOne CLI for correct argument order * Refactor argument parsing in MagenticOne CLI for improved clarity and consistency * Add type hints to run_task function in MagenticOne CLI * Add type hint for main function in MagenticOne CLI * Remove type ignore from main function call in MagenticOne CLI --------- Co-authored-by: Hussein Mozannar <[email protected]> Co-authored-by: Eric Zhu <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Extends #4782
This pull request introduces a new CLI tool for running tasks using the MagenticOne model and updates the project configuration to include this new script. The most important changes include adding the script entry point to the project configuration and implementing the CLI tool itself.
Usage:
pip install autogen_ext m1 "How many people are there in MSR HAX group"
Project Configuration Updates:
python/packages/autogen-ext/pyproject.toml
: Added a new script entry pointm1
for theautogen_ext.teams.magentic_one_cli:main
function.New CLI Tool Implementation:
python/packages/autogen-ext/src/autogen_ext/teams/magentic_one_cli.py
: Implemented a new CLI tool that allows users to run complex tasks using the MagenticOne model, with optional human-in-the-loop mode.Screen.Recording.2024-12-22.at.6.24.31.PM.mov