tool_schema_generator 0.3.0 copy "tool_schema_generator: ^0.3.0" to clipboard
tool_schema_generator: ^0.3.0 copied to clipboard

Generate JSON Schema Draft 2020-12 tool definitions and dispatchers for LLM function calling from annotated Dart functions.

example/README.md

Example usage of tool_schema_generator #

This example demonstrates how to use the tool_schema_generator package to automatically generate JSON Schema definitions for your Dart functions.

Setup #

  1. Add tool_schema_generator to your dependencies.
  2. Add build_runner to your dev_dependencies.
dependencies:
  tool_schema_generator: ^0.3.0

dev_dependencies:
  build_runner: ^2.4.0

Running the generator #

After adding your @Tool() annotations, run the build runner to generate the .g.dart file:

dart run build_runner build -d

Check out lib/tools.dart in this example to see how the annotations are used!

0
likes
160
points
311
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Generate JSON Schema Draft 2020-12 tool definitions and dispatchers for LLM function calling from annotated Dart functions.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

analyzer, build, source_gen

More

Packages that depend on tool_schema_generator