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
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