mellea.stdlib.genslot
A method to generate outputs based on python functions and a Generative Slot function.
Functions
create_response_format
func: A function with exactly one argument
- A Pydantic model class that inherits from FunctionResponse[T]
describe_function
func: Callable function that needs to be passed to generative slot.
- Function dict of the passed function.
get_annotation
func: Callable Functionkey: Arg keysval: Arg Values
- An annotated string for a given func.
bind_function_arguments
func: The function to bind arguments for.*args: Positional arguments to bind.**kwargs: Keyword arguments to bind.
- Dictionary mapping parameter names to bound values with defaults applied.
generative
func: Function with docstring and type hints. Implementation can be empty (…).
- An AI-powered function that generates responses using an LLM based on the
- original function’s signature and docstring.