smart_suggestions_codespark 0.2.1
smart_suggestions_codespark: ^0.2.1 copied to clipboard
On-device "related items" for Flutter — suggest similar content by meaning, fully offline, no API keys. Three-line API powered by local embeddings.
0.2.1 #
- Docs: Added
///comments on allCodesparkBackendmembers. - Formatting:
dart formaton all library files. - Screenshots: Replaced corrupted
free_text_demo.pngwith a valid PNG.
0.2.0 #
SmartSuggestions.create()— one-liner static factory combining constructor +initialize().SmartSuggestions.createWithEmbedder()— same pattern for test/custom backends.Similarity,Pooling,PoolingStrategy,ScoredIndexnow publicly exported for advanced use (custom vector ranking, MMR, normalization).- Typed exceptions —
SuggestionException,IndexOutOfRangeException,IndexDimensionMismatchExceptionreplace genericStateError/RangeError. - Web compatibility —
dart:ioabstracted behind a conditional import (library compiles on web; persistence throwsUnsupportedErroron web). - CI + benchmarks — GitHub Actions workflow (
flutter analyze+flutter test) and a benchmark test suite measuring ranking throughput.
0.1.0 #
Initial release — on-device "related items" suggestions for Flutter.
SmartSuggestions: one-call API to rank candidates by similarity to an anchor, fully on-device (no API keys, no cloud).suggest()/suggestFor<T>(): one-shot suggestions withtopKand optional cosinethreshold.suggestLike(): multi-anchor blending — average multiple reference embeddings (e.g. user history) to suggest related items.createIndex()→SuggestionIndex: embed a corpus once and suggest repeatedly; supportssimilarTo()(within-index, self-excluded),suggestDiverse()(MMR), and incrementaladd().- Persistence:
SuggestionIndex.save()/SmartSuggestions.loadIndex()— embed once, restore instantly on next launch. SuggestionsList<T>: drop-in widget that shows suggestions for a given anchor text or index position.- Pluggable
SuggestionEmbedder(default:CodesparkBackendoverai_core_codespark) — swap in a fake for model-free testing.
