feat: implement ONNX Runtime + ObjectBox local AI stack (方案 C)#41
Draft
feat: implement ONNX Runtime + ObjectBox local AI stack (方案 C)#41
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
- Add ONNX, ObjectBox, sherpa_onnx, ML Kit dependencies - Create ONNXInferenceService for model loading and inference - Create TokenizerService with WordPiece tokenization - Create EmbeddingService for text embedding generation - Create VectorSearchService for ObjectBox vector search - Create ASRService for speech-to-text using sherpa_onnx - Create OCRService for text recognition using Google ML Kit - Add NoteVector ObjectBox entity with HNSW index Co-authored-by: Shangjin-Xiao <84136399+Shangjin-Xiao@users.noreply.github.com>
- Add null safety checks for note.id in indexNote method - Add better documentation for ObjectBox initialization steps - Improve embedding extraction with type safety validation - Add batch processing optimization for search method - Replace Map return type with strongly-typed QuoteInfo class - Add clear documentation for ASR placeholder implementation - Make embedding dimension configurable with documentation Co-authored-by: Shangjin-Xiao <84136399+Shangjin-Xiao@users.noreply.github.com>
Co-authored-by: Shangjin-Xiao <84136399+Shangjin-Xiao@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Implement ONNX Runtime and ObjectBox integration
feat: implement ONNX Runtime + ObjectBox local AI stack (方案 C)
Dec 28, 2025
…rors Co-authored-by: Shangjin-Xiao <84136399+Shangjin-Xiao@users.noreply.github.com>
Co-authored-by: Shangjin-Xiao <84136399+Shangjin-Xiao@users.noreply.github.com>
Co-authored-by: Shangjin-Xiao <84136399+Shangjin-Xiao@users.noreply.github.com>
Co-authored-by: Shangjin-Xiao <84136399+Shangjin-Xiao@users.noreply.github.com>
…endency-issue Fix onnxruntime dependency version, resolve analyzer errors, and enable local AI features
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements on-device AI capabilities using ONNX Runtime for inference and ObjectBox for vector search, enabling offline semantic search, embedding generation, OCR, and ASR.
Dependencies
onnxruntime: ^1.16.0- ONNX inference (MIT)objectbox: ^4.0.0+objectbox_flutter_libs+objectbox_generator- Vector DB (Apache-2.0)sherpa_onnx: ^1.11.3- ASR (Apache-2.0)google_mlkit_text_recognition: ^0.13.0- OCR (MIT)record: ^5.1.0,camera: ^0.11.0- Input captureNew Services (
lib/services/local_ai/)paraphrase-multilingual-MiniLM-L12-v2(384d)ObjectBox Entities (
lib/models/objectbox/)NoteVector- Note embeddings with HNSW indexSearchHistory- Query trackingSimilarNotesCache- Precomputed similarity relationshipsUsage
Setup Required
dart run build_runner build- Generate ObjectBox codeassets/models/Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.