Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Groq api integration #194

Merged
merged 4 commits into from
Nov 4, 2024
Merged

Groq api integration #194

merged 4 commits into from
Nov 4, 2024

Conversation

juke
Copy link
Contributor

@juke juke commented Nov 4, 2024

Relates to:

Adding Groq API support to expand model provider options

Risks

Low - This is an additive change that doesn't modify existing provider functionality

Background

What does this PR do?

Adds support for Groq (https://groq.com/) as a model provider, allowing use of Groq's API for text generation.

What kind of change is this?

Features (non-breaking change which adds functionality)

Documentation changes needed?

My changes require a change to the project documentation to document Groq as a supported provider.

Testing

Where should a reviewer start?

  1. Check the Groq implementation in core/src/core/generation.ts
  2. Review the model configuration for Groq
  3. Test text generation using Groq provider

Detailed testing steps

  1. Set up environment with Groq API key
  2. Configure character to use ModelProvider.GROQ
  3. Test text generation:
const runtime = new AgentRuntime({
  modelProvider: ModelProvider.GROQ,
  // other config...
});

const response = await generateText({
  runtime,
  context: "Test prompt",
  modelClass: "SMALL"
});
  1. Verify response format matches other providers

Key changes:

  • Initialized Groq client with API key
  • Configured model parameters for Groq provider
  • Added ModelProvider.GROQ enum value

The implementation follows the same pattern as the other providers

@lalalune lalalune merged commit aca0cdd into elizaOS:main Nov 4, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants