ragDestroyPipeline static method

Future<void> ragDestroyPipeline()

Destroy the RAG pipeline and release native resources.

Publishes SDKRAGEvent.pipelineDestroyed after destruction.

Throws SDKError.notInitialized if SDK is not initialized.

Implementation

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

  DartBridgeRAG.shared.destroy();
  EventBus.shared.publish(SDKRAGEvent.pipelineDestroyed());
}