Skip to content

Commit

Permalink
fix(requestor): needs to import requests/httpx when using their excep…
Browse files Browse the repository at this point in the history
…tions
  • Loading branch information
atomiechen committed Apr 13, 2024
1 parent 9903282 commit 433045d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/handyllm/requestor.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ def call(self):
raise e

def _call_raw(self) -> requests.Response:
import requests
response = self._sync_client.request(
self.method,
self.url,
Expand Down Expand Up @@ -232,6 +233,7 @@ async def acall(self):
raise e

async def _acall_raw(self):
import httpx
request = self._async_client.build_request(
self.method,
self.url,
Expand Down

0 comments on commit 433045d

Please sign in to comment.