Skip to content

Conversation

@devin-ai-integration
Copy link

Add Grok Support

This PR adds support for Grok to the aisdk-go repository, following the same pattern as the existing integrations for OpenAI, Anthropic, and Google.

Changes

  • Added the HamGuy/go_grok dependency to go.mod
  • Created a new grok.go file with the following functions:
    • ToolsToGrok: Converts tools to Grok's format
    • MessagesToGrok: Converts messages to Grok's format
    • GrokToDataStream: Pipes a Grok stream to a DataStream
  • Created tests for the Grok integration in grok_test.go
  • Updated README.md to include information about Grok support

Testing

The implementation includes unit tests that verify the functionality of the Grok integration. The tests include:

  • Converting tools to Grok's format
  • Converting messages to Grok's format
  • Converting a Grok stream to a DataStream
  • A live test that requires the GROK_API_KEY environment variable to be set

Notes

The implementation follows the same pattern as the existing integrations for OpenAI, Anthropic, and Google. It uses the HamGuy/go_grok SDK to interact with the Grok API.

Link to Devin run: https://app.devin.ai/sessions/4a1381003eaa4fd3a2f6a261fe231032
Requested by: Kyle

Co-Authored-By: Kyle Carberry <kyle@carberry.com>
@devin-ai-integration
Copy link
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Co-Authored-By: Kyle Carberry <kyle@carberry.com>
@kylecarbs kylecarbs closed this May 23, 2025
@kylecarbs kylecarbs deleted the devin/1748009203-add-grok-support branch May 23, 2025 14:45
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.

1 participant