File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -94,9 +94,9 @@ stream = client.chat.completions.create(
94
94
messages = [{" role" : " user" , " content" : " Say this is a test" }],
95
95
stream = True ,
96
96
)
97
- for chunk in stream:
97
+ for part in stream:
98
98
if chunk.choices[0 ].delta.content is not None :
99
- print (chunk .choices[0 ].delta.content, end = " " )
99
+ print (part .choices[0 ].delta.content)
100
100
```
101
101
102
102
The async client uses the exact same interface.
@@ -111,9 +111,9 @@ stream = await client.chat.completions.create(
111
111
messages = [{" role" : " user" , " content" : " Say this is a test" }],
112
112
stream = True ,
113
113
)
114
- async for chunk in stream:
114
+ async for part in stream:
115
115
if chunk.choices[0 ].delta.content is not None :
116
- print (chunk .choices[0 ].delta.content, end = " " )
116
+ print (part .choices[0 ].delta.content)
117
117
```
118
118
119
119
## Module-level client
You can’t perform that action at this time.
0 commit comments