```javascript
import { Groq } from 'groq-sdk';

const groq = new Groq();

async function main() {
  const chatCompletion = await groq.chat.completions.create({
    messages: [
      {
        role: "user",
        content: "Write a Python function to calculate the factorial of a number."
      },
      {
        role: "assistant",
        content: "```python"
      }
    ],
    stream: true,
    model: "openai/gpt-oss-20b",
    stop: "```"
  });

  for await (const chunk of chatCompletion) {
    process.stdout.write(chunk.choices[0]?.delta?.content || '');
  }
}

main();
```

---

## Prefilling: Example2 (js)