llm_tool_calling 0.2.0
llm_tool_calling: ^0.2.0 copied to clipboard
Turn Dart functions into LLM tools for OpenAI, Gemini and Claude. Annotate with @Tool to generate the JSON schema, argument validation and type-safe dispatch.
0.2.0 #
validateArguments()checks nested objects (fields withproperties), reporting paths likebooking.passengers[0].age is required.validateArguments()checks every item of anarrayagainstitems, reporting paths liketags[2]andgrid[1][0].validateArguments()checksenumlists and reports the allowed values, e.g.unit must be one of "celsius", "fahrenheit", got "kelvin".
0.1.0 #
- Initial release.
@Tooland@Paramannotations.ToolDefinitionwith name, description, JSON schema,requiresConfirmationandcall(), which validates arguments before running the tool.validateArguments(): checks required, unknown and wrongly typed arguments and reports every problem at once. Whole numbers sent as5.0are accepted forinteger.ToolArgumentExceptionwith a message an LLM can use to fix its call.