The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
community[patch]: invoke callback prior to yielding token (fireworks) (#19388)
aditya thomas49e932cd2441
diff --git a/libs/community/langchain_community/llms/fireworks.py b/libs/community/langchain_community/llms/fireworks.pyindex c12733480c..1bf40264d5 100644--- a/libs/community/langchain_community/llms/fireworks.py+++ b/libs/community/langchain_community/llms/fireworks.py@@ -186,9 +186,9 @@ class Fireworks(BaseLLM):self, self.use_retry, run_manager=run_manager, stop=stop, **params):chunk = _stream_response_to_generation_chunk(stream_resp)- yield chunkif run_manager:run_manager.on_llm_new_token(chunk.text, chunk=chunk)+ yield chunkasync def _astream(self,@@ -207,9 +207,9 @@ class Fireworks(BaseLLM):self, self.use_retry, run_manager=run_manager, stop=stop, **params):chunk = _stream_response_to_generation_chunk(stream_resp)- yield chunkif run_manager:await run_manager.on_llm_new_token(chunk.text, chunk=chunk)+ yield chunkdef conditional_decorator(