Skip to content
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: groq integration #263

Merged
merged 6 commits into from
Feb 12, 2025

Conversation

joshua-mo-143
Copy link
Contributor

Fixes #145

An attempt was made to use the openai provider module but it looks like each provider module's CompletionModel struct is dependent on each provider's client module rather than a trait, which makes refactoring slightly more complicated.

Copy link
Contributor

@0xMochan 0xMochan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mainly would want you to reuse the openai's Message struct as it'll vastly improve a future rebase on top of my #199 PR (merging soon). Reusing more structs, the better. Reusing CompletionResponse is max but not always possible!

@joshua-mo-143
Copy link
Contributor Author

joshua-mo-143 commented Feb 5, 2025

Looks like Groq is like Galadriel in that it doesn't actually follow the OpenAI chat completion API standard. Types will be imported from the Galadriel module.

Nevermind, Groq doesn't support tool_calls in the message. Guess we'll be making our own message type for this.

I've tested that it works locally both in the groq example and the agent_with_tools example (by substituting for the groq module client).

@cvauclair
Copy link
Contributor

@0xMochan have the requested changes been addressed? This PR looks pretty ready to me

Copy link
Contributor

@0xMochan 0xMochan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, ready to merge!

@joshua-mo-143 joshua-mo-143 merged commit 1b71738 into 0xPlaygrounds:main Feb 12, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: Add support for Groq
3 participants