Skip to content

Commit 5731e9c

Browse files
authored
fix code formatting
1 parent 1520780 commit 5731e9c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/content/docs/workers/examples/openai-sdk-streaming.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ export default {
4343
const stream = await openai.chat.completions.create({
4444
model: 'gpt-4o-mini',
4545
messages: [{ role: 'user', content: 'Tell me a story' }],
46-
stream: true,
46+
stream: true,
4747
});
4848

4949
// loop over the data as it is streamed and write to the writeable
5050
for await (const part of stream) {
51-
writer.write(textEncoder.encode(part.choices[0]?.delta?.content || ''));
51+
writer.write(textEncoder.encode(part.choices[0]?.delta?.content || ''));
5252
}
5353
writer.close();
5454
})());

0 commit comments

Comments
 (0)