Skip to main content

The llm_tool_registry package simplifies tool/function calling integration with Language Models (LLMs) like OpenAI's GPT models. It provides a clean, type-safe way to register Python functions as tools that can be called by LLMs.

Key features:

  • Type-safe function registration with automatic JSON Schema generation
  • Automatic parameter validation and documentation checking
  • Support for OpenAI's function calling format
  • Clean decorator-based API for registering tools
  • Built-in docstring validation to ensure complete documentation
  • Handles common Python types including strings, numbers, booleans, lists, and dictionaries
  • Support for optional parameters and Union types

Example usage:

from llm_tool_registry import ToolRegistry

registry = ToolRegistry()

@registry.tool()
def get_weather(location: str, unit: str = "celsius") -> dict:
    """Get the weather for a location.
    
    Args:
        location: The city and state/country
        unit: The temperature unit (celsius/fahrenheit)
    """
    # Implementation here
    pass

# Get OpenAI-compatible schema
schemas = registry.get_openai_schema()

# Execute registered tool
result = registry.execute("get_weather", location="London, UK")

Metadata

Release files for llm-tool-registry 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llm-tool-registry 0.1.1
File Size Uploaded Provenance
llm_tool_registry-0.1.1.tar.gz 3.0 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for llm-tool-registry 0.1.1
File Interpreter ABI Platform
llm_tool_registry-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 6.9 kB

Release files / llm_tool_registry-0.1.1.tar.gz

Download URL llm_tool_registry-0.1.1.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
255fca446e9fdc7b83b89da56d44a0ee3f5de977e38f02cd8956cc33ec17002e
BLAKE2b-256 checksum
How to use checksums
7207cc2c675402271ed013a8489a3c84da4d9006a2ad11f5b4b6fa846d9cd707
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 8, 2024.

Transparency log

Release files / llm_tool_registry-0.1.1-py3-none-any.whl

Download URL llm_tool_registry-0.1.1-py3-none-any.whl
Size 3.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dcb921ca2c76b3c462bc252cc4aa05a1bfb5541f64ec12da90b0e23a6dbdea8a
BLAKE2b-256 checksum
How to use checksums
1b1902e721e3d80fef7f166031c0a1a1dae5d2e5a0c436e7896cfe732b556e80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 8, 2024.

Transparency log

Security for llm-tool-registry 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for llm_tool_registry-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 8, 2024.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page