flutter_ai_core 0.1.1 copy "flutter_ai_core: ^0.1.1" to clipboard
flutter_ai_core: ^0.1.1 copied to clipboard

Dependency-free Dart foundation for AI chat: message and conversation models, a streaming MessageProcessor with granular mutations, and the provider and renderer contracts the rest of the flutter_ai f [...]

Changelog #

0.1.1 #

Bug fixes in MessageProcessor:

  • Zero-argument tool calls (a ToolCallReady with no streamed arguments) now resolve to empty args + inputAvailable instead of being marked errored.
  • A ToolResultReceived whose messageId differs from the call's message (the normal case — results arrive in a separate tool-role message) now correctly advances the original call to outputAvailable.
  • A tool-scoped StreamErrorEvent (with toolCallId) now marks only that call errored and lets generation continue, instead of failing the whole message — matching UseChatController.
  • Doc fix: corrected a stale reference to flutter_markdown_plus.
  • JsonAccumulator no longer surfaces an unterminated trailing number/keyword (e.g. 1234 from {"n": 1234) as a complete value — a literal must be delimiter-terminated, preserving the "a partial is always a prefix" contract.
  • MessageProcessor resolves a tool result to its owning call by scanning the conversation when the in-memory map misses (after reset()/rehydration).
  • deepHash uses order-independent hashing for maps (better distribution).

0.1.0 #

Initial release.

  • Models: AiConversation, AiMessage, AiMessageStatus, AiRole, FinishReason, and the sealed AiPart hierarchy (TextPart, ReasoningPart, ToolCallPart, ToolResultPart, FilePart, SourcePart, DataPart) with manual JSON serialization and value equality.
  • Streaming: sealed AiStreamEvent set, MessageProcessor reducer with granular MutationResults, and the tolerant JsonAccumulator for partial tool-call arguments.
  • Contracts: LlmProvider, TextRenderer, AiRequestOptions, ToolDefinition.
  • Zero runtime dependencies (dart:core + dart:convert only).
1
likes
0
points
542
downloads

Publisher

unverified uploader

Weekly Downloads

Dependency-free Dart foundation for AI chat: message and conversation models, a streaming MessageProcessor with granular mutations, and the provider and renderer contracts the rest of the flutter_ai family builds on.

Homepage
Repository (GitHub)
View/report issues

Topics

#ai #llm #chat #streaming #flutter

License

unknown (license)

More

Packages that depend on flutter_ai_core