We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9f67360 commit b34a1baCopy full SHA for b34a1ba
README.md
@@ -44,13 +44,13 @@ The client supports streaming responses for real-time processing. Here are examp
44
#### Using Async Iterator
45
46
```typescript
47
-const stream = await ai21.chat.completions.create({
+const streamResponse = await ai21.chat.completions.create({
48
model: 'jamba-1.5-mini',
49
messages: [{ role: 'user', content: 'Write a story about a space cat' }],
50
stream: true,
51
});
52
53
-for await (const chunk of stream) {
+for await (const chunk of streamResponse) {
54
console.log(chunk.choices[0]?.delta?.content || '');
55
}
56
```
0 commit comments