-
Notifications
You must be signed in to change notification settings - Fork 333
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 Groq client support #84
Conversation
ricklamers
commented
Nov 22, 2024
- Added GroqModel class to interact with Groq API.
- Implemented structured and text-based responses for Groq models.
- Added example and tests for Groq model integration.
- Updated dependencies to include groq package.
One thing I'm not sure of is how to let users override temperature, I've defaulted to 0.0 here because that's what most open source models need to adhere to function calling requests |
Not sure how to fix CI for
|
This is awesome, thank you. CI is my problem, I'll fix that — you're the first person contributing form outside pydantic (from a fork), hence you're seeing the issues. I'm flat out on calls today, but I'll review ASAP. |
tests/test_live.py
Outdated
@@ -90,3 +91,34 @@ async def test_gemini_structured(http_client: httpx.AsyncClient): | |||
print('Gemini structured cost:', result.cost()) | |||
cost = result.cost() | |||
assert cost.total_tokens is not None and cost.total_tokens > 0 | |||
|
|||
|
|||
async def test_groq(http_client: httpx.AsyncClient): |
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.
I guess I'll need to set an API key for this?
I can look it up, but is the process trivial?
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.
Free API key can be created, trivial just go to https://console.groq.com/
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.
I'll fix this once the initial PR is merged, test-live
will no longer run on PRs from forks once you rebase.
As of #87, PRs should work from forks. You'll need to rebase or merge with main. |
- Added GroqModel class to interact with Groq API. - Implemented structured and text-based responses for Groq models. - Added example and tests for Groq model integration. - Updated dependencies to include groq package.
Converted agent_model to async for better performance with asynchronous I/O operations.
5f19e9e
to
fa31e4f
Compare
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.
The style guide flagged several spelling errors that seemed like false positives. We skipped posting inline suggestions for the following words:
- Groq
amazing, thank you so much. |
Thanks so much for this @ricklamers. Related to the documentation: it would be really nice if Groq published an Lines 155 to 160 in d29d5e0
I asked @rattrayalex about this in relation to the OpenAI SDK, and hi said it wasn't an immediate priority, but I can't helping thinking that it wouldn't that hard for SDKs built with stainless to generate API docs with mkdocstrings and get a |
Hey @samuelcolvin , sorry I don't recall that convo? @RobertCraigie would be the one to take this on – we could generate a |
would providing an |