diff options
| author | sigoden <sigoden@gmail.com> | 2024-08-12 22:31:59 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-12 22:31:59 +0800 |
| commit | d79ad491067669fcf67991238e73a70aae413618 (patch) | |
| tree | 738d8d944e78955fd7b7aa0fd4fc9f6c33f24ab2 /src/rag/mod.rs | |
| parent | 92ce440b0bc8fd72b4c35f8500a8e10b488001b1 (diff) | |
| download | aichat-d79ad491067669fcf67991238e73a70aae413618.tar.gz | |
feat: support builtin website crawling (recursive_url) (#786)
Diffstat (limited to 'src/rag/mod.rs')
| -rw-r--r-- | src/rag/mod.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rag/mod.rs b/src/rag/mod.rs index 266a859..6dbb6be 100644 --- a/src/rag/mod.rs +++ b/src/rag/mod.rs @@ -371,6 +371,10 @@ impl Rag { self.data.add(next_file_id, files, document_ids, embeddings); self.data.document_paths = document_paths; + if self.data.files.is_empty() { + bail!("No RAG files"); + } + progress(&spinner, "Building store".into()); self.hnsw = self.data.build_hnsw(); self.bm25 = self.data.build_bm25(); |
