ragDocumentCount static method

Future<int> ragDocumentCount()

Get the number of indexed document chunks in the pipeline.

Returns 0 if the pipeline has not been created.

Throws SDKError.notInitialized if SDK is not initialized.

Implementation

static Future<int> ragDocumentCount() async {
  if (!RunAnywhere.isSDKInitialized) {
    throw SDKError.notInitialized();
  }

  return DartBridgeRAG.shared.documentCount;
}