mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-22 23:00:00 +00:00
community[patch]: callback before yield for _astream (gigachat) (#25834)
Description: Moves yield to after callback for _astream for gigachat in the community package Issue: #16913 --------- Co-authored-by: Chester Curme <chester.curme@gmail.com>
This commit is contained in:
parent
703af9ffe3
commit
bdce9a47d0
@ -268,6 +268,7 @@ class GigaChat(_BaseGigaChat, BaseChatModel):
|
||||
dict(finish_reason=finish_reason) if finish_reason is not None else None
|
||||
)
|
||||
|
||||
yield ChatGenerationChunk(message=chunk, generation_info=generation_info)
|
||||
if run_manager:
|
||||
await run_manager.on_llm_new_token(content)
|
||||
|
||||
yield ChatGenerationChunk(message=chunk, generation_info=generation_info)
|
||||
|
Loading…
Reference in New Issue
Block a user