diff --git a/libs/community/langchain_community/llms/titan_takeoff_pro.py b/libs/community/langchain_community/llms/titan_takeoff_pro.py index ce96aad1908..8040afab454 100644 --- a/libs/community/langchain_community/llms/titan_takeoff_pro.py +++ b/libs/community/langchain_community/llms/titan_takeoff_pro.py @@ -207,9 +207,9 @@ class TitanTakeoffPro(LLM): # Yield any remaining content in the buffer. if buffer: chunk = GenerationChunk(text=buffer.replace("", "")) - yield chunk if run_manager: run_manager.on_llm_new_token(token=chunk.text) + yield chunk @property def _identifying_params(self) -> Mapping[str, Any]: