addDocument method
Add a document with automatic chunking and embedding.
The document is split into chunks, embedded, and stored. Remember to call rebuildIndex after adding documents.
Implementation
Future<SourceAddResult> addDocument(
String content, {
String? metadata,
String? filePath,
ChunkingStrategy? strategy,
void Function(int done, int total)? onProgress,
}) => _engine!.addDocument(
content,
metadata: metadata,
filePath: filePath,
strategy: strategy,
onProgress: onProgress,
);