contentRetriever function

  1. @Riverpod(keepAlive: true)
ContentRetriever contentRetriever(
  1. Ref<Object?> ref
)

Implementation

@Riverpod(keepAlive: true)
ContentRetriever contentRetriever(Ref ref) {
  final retriever = ContentRetriever(ref.watch(supabaseDatasourceProvider));
  final localEmbed = ref.watch(localEmbeddingProvider);
  final localStore = ref.watch(localVectorStoreProvider);
  if (localEmbed != null) retriever.setLocalEmbedding(localEmbed);
  if (localStore != null) retriever.setLocalVectorStore(localStore);
  return retriever;
}