The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
community[patch]: callback before yield for deepsparse llm (#26822)
Subhrajyoty Royb1da532522f3
diff --git a/libs/community/langchain_community/llms/deepsparse.py b/libs/community/langchain_community/llms/deepsparse.pyindex 9375a3f772..6a743cd506 100644--- a/libs/community/langchain_community/llms/deepsparse.py+++ b/libs/community/langchain_community/llms/deepsparse.py@@ -190,10 +190,10 @@ class DeepSparse(LLM):)for token in inference:chunk = GenerationChunk(text=token.generations[0].text)- yield chunkif run_manager:run_manager.on_llm_new_token(token=chunk.text)+ yield chunkasync def _astream(self,@@ -228,7 +228,7 @@ class DeepSparse(LLM):)for token in inference:chunk = GenerationChunk(text=token.generations[0].text)- yield chunkif run_manager:await run_manager.on_llm_new_token(token=chunk.text)+ yield chunk