The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
community[patch]: Invoke callback prior to yielding token (pai_eas_endpoint) (#18627)
Yudhajit Sinha9525e392de23
diff --git a/libs/community/langchain_community/llms/pai_eas_endpoint.py b/libs/community/langchain_community/llms/pai_eas_endpoint.pyindex b74b9ca2a3..c84083b17e 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 @@ class PaiEasEndpoint(LLM):# yield text, if anyif text:res = GenerationChunk(text=text)- yield resif run_manager:run_manager.on_llm_new_token(res.text)+ yield res# break if stop sequence foundif stop_seq_found: