FlutterGemmaPlugin class abstract
Interface for the FlutterGemma plugin.
- Inheritance
-
- Object
- PlatformInterface
- FlutterGemmaPlugin
- Implementers
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- initializedEmbeddingModel → EmbeddingModel?
-
no setter
- initializedModel → InferenceModel?
-
no setter
- modelManager → ModelFileManager
-
no setter
- 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).
-
addDocumentWithEmbedding(
{required String id, required String content, required List< double> embedding, String? metadata}) → Future<void> - Add document to vector store with pre-computed embedding.
-
clearVectorStore(
) → Future< void> - Clear all documents from vector store.
-
createEmbeddingModel(
{required String modelPath, required String tokenizerPath, PreferredBackend? preferredBackend}) → Future< EmbeddingModel> - Creates and returns a new EmbeddingModel instance.
-
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.
-
getVectorStoreStats(
) → Future< VectorStoreStats> - Get vector store statistics.
-
initializeVectorStore(
String databasePath) → Future< void> - === RAG functionality === Initialize vector store database.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
searchSimilar(
{required String query, int topK = 5, double threshold = 0.0}) → Future< List< RetrievalResult> > - Search for similar documents.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance ↔ FlutterGemmaPlugin
-
getter/setter pair