The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
community[patch]: callback before yield for mlx pipeline (#26928)
Subhrajyoty Roy7037ba0f06dd
diff --git a/libs/community/langchain_community/llms/mlx_pipeline.py b/libs/community/langchain_community/llms/mlx_pipeline.pyindex 3856a80658..1e320a24f9 100644--- a/libs/community/langchain_community/llms/mlx_pipeline.py+++ b/libs/community/langchain_community/llms/mlx_pipeline.py@@ -232,9 +232,9 @@ class MLXPipeline(LLM):# yield text, if anyif text:chunk = GenerationChunk(text=text)- yield chunkif run_manager:run_manager.on_llm_new_token(chunk.text)+ yield chunk# break if stop sequence foundif token == eos_token_id or (stop is not None and text in stop):