diff --git a/libs/community/langchain_community/llms/pai_eas_endpoint.py b/libs/community/langchain_community/llms/pai_eas_endpoint.py index b74b9ca2a3d3a3..c84083b17eaac9 100644 --- a/libs/community/langchain_community/llms/pai_eas_endpoint.py +++ b/libs/community/langchain_community/llms/pai_eas_endpoint.py @@ -231,9 +231,9 @@ def _stream( # yield text, if any if text: res = GenerationChunk(text=text) - yield res if run_manager: run_manager.on_llm_new_token(res.text) + yield res # break if stop sequence found if stop_seq_found: