__await__ -> async flatten()

This commit is contained in:
Nexus 2024-04-14 17:26:14 +01:00
parent 086dffd88c
commit 5743be54c0
Signed by: nex
GPG key ID: 0FA334385D0B689F

View file

@ -110,9 +110,11 @@ class OllamaDownloadHandler:
break
yield line
def __await__(self):
async def flatten(self) -> "OllamaDownloadHandler":
"""Returns the current instance, but fully consumed."""
async for _ in self:
pass
return self
class OllamaChatHandler: