The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
community[patch]: Invoke callback prior to yielding token (titan_takeoff) (#18560)
Yudhajit Sinha4570b477b9aa
diff --git a/libs/community/langchain_community/llms/titan_takeoff.py b/libs/community/langchain_community/llms/titan_takeoff.pyindex 103a81b59c..9140aa0bc3 100644--- a/libs/community/langchain_community/llms/titan_takeoff.py+++ b/libs/community/langchain_community/llms/titan_takeoff.py@@ -151,9 +151,9 @@ class TitanTakeoff(LLM):for text in response.iter_content(chunk_size=1, decode_unicode=True):if text:chunk = GenerationChunk(text=text)- yield chunkif run_manager:run_manager.on_llm_new_token(token=chunk.text)+ yield chunk@propertydef _identifying_params(self) -> Mapping[str, Any]: