Groq DeepSeek R1
Add the following code to your Python file
1from kern.agent import Agent2from kern.models.groq import Groq34agent = Agent(5 model=Groq(6 id="deepseek-r1-distill-llama-70b", temperature=0.6, max_tokens=1024, top_p=0.957 ),8 markdown=True,9)10agent.print_response("9.11 and 9.9 -- which is bigger?", stream=True)Set up your virtual environment
1uv venv --python 3.122source .venv/bin/activate1uv venv --python 3.122.venv\Scripts\activateInstall dependencies
1uv pip install -U kern-ai groqExport your Groq API key
1export GROQ_API_KEY="your_groq_api_key_here"1$Env:GROQ_API_KEY="your_groq_api_key_here"Run Agent
1python groq.py