Skip to content

Commit

Permalink
Add debugging log
Browse files Browse the repository at this point in the history
  • Loading branch information
kxtran committed Jul 9, 2024
1 parent 46e5698 commit 3217368
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions log10/_httpx_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ def get_completion_id(self, request: httpx.Request):
def log_request(self, request: httpx.Request):
logger.debug("LOG10: sending sync request")
if not self.completion_id:
logger.debug("LOG10: completion id is not generated. Skipping")
return
self.log_row = _init_log_row(request)
_try_post_request(url=f"{base_url}/api/completions/{self.completion_id}", payload=self.log_row)
Expand Down Expand Up @@ -380,6 +381,7 @@ def get_completion_id(self, request: httpx.Request):
async def log_request(self, request: httpx.Request):
logger.debug("LOG10: sending async request")
if not self.completion_id:
logger.debug("LOG10: completion id is not generated. Skipping")
return
self.log_row = _init_log_row(request)
asyncio.create_task(
Expand Down

0 comments on commit 3217368

Please sign in to comment.