Skip to main content

apple_foundation_models 0.1.0 copy "apple_foundation_models: ^0.1.0" to clipboard
apple_foundation_models: ^0.1.0 copied to clipboard

Run Apple's on-device language model from Flutter. Streaming, tool calling, and schema-constrained structured output — private, offline, and free.

0.1.0 #

Initial release.

  • Generation guides: Schema.integer(min:, max:), Schema.number(min:, max:), Schema.string(pattern:), Schema.array(exactItems:). Bounds constrain generation itself, so a 1-to-5 rating cannot come back as 47.

  • respondInto / streamInto decode straight into your own types.

  • deltas() turns cumulative snapshots into increments.

  • ModelUseCase.contentTagging selects Apple's tagging-tuned model.

  • AppleFoundationModels.supportedLanguages() and availabilityChanges, the latter firing when the model finishes downloading mid-session.

  • AppleFoundationModels.availability() with typed reasons — deviceNotEligible, appleIntelligenceNotEnabled, modelNotReady, osTooOld, unsupportedPlatform — each carrying an explanation and, where one exists, a remedy.

  • LanguageModelSession with instructions, transcript, prewarm, and isResponding.

  • Four response modes: respond, respondAs (schema-constrained), stream, and streamAs (structured output arriving progressively).

  • A Dart schema DSL — objects, arrays, enums, optional fields — rebuilt natively as a DynamicGenerationSchema, so typed output needs no codegen.

  • Tool calling: the model invokes a Dart function mid-generation and waits for the result.

  • GenerationOptions with temperature, token cap, and greedy / top-k / top-p sampling.

  • Every framework error mapped to its own exception type.

  • Compiles and runs on every platform. Non-Apple targets report unsupportedPlatform instead of failing the build, and an Xcode without the iOS 26 SDK still compiles.

1
likes
0
points
700
downloads

Documentation

Documentation

Publisher

verified publisherjumyn.com

Weekly Downloads

Run Apple's on-device language model from Flutter. Streaming, tool calling, and schema-constrained structured output — private, offline, and free.

Repository (GitHub)
View/report issues

Topics

#ai #llm #on-device #apple-intelligence #ios

License

unknown (license)

Dependencies

flutter

More

Packages that depend on apple_foundation_models

Packages that implement apple_foundation_models