Last updated:
0 purchases
opentool dart
opentool_dart #
English · 中文
An OpenTool JSON Spec Parser for dart with ToolDrivers.
Inspired by OpenAPI, OpenRPC, and OpenAI function calling example.
Features #
Load OpenTool json file, and convert to dart object. See OpenTool Specification.
ToolDriver abstract class for LLM function calling support.
Support JSON Specification/Driver: OpenAPI3/HTTP, OpenRPC/JsonRPC, OpenModbus/RTU/ASCII/TCP/UDP
Usage #
According to /example/opentool_dart_example.dart.
From JSON String
Future<void> main() async {
String jsonString = "{...OpenTool String...}";
OpenToolLoader openToolLoader = OpenToolLoader();
OpenTool openTool = await openToolLoader.load(jsonString);
}
copied to clipboard
From JSON File
Future<void> main() async {
String jsonPath = "$currentWorkingDirectory/example/json/$jsonFileName";
OpenToolLoader openToolLoader = OpenToolLoader();
OpenTool openTool = await openToolLoader.loadFromFile(jsonPath);
}
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.