toolslm


Nametoolslm JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttps://github.com/AnswerDotAI/toolslm
SummaryTools to make language models a bit easier to use
upload_time2024-12-17 18:33:04
maintainerNone
docs_urlNone
authorJeremy Howard
requires_python>=3.9
licenseApache Software License 2.0
keywords nbdev jupyter notebook python
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # toolslm


<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

This is a work in progress…

## Install

``` sh
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`](https://AnswerDotAI.github.io/toolslm/xml.html#folder2ctx):

``` python
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`](https://AnswerDotAI.github.io/toolslm/xml.html#json_to_xml)
function handles that conversion:

``` python
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>

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/AnswerDotAI/toolslm",
    "name": "toolslm",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "nbdev jupyter notebook python",
    "author": "Jeremy Howard",
    "author_email": "j@fast.ai",
    "download_url": "https://files.pythonhosted.org/packages/92/5c/fe6e76bfaab86ffcafb389cf383ac63af9baf0f5ecff502f552579aa3a32/toolslm-0.1.0.tar.gz",
    "platform": null,
    "description": "# toolslm\n\n\n<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->\n\nThis is a work in progress\u2026\n\n## Install\n\n``` sh\npip install toolslm\n```\n\n## How to use\n\n### Context creation\n\ntoolslm has some helpers to make it easier to generate XML context from\nfiles, for instance\n[`folder2ctx`](https://AnswerDotAI.github.io/toolslm/xml.html#folder2ctx):\n\n``` python\nprint(folder2ctx('samples', prefix=False, file_glob='*.py'))\n```\n\n    <documents><document index=\"1\"><src>\n    samples/sample_core.py\n    </src><document-content>\n    import inspect\n    empty = inspect.Parameter.empty\n    models = 'claude-3-opus-20240229','claude-3-sonnet-20240229','claude-3-haiku-20240307'\n    </document-content></document></documents>\n\nJSON doesn\u2019t map as nicely to XML as the `ft` data structure from\n`fastcore.xml`, but for simple XML trees it can be convenient. The\n[`json_to_xml`](https://AnswerDotAI.github.io/toolslm/xml.html#json_to_xml)\nfunction handles that conversion:\n\n``` python\na = dict(surname='Howard', firstnames=['Jeremy','Peter'],\n         address=dict(state='Queensland',country='Australia'))\nprint(json_to_xml(a, 'person'))\n```\n\n    <person>\n      <surname>Howard</surname>\n      <firstnames>\n        <item>Jeremy</item>\n        <item>Peter</item>\n      </firstnames>\n      <address>\n        <state>Queensland</state>\n        <country>Australia</country>\n      </address>\n    </person>\n",
    "bugtrack_url": null,
    "license": "Apache Software License 2.0",
    "summary": "Tools to make language models a bit easier to use",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/AnswerDotAI/toolslm"
    },
    "split_keywords": [
        "nbdev",
        "jupyter",
        "notebook",
        "python"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "aeb8de8ec2d77dac8912da14f5f32b8d630dced44b3992b78810a3bc17de3718",
                "md5": "c222c854bf88d64ba91559bac40bf170",
                "sha256": "6dc5954bc7aec003aeb41a9bfb2977270b5bbc479b0e8f7b20c8b32b494d35f1"
            },
            "downloads": -1,
            "filename": "toolslm-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c222c854bf88d64ba91559bac40bf170",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 15693,
            "upload_time": "2024-12-17T18:33:02",
            "upload_time_iso_8601": "2024-12-17T18:33:02.100274Z",
            "url": "https://files.pythonhosted.org/packages/ae/b8/de8ec2d77dac8912da14f5f32b8d630dced44b3992b78810a3bc17de3718/toolslm-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "925cfe6e76bfaab86ffcafb389cf383ac63af9baf0f5ecff502f552579aa3a32",
                "md5": "109b6621d5b51da529efa07a9be31347",
                "sha256": "44b8f40a3d03df15f21c096737fb3efa37cc0fa9d1050e0c1ebeaf0580a43535"
            },
            "downloads": -1,
            "filename": "toolslm-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "109b6621d5b51da529efa07a9be31347",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 16106,
            "upload_time": "2024-12-17T18:33:04",
            "upload_time_iso_8601": "2024-12-17T18:33:04.283885Z",
            "url": "https://files.pythonhosted.org/packages/92/5c/fe6e76bfaab86ffcafb389cf383ac63af9baf0f5ecff502f552579aa3a32/toolslm-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-17 18:33:04",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "AnswerDotAI",
    "github_project": "toolslm",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "toolslm"
}
        
Elapsed time: 0.68942s