chuk-tool-processor 0.1.1__py3-none-any.whl → 0.1.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- chuk_tool_processor/core/processor.py +7 -7
- chuk_tool_processor/execution/wrappers/retry.py +1 -1
- chuk_tool_processor/logging/__init__.py +5 -7
- {chuk_tool_processor-0.1.1.dist-info → chuk_tool_processor-0.1.2.dist-info}/METADATA +1 -1
- {chuk_tool_processor-0.1.1.dist-info → chuk_tool_processor-0.1.2.dist-info}/RECORD +7 -7
- {chuk_tool_processor-0.1.1.dist-info → chuk_tool_processor-0.1.2.dist-info}/WHEEL +0 -0
- {chuk_tool_processor-0.1.1.dist-info → chuk_tool_processor-0.1.2.dist-info}/top_level.txt +0 -0
|
@@ -72,14 +72,14 @@ class ToolProcessor:
|
|
|
72
72
|
|
|
73
73
|
# Apply optional wrappers
|
|
74
74
|
if enable_retries:
|
|
75
|
-
self.logger.
|
|
75
|
+
self.logger.debug("Enabling retry logic")
|
|
76
76
|
self.executor = RetryableToolExecutor(
|
|
77
77
|
executor=self.executor,
|
|
78
78
|
default_config=RetryConfig(max_retries=max_retries)
|
|
79
79
|
)
|
|
80
80
|
|
|
81
81
|
if enable_rate_limiting:
|
|
82
|
-
self.logger.
|
|
82
|
+
self.logger.debug("Enabling rate limiting")
|
|
83
83
|
rate_limiter = RateLimiter(
|
|
84
84
|
global_limit=global_rate_limit,
|
|
85
85
|
tool_limits=tool_rate_limits
|
|
@@ -90,7 +90,7 @@ class ToolProcessor:
|
|
|
90
90
|
)
|
|
91
91
|
|
|
92
92
|
if enable_caching:
|
|
93
|
-
self.logger.
|
|
93
|
+
self.logger.debug("Enabling result caching")
|
|
94
94
|
cache = InMemoryCache(default_ttl=cache_ttl)
|
|
95
95
|
self.executor = CachingToolExecutor(
|
|
96
96
|
executor=self.executor,
|
|
@@ -116,7 +116,7 @@ class ToolProcessor:
|
|
|
116
116
|
for name in parser_names
|
|
117
117
|
]
|
|
118
118
|
|
|
119
|
-
self.logger.
|
|
119
|
+
self.logger.debug(f"Initialized with {len(self.parsers)} parser plugins")
|
|
120
120
|
|
|
121
121
|
async def process_text(
|
|
122
122
|
self,
|
|
@@ -139,16 +139,16 @@ class ToolProcessor:
|
|
|
139
139
|
"""
|
|
140
140
|
# Create request context
|
|
141
141
|
with request_logging(request_id) as req_id:
|
|
142
|
-
self.logger.
|
|
142
|
+
self.logger.debug(f"Processing text ({len(text)} chars)")
|
|
143
143
|
|
|
144
144
|
# Extract tool calls
|
|
145
145
|
calls = await self._extract_tool_calls(text)
|
|
146
146
|
|
|
147
147
|
if not calls:
|
|
148
|
-
self.logger.
|
|
148
|
+
self.logger.debug("No tool calls found")
|
|
149
149
|
return []
|
|
150
150
|
|
|
151
|
-
self.logger.
|
|
151
|
+
self.logger.debug(f"Found {len(calls)} tool calls")
|
|
152
152
|
|
|
153
153
|
# Execute tool calls
|
|
154
154
|
with log_context_span("tool_execution", {"num_calls": len(calls)}):
|
|
@@ -103,7 +103,7 @@ class RetryableToolExecutor:
|
|
|
103
103
|
if result.error:
|
|
104
104
|
last_error = result.error
|
|
105
105
|
if config.should_retry(attempt, error_str=result.error):
|
|
106
|
-
logger.
|
|
106
|
+
logger.debug(
|
|
107
107
|
f"Retrying tool {call.tool} after error: {result.error} (attempt {attempt + 1})"
|
|
108
108
|
)
|
|
109
109
|
await asyncio.sleep(config.get_delay(attempt))
|
|
@@ -6,14 +6,12 @@ Other modules can continue to import:
|
|
|
6
6
|
|
|
7
7
|
from chuk_tool_processor.logging import get_logger, log_context_span, ...
|
|
8
8
|
"""
|
|
9
|
-
|
|
10
9
|
from __future__ import annotations
|
|
11
|
-
import logging
|
|
12
|
-
import sys
|
|
10
|
+
import logging, sys
|
|
13
11
|
|
|
14
12
|
from .formatter import StructuredFormatter
|
|
15
|
-
from .context
|
|
16
|
-
from .helpers
|
|
13
|
+
from .context import get_logger, log_context, StructuredAdapter
|
|
14
|
+
from .helpers import log_context_span, request_logging, log_tool_call, metrics
|
|
17
15
|
|
|
18
16
|
__all__ = [
|
|
19
17
|
"get_logger",
|
|
@@ -27,9 +25,9 @@ __all__ = [
|
|
|
27
25
|
# root logger & handler wiring (done once at import time)
|
|
28
26
|
# --------------------------------------------------------------------------- #
|
|
29
27
|
root_logger = logging.getLogger("chuk_tool_processor")
|
|
30
|
-
root_logger.setLevel(logging.
|
|
28
|
+
root_logger.setLevel(logging.WARNING) # ← quieter default
|
|
31
29
|
|
|
32
30
|
_handler = logging.StreamHandler(sys.stderr)
|
|
33
|
-
_handler.setLevel(logging.
|
|
31
|
+
_handler.setLevel(logging.WARNING) # match the logger
|
|
34
32
|
_handler.setFormatter(StructuredFormatter())
|
|
35
33
|
root_logger.addHandler(_handler)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
chuk_tool_processor/__init__.py,sha256=a4pDi8hta4hjhijLGcv3vlWL8iu3F9EynkmB3si7-hg,33
|
|
2
2
|
chuk_tool_processor/core/__init__.py,sha256=slM7pZna88tyZrF3KtN22ApYyCqGNt5Yscv-knsLOOA,38
|
|
3
3
|
chuk_tool_processor/core/exceptions.py,sha256=h4zL1jpCY1Ud1wT8xDeMxZ8GR8ttmkObcv36peUHJEA,1571
|
|
4
|
-
chuk_tool_processor/core/processor.py,sha256=
|
|
4
|
+
chuk_tool_processor/core/processor.py,sha256=ud7ezONnUFh_aDSapiBGNx-LtZfhAFpYjFuw2m_tFXk,10165
|
|
5
5
|
chuk_tool_processor/execution/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
6
|
chuk_tool_processor/execution/tool_executor.py,sha256=e1EHE-744uJuB1XeZZF_6VT25Yg1RCd8XI3v8uOrOSo,1794
|
|
7
7
|
chuk_tool_processor/execution/strategies/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -10,8 +10,8 @@ chuk_tool_processor/execution/strategies/subprocess_strategy.py,sha256=Er8z7x94E
|
|
|
10
10
|
chuk_tool_processor/execution/wrappers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
11
|
chuk_tool_processor/execution/wrappers/caching.py,sha256=dA2OULPQ9xCZj-r3ev5LtsCDFDPgoz8tr70YCX5A4Wg,7714
|
|
12
12
|
chuk_tool_processor/execution/wrappers/rate_limiting.py,sha256=pFqD1vLzOtJzsWzpEI7J786gOAbdFY0gVeiO7ElBXbA,4991
|
|
13
|
-
chuk_tool_processor/execution/wrappers/retry.py,sha256=
|
|
14
|
-
chuk_tool_processor/logging/__init__.py,sha256=
|
|
13
|
+
chuk_tool_processor/execution/wrappers/retry.py,sha256=L3lebFWf_IL7DaAhTR541BVIxns7amm5msqYjJcQtnk,6387
|
|
14
|
+
chuk_tool_processor/logging/__init__.py,sha256=kow8qhzuCShXQSpQ4c6OZ0dEok18iMikcYLJTXEluoA,1124
|
|
15
15
|
chuk_tool_processor/logging/context.py,sha256=hQFWGeraHX3DM28JDSiIuhQqep6TBfo1uaLlRRlGMVU,1521
|
|
16
16
|
chuk_tool_processor/logging/formatter.py,sha256=4pO-fLULkD3JPLjZOSiOZPGsjV3c4Ztr5ySda1RAvi4,1754
|
|
17
17
|
chuk_tool_processor/logging/helpers.py,sha256=Fk32BuecWZdyrmv8U0lh4W0AdNx4-gKcCaWBdId_rlI,3569
|
|
@@ -41,7 +41,7 @@ chuk_tool_processor/registry/providers/__init__.py,sha256=_0dg4YhyfAV0TXuR_i4ewX
|
|
|
41
41
|
chuk_tool_processor/registry/providers/memory.py,sha256=29aI5uvykjDmn9ymIukEdUtmTC9SXOAsDu9hw36XF44,4474
|
|
42
42
|
chuk_tool_processor/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
43
43
|
chuk_tool_processor/utils/validation.py,sha256=7ezn_o-3IHDrzOD3j6ttsAn2s3zS-jIjeBTuqicrs6A,3775
|
|
44
|
-
chuk_tool_processor-0.1.
|
|
45
|
-
chuk_tool_processor-0.1.
|
|
46
|
-
chuk_tool_processor-0.1.
|
|
47
|
-
chuk_tool_processor-0.1.
|
|
44
|
+
chuk_tool_processor-0.1.2.dist-info/METADATA,sha256=rIz9dpGciPSIx2rF-7ReK7WtGvFkmRpZkBGzrrjsKMg,9300
|
|
45
|
+
chuk_tool_processor-0.1.2.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
|
|
46
|
+
chuk_tool_processor-0.1.2.dist-info/top_level.txt,sha256=7lTsnuRx4cOW4U2sNJWNxl4ZTt_J1ndkjTbj3pHPY5M,20
|
|
47
|
+
chuk_tool_processor-0.1.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|