diff --git a/libs/community/langchain_community/chat_models/bedrock.py b/libs/community/langchain_community/chat_models/bedrock.py index 6b36208390379..8f4943951d5d5 100644 --- a/libs/community/langchain_community/chat_models/bedrock.py +++ b/libs/community/langchain_community/chat_models/bedrock.py @@ -264,7 +264,10 @@ def _stream( **kwargs, ): delta = chunk.text - yield ChatGenerationChunk(message=AIMessageChunk(content=delta)) + cg_chunk = ChatGenerationChunk(message=AIMessageChunk(content=delta)) + if run_manager: + run_manager.on_llm_new_token(delta, chunk=cg_chunk ) + yield cg_chunk def _generate( self,