feat: Add Groq adapter documentation#349
Conversation
Add a new markdown file detailing the Groq adapter, including installation, usage, configuration, model options, TTS capabilities, and API references.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds new Groq adapter documentation ( Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/adapters/groq.md`:
- Around line 120-126: The docs show modelOptions.reasoning.effort which doesn't
match the actual API; update the example to use the top-level modelOptions
property reasoning_effort and remove the invalid "minimal" value, i.e., replace
the nested reasoning object with reasoning_effort and list allowed values as
'none' | 'default' | 'low' | 'medium' | 'high' to match the type defined in
text-provider-options.ts (reference modelOptions and reasoning_effort).
- Around line 197-203: Update the "Supported TTS Formats" section to clarify
that although the type includes `mp3`, `flac`, `ogg`, and `mulaw` for future
compatibility, Groq's Orpheus TTS models currently only support `wav`; change
the list or add a parenthetical/inline sentence under the "Supported TTS
Formats" heading stating that only `wav` is supported by Orpheus today and the
other formats may not work with current Orpheus models (they are present for
future compatibility/reference).
- Around line 93-97: The example calls chat(adapter: groqText(...), messages,
tools...) but the messages variable is undefined; add a messages definition
before the chat call (e.g., a messages array containing message objects with
roles and content such as system/user/assistant) so the snippet is
self-contained and demonstrates how to pass conversation history into chat and
groqText; update the example near the chat(...) invocation to declare messages
and then call chat with that messages variable.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: ce6a05ac-9188-4071-83e0-de8f2b091456
📒 Files selected for processing (2)
docs/adapters/groq.mddocs/config.json
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/adapters/groq.md`:
- Around line 217-225: Update the docs for the env-based helpers to make the
signature consistent: either add a short bullet describing the optional config
parameter or remove the `config?` from the signatures. Specifically, in
docs/adapters/groq.md update the `groqText(model, config?)` and the other
env-helper heading around lines 239-247 to reflect the change—if keeping
`config?`, add a `- config (optional) - <short description of allowed options>`
entry explaining what the env-based helper accepts; if removing it, edit the
headings to `groqText(model)` and `groq...` variants so the parameter list only
shows `model`. Ensure the same approach is applied to both occurrences so the
API reference is consistent.
- Around line 107-115: The example in docs/adapters/groq.md uses the wrong
option name and an undefined variable; update the chat(...) example to use the
API's GroqTextProviderOptions by replacing max_tokens with max_completion_tokens
and make the snippet self-contained by defining a messages array (e.g., const
messages = [{ role: "user", content: "..." }]) before calling chat; ensure the
chat call references groqText("llama-3.3-70b-versatile"), messages, and
modelOptions with temperature, max_completion_tokens, and top_p so it matches
the actual API.
Update documentation for the Groq adapter to reflect correct options and add a note about `baseURL` configuration.
Add a new markdown file detailing the Groq adapter, including installation, usage, configuration, model options, TTS capabilities, and API references.
🎯 Changes
Added a new markdown file documenting the Groq TTS adapter, including installation, usage, configuration, and API reference. Provides a quick guide for developers to integrate and use the adapter.
✅ Checklist
pnpm run test:pr.🚀 Release Impact
Summary by CodeRabbit