mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-03 21:54:04 +00:00
community[patch]: callback before yield for google palm (#26882)
**Description:** Moves yield to after callback for `_stream` function for the google palm model in the community package **Issue:** #16913
This commit is contained in:
parent
121e79b1f0
commit
11e703a97e
@ -215,13 +215,13 @@ class GooglePalm(BaseLLM, BaseModel):
|
||||
**kwargs,
|
||||
):
|
||||
chunk = GenerationChunk(text=stream_resp.text)
|
||||
yield chunk
|
||||
if run_manager:
|
||||
run_manager.on_llm_new_token(
|
||||
stream_resp.text,
|
||||
chunk=chunk,
|
||||
verbose=self.verbose,
|
||||
)
|
||||
yield chunk
|
||||
|
||||
@property
|
||||
def _llm_type(self) -> str:
|
||||
|
Loading…
Reference in New Issue
Block a user