mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-08 03:08:45 +00:00
add exit and aenter
This commit is contained in:
parent
a38d3b17c5
commit
9be250c0f0
1 changed files with 7 additions and 0 deletions
|
|
@ -22,6 +22,13 @@ class AsyncHTTPHandler:
|
|||
# Close the client when you're done with it
|
||||
await self.client.aclose()
|
||||
|
||||
async def __aenter__(self):
|
||||
return self.client
|
||||
|
||||
async def __aexit__(self):
|
||||
# close the client when exiting
|
||||
await self.client.aclose()
|
||||
|
||||
async def get(
|
||||
self, url: str, params: Optional[dict] = None, headers: Optional[dict] = None
|
||||
):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue