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

On-device LanguageModel for the Akashi agent framework, backed by flutter_gemma: run agents fully offline, or as the primary in a cloud FallbackModel chain.

akashi_gemma #

On-device LanguageModel for the Akashi agent framework, backed by flutter_gemma. Proves Akashi's LanguageModel contract is not HTTP-bound: run agents fully offline, or as the primary in a cloud FallbackModel (via akashi_gateway).

import 'package:akashi/akashi.dart';
import 'package:akashi_gemma/akashi_gemma.dart';
import 'package:flutter_gemma/flutter_gemma.dart';

final inference = await FlutterGemmaPlugin.instance.createModel(/* ... */);
final chat = await inference.createChat(/* tools, temperature, ... */);
final model = GemmaModel(FlutterGemmaBackend(chat));

final agent = ToolLoopAgent(model: model, tools: [getWeather]);
await agent.run('What should I wear in Oslo?');

The GemmaBackend seam keeps normalization testable offline (a scripted backend), while FlutterGemmaBackend drives real device inference — including parallel function calls. Streaming honors request.cancel to stop long on-device generations. Requires Dart ≥3.12 / Flutter ≥3.44.

See example/akashi_gemma_example.dart for the offline scripted version that runs without a device.

Status #

v0.3. Resolves standalone (own lockfile, akashi path-overridden) because it depends on the Flutter SDK and flutter_gemma.

License #

MIT.

0
likes
160
points
46
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

On-device LanguageModel for the Akashi agent framework, backed by flutter_gemma: run agents fully offline, or as the primary in a cloud FallbackModel chain.

Repository (GitHub)
View/report issues

Topics

#ai #agents #on-device #gemma

License

MIT (license)

Dependencies

akashi, flutter, flutter_gemma, meta

More

Packages that depend on akashi_gemma