The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
community[patch]: callback before yield for friendli (#26842)
Subhrajyoty Royb61fb9846614
diff --git a/libs/community/langchain_community/llms/friendli.py b/libs/community/langchain_community/llms/friendli.pyindex e6d13155cd..74b1ef7d19 100644--- a/libs/community/langchain_community/llms/friendli.py+++ b/libs/community/langchain_community/llms/friendli.py@@ -233,9 +233,9 @@ class Friendli(LLM, BaseFriendli):)for line in stream:chunk = _stream_response_to_generation_chunk(line)- yield chunkif run_manager:run_manager.on_llm_new_token(line.text, chunk=chunk)+ yield chunkasync def _astream(self,@@ -250,9 +250,9 @@ class Friendli(LLM, BaseFriendli):)async for line in stream:chunk = _stream_response_to_generation_chunk(line)- yield chunkif run_manager:await run_manager.on_llm_new_token(line.text, chunk=chunk)+ yield chunkdef _generate(self,