ai_core_codespark 0.2.0
ai_core_codespark: ^0.2.0 copied to clipboard
Local AI model for Flutter — on-device text embeddings & vector search, fully offline, no API keys or cloud. The engine behind semantic search & RAG.
0.2.0 #
- Typed exceptions —
ModelDownloadOfflineException,InsufficientStorageException, andEngineNotInitializedException(all extendCodesparkException), thrown at the right points so you can write precise try/catch aroundinitialize()andembed(). - AI-agent-friendly docs — added "AI Agent Context" guidance to the primary
methods (
initialize,embed) and anllms.txtdescribing intent + minimal syntax for LLM tooling. - Example — added
example/lib/download_progress_ui.dartshowing a real first-run download UI with progress + error/retry handling.
0.1.1 #
- Docs: removed decorative emoji from the README for a cleaner, plain-text read.
- Docs: added a "More from ksaikiran.dev" section linking related text, search, and input packages.
0.1.0 #
Initial release — the on-device embedding foundation for the codespark family.
CodesparkEngine: one-call API to download, verify, load and run an embedding model entirely on-device (offline, no API keys).ModelManager: streamed model download with SHA-256 verification and an atomic, cached, resumable-safe install. Ships a pinned, verified all-MiniLM-L6-v2 (int8, 384-dim) inModelCatalog.BertTokenizer: pure-Dart WordPiece tokenizer, verified byte-for-byte against the HuggingFace reference tokenizer (accents, CJK, Cyrillic, punctuation).Embedder+EmbedderIsolate: ONNX inference with mean/cls/max pooling and L2 normalization, run on a background isolate to keep the UI smooth.Similarity: cosine, dot product, top-k and MMR (diversity-aware ranking).VectorStore: in-memory brute-force search with JSON persistence.