FlutterGemmaDesktop class

Desktop plugin is not available on web

Inheritance

Properties

hashCode int
The hash code for this object.
no setterinherited
initializedEmbeddingModel EmbeddingModel?
no setterinherited
initializedModel InferenceModel?
no setterinherited
modelManager ModelFileManager
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addDocument({required String id, required String content, String? metadata}) Future<void>
Add document to vector store (will compute embedding automatically).
inherited
addDocumentWithEmbedding({required String id, required String content, required List<double> embedding, String? metadata}) Future<void>
Add document to vector store with pre-computed embedding.
inherited
clearVectorStore() Future<void>
Clear all documents from vector store.
inherited
createEmbeddingModel({String? modelPath, String? tokenizerPath, PreferredBackend? preferredBackend}) Future<EmbeddingModel>
Creates and returns a new EmbeddingModel instance.
inherited
createModel({required ModelType modelType, ModelFileType fileType = ModelFileType.task, int maxTokens = 1024, PreferredBackend? preferredBackend, List<int>? loraRanks, int? maxNumImages, bool supportImage = false}) Future<InferenceModel>
Creates and returns a new InferenceModel instance.
inherited
getVectorStoreStats() Future<VectorStoreStats>
Get vector store statistics.
inherited
initializeVectorStore(String databasePath) Future<void>
=== RAG functionality === Initialize vector store database.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
override
searchSimilar({required String query, int topK = 5, double threshold = 0.0}) Future<List<RetrievalResult>>
Search for similar documents.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

instance FlutterGemmaDesktop
no setter

Static Methods

registerWith() → void