AutoGPT
AutoGPT copied to clipboard
Add GPT-4o Mini model to OpenAI provider
User description
Background
The addition of the GPT-4o Mini model to the OpenAI provider will enhance the application's capabilities by providing a model with a higher token limit and support for the function call API. This is necessary for users requiring extensive token usage and advanced API functionalities.
Link to the issue: Add gpt-4o-mini #7479
Changes 🏗️
This pull request includes:
- Adding the GPT-4o Mini model to the OpenAI provider in the
openai.pyfile.- Prompt token cost: 0.15/1,000,000
- Completion token cost: 0.6/1,000,000
- Maximum token limit: 128,000
- Support for function call API
PR Quality Scorecard ✨
- [x] Have you used the PR description template?
+2 pts - [x] Is your pull request atomic, focusing on a single change?
+5 pts - [x] Have you linked the GitHub issue(s) that this PR addresses?
+5 pts - [x] Have you documented your changes clearly and comprehensively?
+5 pts - [ ] Have you changed or added a feature?
-4 pts- [ ] Have you added/updated corresponding documentation?
+4 pts - [ ] Have you added/updated corresponding integration tests?
+5 pts
- [ ] Have you added/updated corresponding documentation?
- [ ] Have you changed the behavior of AutoGPT?
-5 pts- [ ] Have you also run
agbenchmarkto verify that these changes do not regress performance?+10 pts
- [ ] Have you also run
PR Type
Enhancement
Description
- Added the GPT-4o Mini model to the OpenAI provider in the
openai.pyfile. - Defined new model names
GPT4_O_MINI_v1,GPT4_O_MINI_ROLLING, andGPT4_O_MINI. - Set prompt token cost to 0.15/1,000,000 and completion token cost to 0.6/1,000,000 for GPT-4o Mini.
- Established a maximum token limit of 128,000 for GPT-4o Mini.
- Enabled support for the function call API for the GPT-4o Mini model.
Changes walkthrough 📝
| Relevant files | |||
|---|---|---|---|
| Enhancement |
|
💡 PR-Agent usage: Comment
/helpon the PR to get a list of all available PR-Agent tools and their descriptions
Deploy Preview for auto-gpt-docs ready!
| Name | Link |
|---|---|
| Latest commit | 28d3d16fc4e482124e6ccdc54fd97e85ebd19cc6 |
| Latest deploy log | https://app.netlify.com/sites/auto-gpt-docs/deploys/66c5be3af97e20000781fe1d |
| Deploy Preview | https://deploy-preview-7694--auto-gpt-docs.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 57.88%. Comparing base (
0767b17) to head (28d3d16). Report is 222 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #7694 +/- ##
==========================================
+ Coverage 49.63% 57.88% +8.25%
==========================================
Files 146 106 -40
Lines 8926 5768 -3158
Branches 1242 720 -522
==========================================
- Hits 4430 3339 -1091
+ Misses 4348 2316 -2032
+ Partials 148 113 -35
| Flag | Coverage Δ | |
|---|---|---|
| Linux | 57.88% <100.00%> (+8.44%) |
:arrow_up: |
| Windows | ? |
|
| agbenchmark | ? |
|
| autogpt-agent | ? |
|
| forge | 57.88% <100.00%> (-0.16%) |
:arrow_down: |
| macOS | ? |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
PR Description updated to latest commit (https://github.com/Significant-Gravitas/AutoGPT/commit/eaa95ea123822a020220baa593a52aa1a50fb8fd)
- [ ] Copy walkthrough table to "Files Changed" Tab
PR Reviewer Guide 🔍
| ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪ |
| 🧪 No relevant tests |
| 🔒 No security concerns identified |
| ⚡ Key issues to review Consistency Check |
PR Code Suggestions ✨
| Category | Suggestion | Score |
| Maintainability |
Standardize the naming convention for model identifiersConsider using a consistent naming convention for the model identifiers. The new forge/forge/llm/providers/openai.py [79]
Suggestion importance[1-10]: 8Why: The suggestion improves code consistency and readability by standardizing the naming convention, which is important for maintainability. | 8 |
PR Code Suggestions ✨
Category Suggestion Score Maintainability Standardize the naming convention for model identifiers Consider using a consistent naming convention for the model identifiers. The new model identifier
GPT4_O_MINI_v1uses both uppercase and lowercase with an underscore and a hyphen, which is inconsistent with other model identifiers that use only uppercase and underscores.forge/forge/llm/providers/openai.py [79]
-GPT4_O_MINI_v1 = "gpt-4o-mini-2024-07-18" +GPT4_O_MINI_V1 = "gpt-4o-mini-2024-07-18"
- [ ] Apply this suggestion
Suggestion importance[1-10]: 8 8
This suggestion isn't consistent with the casing of the other model names. They use lower case "v1" not "V1" as recommended.
PR Code Suggestions ✨
Category Suggestion Score Maintainability Standardize the naming convention for model identifiers Consider using a consistent naming convention for the model identifiers. The new model identifier
GPT4_O_MINI_v1uses both uppercase and lowercase with an underscore and a hyphen, which is inconsistent with other model identifiers that use only uppercase and underscores. forge/forge/llm/providers/openai.py [79]-GPT4_O_MINI_v1 = "gpt-4o-mini-2024-07-18" +GPT4_O_MINI_V1 = "gpt-4o-mini-2024-07-18"
- [ ] Apply this suggestion
Suggestion importance[1-10]: 8 8
This suggestion isn't consistent with the casing of the other model names. They use lower case "v1" not "V1" as recommended.
No worries, not all of them are always applicable
@Pwuts do you know anything about this chromedriver error?
@ntindle looks like dark magic to me
Hey @ntindle @Pwuts, I have created the PR to address this chromedriver issue along with the support for GPT-4o mini model. https://github.com/Significant-Gravitas/AutoGPT/pull/8007
Thanks
superseeded by #8007