pydantic-ai-rlm 0.1.0__py3-none-any.whl → 0.1.1__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.
- pydantic_ai_rlm/logging.py +5 -9
- {pydantic_ai_rlm-0.1.0.dist-info → pydantic_ai_rlm-0.1.1.dist-info}/METADATA +7 -2
- {pydantic_ai_rlm-0.1.0.dist-info → pydantic_ai_rlm-0.1.1.dist-info}/RECORD +5 -5
- {pydantic_ai_rlm-0.1.0.dist-info → pydantic_ai_rlm-0.1.1.dist-info}/WHEEL +0 -0
- {pydantic_ai_rlm-0.1.0.dist-info → pydantic_ai_rlm-0.1.1.dist-info}/licenses/LICENSE +0 -0
pydantic_ai_rlm/logging.py
CHANGED
|
@@ -47,7 +47,7 @@ class RLMLogger:
|
|
|
47
47
|
)
|
|
48
48
|
self.console.print(panel)
|
|
49
49
|
else:
|
|
50
|
-
print(f"\n{'='*50}")
|
|
50
|
+
print(f"\n{'=' * 50}")
|
|
51
51
|
print("CODE EXECUTION")
|
|
52
52
|
print("=" * 50)
|
|
53
53
|
print(code)
|
|
@@ -141,7 +141,7 @@ class RLMLogger:
|
|
|
141
141
|
def _log_result_plain(self, result: REPLResult) -> None:
|
|
142
142
|
"""Log result using plain text."""
|
|
143
143
|
status = "SUCCESS" if result.success else "ERROR"
|
|
144
|
-
print(f"\n{'='*50}")
|
|
144
|
+
print(f"\n{'=' * 50}")
|
|
145
145
|
print(f"RESULT: {status} (executed in {result.execution_time:.3f}s)")
|
|
146
146
|
print("=" * 50)
|
|
147
147
|
|
|
@@ -159,11 +159,7 @@ class RLMLogger:
|
|
|
159
159
|
stderr = stderr[:1000] + "\n... (truncated)"
|
|
160
160
|
print(stderr)
|
|
161
161
|
|
|
162
|
-
user_vars = {
|
|
163
|
-
k: v
|
|
164
|
-
for k, v in result.locals.items()
|
|
165
|
-
if not k.startswith("_") and k not in ("context", "json", "re", "os")
|
|
166
|
-
}
|
|
162
|
+
user_vars = {k: v for k, v in result.locals.items() if not k.startswith("_") and k not in ("context", "json", "re", "os")}
|
|
167
163
|
if user_vars:
|
|
168
164
|
print("\nVariables:")
|
|
169
165
|
for name, value in list(user_vars.items())[:10]:
|
|
@@ -198,7 +194,7 @@ class RLMLogger:
|
|
|
198
194
|
)
|
|
199
195
|
self.console.print(panel)
|
|
200
196
|
else:
|
|
201
|
-
print(f"\n{'='*50}")
|
|
197
|
+
print(f"\n{'=' * 50}")
|
|
202
198
|
print("LLM QUERY")
|
|
203
199
|
print("=" * 50)
|
|
204
200
|
display_prompt = prompt
|
|
@@ -226,7 +222,7 @@ class RLMLogger:
|
|
|
226
222
|
)
|
|
227
223
|
self.console.print(panel)
|
|
228
224
|
else:
|
|
229
|
-
print(f"\n{'='*50}")
|
|
225
|
+
print(f"\n{'=' * 50}")
|
|
230
226
|
print("LLM RESPONSE")
|
|
231
227
|
print("=" * 50)
|
|
232
228
|
display_response = response
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pydantic-ai-rlm
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: Recursive Language Model (RLM) toolset for Pydantic AI - handle extremely large contexts
|
|
5
5
|
Author: Pydantic AI RLM Contributors
|
|
6
6
|
License-Expression: MIT
|
|
@@ -16,7 +16,7 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
16
16
|
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
17
17
|
Classifier: Typing :: Typed
|
|
18
18
|
Requires-Python: >=3.10
|
|
19
|
-
Requires-Dist: pydantic-ai>=0.1.0
|
|
19
|
+
Requires-Dist: pydantic-ai-slim[cli]>=0.1.0
|
|
20
20
|
Provides-Extra: dev
|
|
21
21
|
Requires-Dist: mypy>=1.0; extra == 'dev'
|
|
22
22
|
Requires-Dist: pytest-asyncio>=0.21; extra == 'dev'
|
|
@@ -34,6 +34,7 @@ Description-Content-Type: text/markdown
|
|
|
34
34
|
|
|
35
35
|
<p align="center">
|
|
36
36
|
<a href="https://github.com/vstorm-co/pydantic-ai-rlm">GitHub</a> •
|
|
37
|
+
<a href="https://pypi.org/project/pydantic-ai-rlm/">PyPI</a> •
|
|
37
38
|
<a href="https://github.com/vstorm-co/pydantic-ai-rlm#examples">Examples</a>
|
|
38
39
|
</p>
|
|
39
40
|
|
|
@@ -41,6 +42,7 @@ Description-Content-Type: text/markdown
|
|
|
41
42
|
<a href="https://www.python.org/downloads/"><img src="https://img.shields.io/badge/python-3.10+-blue.svg" alt="Python 3.10+"></a>
|
|
42
43
|
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a>
|
|
43
44
|
<a href="https://github.com/pydantic/pydantic-ai"><img src="https://img.shields.io/badge/Powered%20by-Pydantic%20AI-E92063?logo=pydantic&logoColor=white" alt="Pydantic AI"></a>
|
|
45
|
+
<a href="https://pypi.org/project/pydantic-ai-rlm/"><img src="https://img.shields.io/pypi/v/pydantic-ai-rlm.svg" alt="PyPI version"></a>
|
|
44
46
|
</p>
|
|
45
47
|
|
|
46
48
|
<p align="center">
|
|
@@ -278,16 +280,19 @@ configure_logging(enabled=False)
|
|
|
278
280
|
```
|
|
279
281
|
|
|
280
282
|
Install with rich logging support for syntax highlighting and styled output:
|
|
283
|
+
|
|
281
284
|
```bash
|
|
282
285
|
pip install pydantic-ai-rlm[logging]
|
|
283
286
|
```
|
|
284
287
|
|
|
285
288
|
Or install rich separately:
|
|
289
|
+
|
|
286
290
|
```bash
|
|
287
291
|
pip install rich
|
|
288
292
|
```
|
|
289
293
|
|
|
290
294
|
When enabled, you'll see:
|
|
295
|
+
|
|
291
296
|
- Syntax-highlighted code being executed (with rich)
|
|
292
297
|
- Execution results with status indicators (SUCCESS/ERROR)
|
|
293
298
|
- Execution time for each code block
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
pydantic_ai_rlm/__init__.py,sha256=94ev1VspkrVdB-PabCD6I791vZkBVASXv_qqneYQQ0I,794
|
|
2
2
|
pydantic_ai_rlm/agent.py,sha256=_zHBLatfhquGw3vjHC06b0lBZRpLv2nrxi7w69f7lBY,4824
|
|
3
3
|
pydantic_ai_rlm/dependencies.py,sha256=bzPXhCRJ-0D5N0FS32LAETXxp6cbInU00qaMr0qd_iQ,1306
|
|
4
|
-
pydantic_ai_rlm/logging.py,sha256=
|
|
4
|
+
pydantic_ai_rlm/logging.py,sha256=6AzSXBve5pRCfL1pGT5KkWwOZLvZGBYxS-USwieE6lY,9270
|
|
5
5
|
pydantic_ai_rlm/prompts.py,sha256=BpbugghZ_I_IjC_Il5pUClMG7bgWfzWgtsUsxwyjH10,3648
|
|
6
6
|
pydantic_ai_rlm/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
7
|
pydantic_ai_rlm/repl.py,sha256=twn6ArhaONYg49Feoi-sD6z0HkYHyHHc-prdBCsj0jo,14864
|
|
8
8
|
pydantic_ai_rlm/toolset.py,sha256=g1244qq2VzaQVhAQixLGPCWW7vJqQfjhUgf0kDxkkzo,5564
|
|
9
9
|
pydantic_ai_rlm/utils.py,sha256=_tqdMcD-_UbRbdK6ECD-XlXfRHgeAKj7ulLaXrYOJx4,1500
|
|
10
|
-
pydantic_ai_rlm-0.1.
|
|
11
|
-
pydantic_ai_rlm-0.1.
|
|
12
|
-
pydantic_ai_rlm-0.1.
|
|
13
|
-
pydantic_ai_rlm-0.1.
|
|
10
|
+
pydantic_ai_rlm-0.1.1.dist-info/METADATA,sha256=Ct5TM9Bor0DWA28OnPMzLy6WM_318_GUOZfD7I0EXa8,11832
|
|
11
|
+
pydantic_ai_rlm-0.1.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
12
|
+
pydantic_ai_rlm-0.1.1.dist-info/licenses/LICENSE,sha256=ktSo7DxQBRIZIhD4P53iVxq88CG3cvXRTBRqPT8zO1c,1085
|
|
13
|
+
pydantic_ai_rlm-0.1.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|