diff --git a/src/cogs/ollama.py b/src/cogs/ollama.py index 482881f..beed4c7 100644 --- a/src/cogs/ollama.py +++ b/src/cogs/ollama.py @@ -102,7 +102,7 @@ class OllamaDownloadHandler: self.status = line["status"] async def __aiter__(self): - async with httpx.AsyncClient(base_url=self.base_url) as client: + async with aiohttp.ClientSession(base_url=self.base_url) as client: async with client.post("/api/pull", json={"name": self.model, "stream": True}, timeout=None) as response: response.raise_for_status() async for line in ollama_stream(response.content): @@ -164,7 +164,7 @@ class OllamaChatHandler: self._abort.set() async def __aiter__(self): - async with httpx.AsyncClient(base_url=self.base_url) as client: + async with aiohttp.ClientSession(base_url=self.base_url) as client: async with client.post( "/api/chat", json={