feat: append new built-in rag__query function to RAG contexts to allow further querying by LLMs
CI / All (ubuntu-latest) (push) Failing after 29s
CI / All (macos-latest) (push) Has been cancelled
CI / All (windows-latest) (push) Has been cancelled

This commit is contained in:
2026-08-12 16:25:50 -06:00
parent b87a3460c4
commit 68135b97d1
6 changed files with 159 additions and 6 deletions
+14
View File
@@ -856,6 +856,20 @@ impl Rag {
Ok((embeddings, sources, ids))
}
pub async fn search_chunks(
&self,
text: &str,
top_k: usize,
rerank_model: Option<&str>,
) -> Result<Vec<(String, String)>> {
let results = self.hybrid_search(text, top_k, rerank_model).await?;
Ok(results
.into_iter()
.map(|(id, content)| (content, self.resolve_source(&id)))
.collect())
}
pub async fn search_with_template(
&self,
app: &AppConfig,