From 8a64e1288504cbe92cddb499230a2e064bf5c30c Mon Sep 17 00:00:00 2001 From: tad dy Date: Sat, 31 Aug 2024 16:08:23 +0000 Subject: [PATCH] Adding documentation comments to the newly added astream_events method on the Agent class --- swarms/structs/agent.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/swarms/structs/agent.py b/swarms/structs/agent.py index dd8fc0c0..7e553a8e 100644 --- a/swarms/structs/agent.py +++ b/swarms/structs/agent.py @@ -885,6 +885,10 @@ class Agent: async def astream_events( self, task: str = None, img: str = None, *args, **kwargs ): + """ + Run the Agent with LangChain's astream_events API. + Only works with LangChain-based models. + """ try: async for evt in self.llm.astream_events(task, version="v1"): yield evt