Skip to content

dlt Workshop: How to use Groq instead of OpenAI #348

Description

@BimbsyStats

Course

llm-zoomcamp

Question

Course

llm-zoomcamp

Question

How do I use Groq instead of OpenAI in the dlt Workshop?

Answer

The dlt Workshop starter code uses OpenAI by default. To use Groq instead (no OpenAI key needed), replace the model setup with:

model = GroqModel('llama-3.3-70b-versatile', provider=GroqProvider(api_key='your-groq-key-here'))

Import these at the top: from pydantic_ai.models.groq import GroqModel and from pydantic_ai.providers.groq import GroqProvider

Checklist

  • I have searched existing FAQs and this question is not already answered
  • The answer provides accurate, helpful information
  • I have included any relevant code examples or links

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions