mirror of
https://github.com/ollama/ollama-python.git
synced 2026-05-01 11:48:17 +08:00
Merge 0638e947c6 into dbccf192ac
This commit is contained in:
commit
7971d6794e
@ -117,9 +117,15 @@ class BaseClient(contextlib.AbstractContextManager, contextlib.AbstractAsyncCont
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def __enter__(self):
|
||||
return self
|
||||
|
||||
def __exit__(self, exc_type, exc_val, exc_tb):
|
||||
self.close()
|
||||
|
||||
async def __aenter__(self):
|
||||
return self
|
||||
|
||||
async def __aexit__(self, exc_type, exc_val, exc_tb):
|
||||
await self.close()
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user