The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
community[patch]: Invoke callback prior to yielding token (titan_takeoff_pro) (#18624)
Yudhajit Sinha7d216ad1e1fd
diff --git a/libs/community/langchain_community/llms/titan_takeoff_pro.py b/libs/community/langchain_community/llms/titan_takeoff_pro.pyindex ce96aad190..8040afab45 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("</s>", ""))- yield chunkif run_manager:run_manager.on_llm_new_token(token=chunk.text)+ yield chunk@propertydef _identifying_params(self) -> Mapping[str, Any]: