Module for LLM tool utilities.
Helper function for calling a function tool from a list of tools, using the arguments provided by an LLM as a JSON string. This function handles many common errors.
Returns a new function with partial application of the given keyword arguments. The new function has the same name and docstring as the original, and its signature excludes the provided kwargs.
Creates an OpenAI-compatible tool from a Python function.
If any kwargs are provided, they will be stored and provided at runtime. Provided kwargs will be removed from the tool's parameter schema.
Creates an OpenAI-compatible tool from a Pydantic model class.
Creates an OpenAI-compatible tool from a Python type.