use nodedb_types::{filter::MetadataFilter, id::NodeId};
use std::collections::HashSet;
pub struct GraphRagParams<'a> {
pub collection: &'a str,
pub query: &'a [f32],
pub vector_k: usize,
pub graph_depth: u8,
pub top_k: usize,
pub filter: Option<&'a MetadataFilter>,
pub allowed_ids: Option<&'a HashSet<String>>,
pub rrf_k: f64,
pub seed_nodes: Option<&'a [NodeId]>,
}
impl Default for GraphRagParams<'_> {
fn default() -> Self {
Self {
collection: "",
query: &[],
vector_k: 10,
graph_depth: 2,
top_k: 10,
filter: None,
allowed_ids: None,
seed_nodes: None,
rrf_k: 60.0,
}
}
}
pub struct HybridSearchParams<'a> {
pub collection: &'a str,
pub query_embedding: &'a [f32],
pub query_text: &'a str,
pub text_field: &'a str,
pub vector_k: usize,
pub text_k: usize,
pub top_k: usize,
pub filter: Option<&'a MetadataFilter>,
pub allowed_ids: Option<&'a HashSet<String>>,
}
impl Default for HybridSearchParams<'_> {
fn default() -> Self {
Self {
collection: "",
query_embedding: &[],
query_text: "",
text_field: "",
vector_k: 10,
text_k: 10,
top_k: 10,
filter: None,
allowed_ids: None,
}
}
}