Compare commits

...

3 Commits

Author SHA1 Message Date
sweep-ai[bot] f3ebe7b4f6 Merge main into sweep/fix-asyncio-event-loop-error 2023-08-15 16:04:08 +00:00
sweep-ai[bot] bc0ca3a5dc Added put and get methods to StreamingAgentChatResponse class 2023-08-14 08:34:05 +00:00
sweep-ai[bot] 3ee184831a Moved asyncio.Queue instantiation to __init__ method in StreamingAgentChatResponse class 2023-08-14 08:30:43 +00:00
+12
View File
@@ -0,0 +1,12 @@
import asyncio
class StreamingAgentChatResponse:
def __init__(self):
self._aqueue: asyncio.Queue = asyncio.Queue()
async def put(self, item):
await self._aqueue.put(item)
async def get(self):
return await self._aqueue.get()