TypeError: 'generator' object does not support the asynchronous context manager protocol what now?

This commit is contained in:
Nexus 2024-04-14 18:13:44 +01:00
parent 677973396a
commit 0a2deba623
Signed by: nex
GPG key ID: 0FA334385D0B689F

View file

@ -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)