From 0a2deba623da75cb76c240f31283addace7531e4 Mon Sep 17 00:00:00 2001 From: nexy7574 Date: Sun, 14 Apr 2024 18:13:44 +0100 Subject: [PATCH] TypeError: 'generator' object does not support the asynchronous context manager protocol what now? --- src/cogs/ollama.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/cogs/ollama.py b/src/cogs/ollama.py index da7d153..0f7ea14 100644 --- a/src/cogs/ollama.py +++ b/src/cogs/ollama.py @@ -218,7 +218,7 @@ class OllamaClient: timeout = httpx.Timeout(timeout) else: timeout = timeout or httpx.Timeout(60) - return self._with_async_client(timeout) + yield from self._with_async_client(timeout) async def get_tags(self) -> dict[typing.Literal["models"], dict[str, str, int, dict[str, str, None]]]: """ @@ -267,7 +267,6 @@ class OllamaClient: return handler - class OllamaView(View): def __init__(self, ctx: discord.ApplicationContext): super().__init__(timeout=3600, disable_on_timeout=True)