Commit 8eb0bde 1 parent b2dd9ff commit 8eb0bde Copy full SHA for 8eb0bde
File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -134,9 +134,9 @@ def _stream(
134
134
for chunk in stream :
135
135
delta = chunk .choices [0 ].delta .content
136
136
if delta :
137
- yield ChatGenerationChunk (message = AIMessageChunk (content = delta ))
138
137
if run_manager :
139
138
run_manager .on_llm_new_token (delta )
139
+ yield ChatGenerationChunk (message = AIMessageChunk (content = delta ))
140
140
141
141
async def _astream (
142
142
self ,
@@ -152,9 +152,9 @@ async def _astream(
152
152
async for chunk in stream :
153
153
delta = chunk .choices [0 ].delta .content
154
154
if delta :
155
- yield ChatGenerationChunk (message = AIMessageChunk (content = delta ))
156
155
if run_manager :
157
156
await run_manager .on_llm_new_token (delta )
157
+ yield ChatGenerationChunk (message = AIMessageChunk (content = delta ))
158
158
159
159
def _generate (
160
160
self ,
You can’t perform that action at this time.
0 commit comments