Add TFLite lightweight local AI solution with user-imported models#42
Draft
Add TFLite lightweight local AI solution with user-imported models#42
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 tflite_flutter and record dependencies to pubspec.yaml - Create LocalAIModelConfig model for model path configurations - Update LocalAISettings to include model configuration - Create LocalEmbeddingService for TFLite text embeddings - Create LocalSpeechRecognitionService for Whisper ONNX ASR - Create LocalOCRService for Tesseract/PaddleOCR OCR - Create LocalVectorStorageService for SQLite vector storage - Create LocalAIModelManager for model imports - Add localization strings for model management (zh and en) - Update LocalAISettingsPage with model management UI Co-authored-by: Shangjin-Xiao <84136399+Shangjin-Xiao@users.noreply.github.com>
- Fix attention mask padding logic to handle truncation properly - Use dart:async unawaited() for async dispose - Add helper methods to LocalAIModelRecommendations - Simplify recommendation dialog logic - Check vocabMap instead of vocabulary for initialization Co-authored-by: Shangjin-Xiao <84136399+Shangjin-Xiao@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Implement lightweight user import for TFLite features
Add TFLite lightweight local AI solution with user-imported models
Dec 28, 2025
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>
…able-issue Implement Local AI Features: Speech-to-Text and OCR with On-Device Processing
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 方案 D: TFLite-based on-device AI with user-imported models for embedding, ASR, and OCR. No pre-bundled models—users download/import as needed, keeping the app lightweight (50-100MB total depending on choices).
Core Services
Models
LocalAIModelConfig: Model paths, status, metadataLocalAISettingswithmodelConfigpropertyLocalAIModelRecommendations: Download URLs for recommended modelsUI
Model management section in LocalAISettingsPage:
Usage
Dependencies
tflite_flutter: ^0.10.4(Apache-2.0)record: ^5.1.0Limitations
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.