The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
community[patch]: Invoke callback prior to yielding token (replicate) (#18626)
Yudhajit Sinha5ac18604846a
diff --git a/libs/community/langchain_community/llms/replicate.py b/libs/community/langchain_community/llms/replicate.pyindex b086aed348..91f9ce4e75 100644--- a/libs/community/langchain_community/llms/replicate.py+++ b/libs/community/langchain_community/llms/replicate.py@@ -177,12 +177,12 @@ class Replicate(LLM):if not output:breakif output:- yield GenerationChunk(text=output)if run_manager:run_manager.on_llm_new_token(output,verbose=self.verbose,)+ yield GenerationChunk(text=output)if stop_condition_reached:break