Skip to content

Commit 3cc8ffd

Browse files
authored
fix(genapi): typo in async snippets (#5637)
1 parent 6e63ea5 commit 3cc8ffd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pages/generative-apis/how-to/query-language-models.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ The service also supports asynchronous mode for any chat completion.
212212
)
213213

214214
async def main():
215-
stream = client.chat.completions.create(
215+
stream = await client.chat.completions.create(
216216
model="llama-3.1-8b-instruct",
217217
messages=[{
218218
"role": "user",
@@ -250,7 +250,7 @@ The service also supports asynchronous mode for any chat completion.
250250
if event.type == "response.output_text.delta":
251251
print(event.delta, end="")
252252
elif event.type == "response.completed":
253-
break
253+
continue
254254

255255
asyncio.run(main())
256256
```

0 commit comments

Comments
 (0)