Tools to make language models a bit easier to use
Project Links
Meta
Author: Jeremy Howard
Requires Python: >=3.9
Classifiers
Natural Language
- English
Intended Audience
- Developers
Development Status
- 3 - Alpha
Programming Language
- Python :: 3
- Python :: 3 :: Only
toolslm
This is a work in progress…
Install
pip install toolslm
How to use
Context creation
toolslm has some helpers to make it easier to generate XML context from
files, for instance
folder2ctx:
print(folder2ctx('samples', prefix=False, file_glob='*.py'))
<documents><document index="1"><src>
samples/sample_core.py
</src><document-content>
import inspect
empty = inspect.Parameter.empty
models = 'claude-3-opus-20240229','claude-3-sonnet-20240229','claude-3-haiku-20240307'
</document-content></document></documents>
JSON doesn’t map as nicely to XML as the ft data structure from
fastcore.xml, but for simple XML trees it can be convenient. The
json_to_xml
function handles that conversion:
a = dict(surname='Howard', firstnames=['Jeremy','Peter'],
address=dict(state='Queensland',country='Australia'))
print(json_to_xml(a, 'person'))
<person>
<surname>Howard</surname>
<firstnames>
<item>Jeremy</item>
<item>Peter</item>
</firstnames>
<address>
<state>Queensland</state>
<country>Australia</country>
</address>
</person>
0.3.34
Mar 27, 2026
0.3.33
Mar 12, 2026
0.3.32
Mar 08, 2026
0.3.31
Feb 23, 2026
0.3.30
Feb 14, 2026
0.3.29
Feb 13, 2026
0.3.28
Feb 05, 2026
0.3.27
Feb 02, 2026
0.3.26
Jan 21, 2026
0.3.25
Jan 21, 2026
0.3.24
Jan 15, 2026
0.3.23
Jan 14, 2026
0.3.22
Jan 11, 2026
0.3.20
Jan 09, 2026
0.3.19
Jan 08, 2026
0.3.18
Jan 05, 2026
0.3.17
Jan 02, 2026
0.3.16
Dec 30, 2025
0.3.14
Dec 29, 2025
0.3.13
Dec 26, 2025
0.3.12
Dec 26, 2025
0.3.11
Dec 25, 2025
0.3.10
Dec 25, 2025
0.3.9
Dec 24, 2025
0.3.8
Dec 24, 2025
0.3.7
Dec 24, 2025
0.3.6
Dec 13, 2025
0.3.5
Dec 13, 2025
0.3.4
Sep 23, 2025
0.3.3
Sep 23, 2025
0.3.2
Jun 30, 2025
0.3.1
Jun 30, 2025
0.3.0
Jun 29, 2025
0.2.3
Jun 23, 2025
0.2.2
Jun 21, 2025
0.2.1
May 21, 2025
0.2.0
Apr 28, 2025
0.1.3
Apr 17, 2025
0.1.2
Apr 07, 2025
0.1.1
Mar 29, 2025
0.1.0
Dec 17, 2024
0.0.7
Oct 23, 2024
0.0.6
Sep 10, 2024
0.0.5
Aug 21, 2024
0.0.4
Aug 14, 2024
0.0.3
May 05, 2024
0.0.2
May 05, 2024