Skip to content

Commit f8fca4d

Browse files
committed
minor change to debug logs
1 parent 834eb92 commit f8fca4d

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

llm_api_client/api_client.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -530,16 +530,19 @@ def _rate_limited_request(
530530

531531
self._acquire_rate_limited_resources(request=request)
532532

533+
# Log the API request at DEBUG level
534+
thread_id = threading.get_ident()
533535
self._logger.debug(
534-
f"Thread {threading.get_ident()} making API call with parameters: {request}")
536+
f"API Request [Thread {thread_id}] - Model: {request.get('model')}; Parameters: {request}")
535537

536538
try:
537539
response = self.api_call(**request)
538-
self._logger.debug(
539-
f"Thread {threading.get_ident()} completed API call with response: {response}")
540+
541+
# Log the API response at DEBUG level
542+
self._logger.debug(f"API Response [Thread {thread_id}] - {response}")
540543
except Exception as e:
541544
self._logger.error(
542-
f"Thread {threading.get_ident()} failed API call with error: {e}")
545+
f"API Request Failed [Thread {thread_id}] - Error: {e}")
543546
raise e
544547

545548
return response

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ classifiers = [
2727
"Programming Language :: Python :: 3.13",
2828
]
2929

30-
version = "0.1.4"
30+
version = "0.1.5"
3131
requires-python = ">=3.11" # NOTE: Must use Python 3.11 or higher
3232

3333
# These are defined below dynamically:

0 commit comments

Comments
 (0)