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
feat(forge/llm): Add GroqProvider
#7130
Conversation
✅ Deploy Preview for auto-gpt-docs canceled.
|
PR Description updated to latest commit (976396c)
|
PR Review 🔍
|
PR Code Suggestions ✨
|
Changelog updates: 🔄 2024-05-07Added
|
PR Analysis 🔬
💡 Usage guide:Using static code analysis capabilities, the The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on any PR:
Language that are currently supported: Python, Java, C++, JavaScript, TypeScript, C#. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #7130 +/- ##
=======================================
Coverage 36.05% 36.05%
=======================================
Files 19 19
Lines 1273 1273
Branches 182 182
=======================================
Hits 459 459
Misses 786 786
Partials 28 28
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -23,6 +23,7 @@ Configuration is controlled through the `Config` object. You can set configurati | |||
- `GITHUB_USERNAME`: GitHub Username. Optional. | |||
- `GOOGLE_API_KEY`: Google API key. Optional. | |||
- `GOOGLE_CUSTOM_SEARCH_ENGINE_ID`: [Google custom search engine ID](https://programmablesearchengine.google.com/controlpanel/all). Optional. | |||
- `GROQ_API_KEY`: Set this if you want to use Groq models with AutoGPT |
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.
GROQ_API_BASE
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.
Technically available, but relevant?
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.
Imo we should treat this as up to date as possible
autogpts/autogpt/autogpt/core/resource/model_providers/multi.py
Outdated
Show resolved
Hide resolved
Why do we need a new provider, when Groq is compatible with OpenAI and just needs the base_url changing? |
We would want a provider to support additional models with different features, costs, and requirements than OpenAI. Currently, we support anthropic and OpenAI, and both require different things like the above. In the future, this is where things like a rate limit to prevent overages would live as well. |
This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request. |
Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly. |
GroqProvider
GroqProvider
@@ -355,7 +355,7 @@ uvicorn = "^0.23.2" | |||
webdriver-manager = "^4.0.1" | |||
|
|||
[package.extras] | |||
benchmark = ["agbenchmark @ file:///Users/czerwinski/Projects/AutoGPT/benchmark"] | |||
benchmark = ["agbenchmark @ file:///home/reinier/code/agpt/Auto-GPT/benchmark"] |
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.
is there a way to do this relative??????????
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.
In pyproject.toml
it is relative, but poetry.lock resolves it to an absolute path. Luckily this doesn't break it on other systems (afaik)
Background
This has issues with the profile generator, so maybe merge #7121 first
Changes 🏗️
Add
GroqProvider
inforge.llm.providers.groq
llm.providers.multi
groq
dependency (v0.8.0)Update AutoGPT docs & config template
PR Quality Scorecard ✨
+2 pts
+5 pts
+5 pts
+5 pts
-4 pts
+4 pts
+5 pts
-5 pts
agbenchmark
to verify that these changes do not regress performance?+10 pts
PR Type
Enhancement
Description
GroqProvider
to manage interactions with the Groq API, including methods for chat completions and API retries.multi.py
to integrateGroqProvider
alongside other model providers.ModelProviderName
enum to includeGROQ
.groq
package to project dependencies to ensure API interaction capabilities.Changes walkthrough 📝
groq.py
Implement GroqProvider for Groq API Interaction
autogpts/autogpt/autogpt/core/resource/model_providers/groq.py
GroqProvider
class for handling interactions with theGroq API.
retries.
multi.py
Integrate GroqProvider into MultiProvider
autogpts/autogpt/autogpt/core/resource/model_providers/multi.py
GroqProvider
to the list of model providers.ModelName
type to includeGroqModelName
.GROQ_CHAT_MODELS
in the combined chat models dictionary.schema.py
Update ModelProviderName Enum with GROQ
autogpts/autogpt/autogpt/core/resource/model_providers/schema.py
GROQ
to theModelProviderName
enum.pyproject.toml
Add Groq Dependency in pyproject.toml
autogpts/autogpt/pyproject.toml
groq
package as a dependency.