Skip to main content

qlaya_flutter 0.4.0 copy "qlaya_flutter: ^0.4.0" to clipboard
qlaya_flutter: ^0.4.0 copied to clipboard

QLaya Flutter & Dart client for the fast, local, on-device decision engine with calibrated probabilities and user-selectable quantized model variants.

example/main.dart

import 'package:qlaya_flutter/qlaya_flutter.dart';

void main() async {
  print('=== QLaya Quantized Models ===');
  for (final id in QLayaModels.allIds) {
    final spec = QLayaModels.all[id]!;
    print('- $id: ${spec.sizeMb} MB (p50: ${spec.latencyP50Ms} ms, RAM: ${spec.ramWorkingSetMb} MB) — ${spec.description}');
  }

  // Resolve model by exact key or fuzzy slug
  final model = QLayaModels.resolve('ultra-fast-edge');
  print('\nResolved model spec:');
  print('  Repo: ${model.repo}');
  print('  Subfolder: ${model.subfolder}');
  print('  Size: ${model.sizeMb} MB');
  print('  Latency: ${model.latencyP50Ms} ms');

  // Client usage against local server (qlaya-serve)
  final client = QLayaClient(baseUrl: 'http://localhost:8000');
  try {
    print('\nSending sample query to local server...');
    final result = await client.predict(
      text: 'I was charged twice, please refund',
      model: model,
    );
    print('Prediction answers: ${result.answers}');
  } catch (e) {
    print('Note: To run live prediction, start the server using `qlaya-serve` ($e)');
  } finally {
    client.close();
  }
}
2
likes
0
points
596
downloads

Publisher

unverified uploader

Weekly Downloads

QLaya Flutter & Dart client for the fast, local, on-device decision engine with calibrated probabilities and user-selectable quantized model variants.

Repository (GitHub)
View/report issues

Topics

#flutter #machine-learning #onnx #ai #inference

License

unknown (license)

Dependencies

http, json_annotation

More

Packages that depend on qlaya_flutter