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 6e63ea5 commit 3cc8ffdCopy full SHA for 3cc8ffd
pages/generative-apis/how-to/query-language-models.mdx
@@ -212,7 +212,7 @@ The service also supports asynchronous mode for any chat completion.
212
)
213
214
async def main():
215
- stream = client.chat.completions.create(
+ stream = await client.chat.completions.create(
216
model="llama-3.1-8b-instruct",
217
messages=[{
218
"role": "user",
@@ -250,7 +250,7 @@ The service also supports asynchronous mode for any chat completion.
250
if event.type == "response.output_text.delta":
251
print(event.delta, end="")
252
elif event.type == "response.completed":
253
- break
+ continue
254
255
asyncio.run(main())
256
```
0 commit comments