nobodywho 0.5.2 copy "nobodywho: ^0.5.2" to clipboard
nobodywho: ^0.5.2 copied to clipboard

On-device AI for mobile & desktop — text, embeddings, RAG & function calling. Run GGUF models with Metal/Vulkan acceleration. Free for commercial use.

example/lib/main.dart

import 'dart:io';

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:nobodywho/nobodywho.dart' as nobodywho;
import 'package:path_provider/path_provider.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await nobodywho.NobodyWho.init();

  runApp(const MainApp());
}

class MainApp extends StatelessWidget {
  const MainApp({super.key});

  Future<void> _onPressed() async {
    try {
      final dir = await getApplicationDocumentsDirectory();
      // Download this model : https://huggingface.co/NobodyWho/Qwen_Qwen3-0.6B-GGUF/resolve/main/Qwen_Qwen3-0.6B-Q4_K_M.gguf
      // Create an `assets` folder if not already existing at the root of your flutter project and put the model in it
      // Rename it the model `model.gguf`
      final model = File('${dir.path}/model.gguf');
      // Remember to register assets folder in pubspec.yaml like so :
      // flutter:
      //   assets:
      //     - assets/

      if (!await model.exists()) {
        final data = await rootBundle.load('assets/model.gguf');
        await model.writeAsBytes(data.buffer.asUint8List(), flush: true);
      }

      final chat = await nobodywho.Chat.fromPath(modelPath: model.path);
      final msg = await chat.ask('Is water wet?').completed();

      print(msg);
    } catch (err) {
      print("Error :$err");
    }
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: ElevatedButton(
            onPressed: _onPressed,
            child: Text("Ask question"),
          ),
        ),
      ),
    );
  }
}
15
likes
150
points
777
downloads

Documentation

Documentation
API reference

Publisher

verified publishernobodywho.ooo

Weekly Downloads

On-device AI for mobile & desktop — text, embeddings, RAG & function calling. Run GGUF models with Metal/Vulkan acceleration. Free for commercial use.

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

#ai #llm #genai #inference #local-ai

License

EUPL-1.2 (license)

Dependencies

ffi, flutter, flutter_rust_bridge, freezed_annotation, plugin_platform_interface

More

Packages that depend on nobodywho

Packages that implement nobodywho