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

Dartantic provider plugin enabling local LLM inference using Google's Gemma models via Flutter

dartantic_gemma #

Dartantic provider plugin for Flutter Gemma local LLM inference.

Overview #

This package provides a Dartantic provider implementation that uses the flutter_gemma library for managing local LLM model interactions on Flutter mobile applications.

Features #

  • Local LLM Inference: Run Gemma and other local models on-device
  • Thinking Mode: Support for Gemma 4 E2B/E4B thinking mode via enableThinking parameter
  • Tool Calling: Full function calling support for GPT-style tool usage
  • Embeddings: Text embeddings generation for semantic search and retrieval

Usage #

import 'package:dartantic_gemma/dartantic_gemma.dart';

final provider = FlutterGemmaProvider(huggingFaceToken: 'your-token');

// Create a chat model with thinking enabled
final chatModel = provider.createChatModel(
  name: 'gemma-4b-it',
  enableThinking: true,
  temperature: 0.7,
);

// Create an embeddings model
final embeddingsModel = provider.createEmbeddingsModel(
  name: 'embedding-gemma',
);

// Stream chat responses
await for (final result in chatModel.sendStream(messages)) {
  // Handle result
}

Requirements #

  • Dart SDK ^3.10.0
  • Flutter SDK ^3.41.0 (stable)
  • flutter_gemma ^0.13.2

License #

BSD 3-Clause License - see LICENSE file for details.

0
likes
130
points
53
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Dartantic provider plugin enabling local LLM inference using Google's Gemma models via Flutter

Repository (GitHub)
View/report issues

License

BSD-3-Clause (license)

Dependencies

dartantic_interface, flutter, flutter_gemma, genai_primitives, json_schema_builder, logging, meta, mime, uuid

More

Packages that depend on dartantic_gemma