Bot releases are hidden (Show)
compile
method fixed for both tool
and ToolRegistry
marshal_annotation
and compile_value
to support set
type parameterPublished by synacktraa about 1 month ago
Full Changelog: https://github.com/synacktraa/tool-parse/compare/v0.2.0...0.2.1
Published by synacktraa about 2 months ago
What's New?
typing.Optional[<type>]
/t.Union[<type>, None]
/<type> | None
Published by synacktraa 3 months ago
Excited to announce the initial release of tool-parse, a Python library designed to simplify LLM tool-calling!
pydantic.BaseModel
, typing.TypedDict
, and typing.NamedTuple
pip install tool-parse
from tool_parse import ToolRegistry
tr = ToolRegistry()
@tr.register
def search_function(query: str, max_results: int = 10):
"""
Search the web for given query
:param query: The search query string
:param max_results: Maximum number of results to return
"""
...
# Generate schema
tools = tr.marshal('base')
# Invoke tool
result = tr.compile('search_function("Python programming", max_results=5)')
For more detailed usage examples and documentation, please refer to our README.
contributions, issues, and feature requests are welcome! Feel free to check our issues page.
Thank you for your interest in tool-parse. Looking forward to seeing how you'll use it in your projects!