taptune

Creator: coderz1093

Last updated:

0 purchases

TODO
Add to Cart

Description:

taptune

TapTuneSDK #


TapTuneSDK is an intelligent settings assistant SDK designed to interact with large model workflow APIs. This SDK simplifies the integration of complex AI workflows into your applications, allowing for easy configuration and management of various settings through a seamless API interface.
Features #

Easy Initialization: Quickly set up with a few lines of code.
Workflow Interaction: Effortlessly interact with large language model workflows.
Customizable Knowledge Base: Create and manage your own knowledge base for specific workflows.
Callback Support: Supports automatic execution of callbacks after workflow completion.

Installation #
Add the following dependency to your pubspec.yaml:
dependencies:
taptune: ^1.0.0
copied to clipboard
Then run:
flutter pub get
copied to clipboard
Getting Started #
Import the SDK #
import 'package:taptune/taptune.dart';
copied to clipboard
Initialize the SDK #
To start using TapTuneSDK, you first need to initialize it with your appID, a knowledge base, and a callback function:
void main() async {
final tapTune = TapTuneSDK();

bool initSuccess = await tapTune.init(
appID: 'appid0001',
knowledgeBase: [
KnowledgeBase(
id: 'c6c7aa5f-066e-aa87-f42a-b230ace2aa5b',
name: 'Dark Mode',
params: [
Params(name: 'false', desc: 'Turn off dark mode'),
Params(name: 'true', desc: 'Turn on dark mode'),
],
desc: 'This setting helps users enable dark mode, also known as night mode, which can reduce eye strain caused by screen brightness.',
),
],
callback: (result) {
print('Callback executed with result: $result');
},
);

if (initSuccess) {
print('Initialization successful.');
// Further operations
} else {
print('Initialization failed.');
}
}
copied to clipboard
Calling a Workflow #
You can call a workflow by providing a query string. Optionally, you can enable automatic callback execution:
var result = await tapTune.callWorkflow('Enable dark mode', auto: true);
print('Result with auto: $result');

var resultWithoutAuto = await tapTune.callWorkflow('Disable dark mode');
print('Result without auto: $resultWithoutAuto');
copied to clipboard
Updating the Knowledge Base #
You can update or modify the knowledge base at any point:
bool success = await tapTune.updateKnowledgeBase([
KnowledgeBase(
id: 'c6c7aa5f-066e-aa87-f42a-b230ace2aa5b',
name: 'Dark Mode',
params: [
Params(name: 'false', desc: 'Turn off dark mode'),
Params(name: 'true', desc: 'Turn on dark mode'),
],
desc: 'This setting helps users enable dark mode.',
),
]);
copied to clipboard
API Reference #
TapTuneSDK #

init({required String appID, required List: Initializes the SDK with the provided appID, knowledgeBase, and callback.
updateKnowledgeBase(List: Updates or creates the knowledge base.
callWorkflow(String query, {bool auto = false, String? appID}): Calls the workflow with the given query.

KnowledgeBase #

id: The ID of the knowledge base.
name: The name of the knowledge base.
params: A list of parameters for the knowledge base.
desc: A description of the knowledge base.

Params #

name: The name of the parameter.
desc: A description of the parameter.

Example #
void main() async {
final tapTune = TapTuneSDK();

bool initSuccess = await tapTune.init(
appID: 'appid0001',
knowledgeBase: [
KnowledgeBase(
id: 'c6c7aa5f-066e-aa87-f42a-b230ace2aa5b',
name: 'Dark Mode',
params: [
Params(name: 'false', desc: 'Turn off dark mode'),
Params(name: 'true', desc: 'Turn on dark mode'),
],
desc: 'This setting helps users enable dark mode, also known as night mode, which can reduce eye strain caused by screen brightness.',
),
],
callback: (result) {
print('Callback executed with result: $result');
},
);

if (initSuccess) {
print('Initialization successful.');

var result = await tapTune.callWorkflow('Enable dark mode', auto: true);
print('Result with auto: $result');

var resultWithoutAuto = await tapTune.callWorkflow('Disable dark mode');
print('Result without auto: $resultWithoutAuto');
} else {
print('Initialization failed.');
}
}
copied to clipboard
License #
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing #
Contributions are welcome! Please read the Contributing Guide for more details.
Contact #
For any issues or feature requests, please open an issue on the GitHub repository.

Thank you for using TapTuneSDK! We hope it helps you simplify your workflow interactions.
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.