-
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 API #4782
Open
gagb
wants to merge
23
commits into
main
Choose a base branch
from
gagb-magentic
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+160
−2
Open
Add MagenticOne API #4782
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
a710b23
Add MagenticOne API
gagb 04bab6a
Add CodeExecutorAgent to MagenticOne for enhanced task execution
gagb ed1fbd2
Refactor MagenticOne class to inherit from MagenticOneGroupChat and s…
gagb d3cc745
Enhance MagenticOne class documentation with detailed usage examples …
gagb 5232e4b
Refactor MagenticOne module structure and update import paths
gagb 8f3e655
Remove unused imports
gagb 52ae9d3
Add documentation for MagenticOne module and remove redundant initial…
gagb bcd05e7
Merge branch 'main' into gagb-magentic
husseinmozannar ce54a24
Enhance MagenticOne class with human-in-the-loop mode and update exam…
gagb a949095
Update MagenticOne class documentation with safety precautions and ar…
gagb 01598b3
Run poe format
gagb dab681b
Add blog post reference to MagenticOne class documentation
gagb c6fe0c4
change default of websurfer use_ocr to false because of refusals
husseinmozannar 9876ccc
Refactor MagenticOne class to use ChatCompletionClient instead of Ope…
gagb 833a6b2
Merge branch 'gagb-magentic' of github.com:microsoft/autogen into gag…
gagb 592adfa
Add client capability validation to MagenticOne initialization
gagb b414d90
Poe format
gagb 84373be
Refactor imports in MagenticOne class for clarity and organization
gagb 15aa3a8
Add stacklevel parameter to warning in client capability validation
gagb 5c24a95
Update README to recommend using Magentic-One API for improved integr…
gagb f63db65
Add create_args property to OpenAIChatCompletionClient for better acc…
gagb 4d80dd1
Enhance client capability validation in MagenticOne to ensure compati…
gagb 7f02b5b
Refactor client capability validation in MagenticOne for improved cla…
gagb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use
autogen_core.models.ChatCompletionClient
base class instead of concrete class for the argument typeThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did this because we only tested with openai. Do you still think I should change it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I see. Though this client has already been used by many for Ollama models. Also there is AzureOpenAIChatCompletionClient, which we also tested on. So I think we should still update it to use the base class.
Instead of rely on type, I think we need to validate the model capabilities in the constructor -- unless it has already been done in the base class. Sorry on mobile so a bit hard to switch page here.
We can also validate the model name, and raise warning if the model is something we haven't tested.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay good point. I will do this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
I added a private method to the class that validates the client.
I had to expose the
_create_args
inBaseOpenAIChatCompletion
to achieve this.