pub struct KnowledgeSearchBody {
pub request_id: Option<String>,
pub query: String,
pub knowledge_ids: Vec<String>,
pub document_ids: Option<Vec<String>>,
pub top_k: Option<u32>,
pub top_n: Option<u32>,
pub recall_method: Option<KnowledgeRecallMethod>,
pub recall_ratio: Option<u8>,
pub rerank_status: Option<u8>,
pub rerank_model: Option<KnowledgeRerankModel>,
pub score_threshold: Option<f64>,
}Expand description
JSON body for a semantic knowledge search.
Fields§
§request_id: Option<String>Optional caller-generated request identifier.
query: StringSearch query text (up to 1000 characters).
knowledge_ids: Vec<String>Knowledge bases to search.
document_ids: Option<Vec<String>>Restrict retrieval to these document identifiers.
top_k: Option<u32>Final result count (1..=20, server default 8).
top_n: Option<u32>Initial recall count (1..=100, server default 10).
recall_method: Option<KnowledgeRecallMethod>Recall strategy (server default: mixed).
recall_ratio: Option<u8>Vector-search weight for mixed retrieval (1..=99).
rerank_status: Option<u8>Whether reranking is enabled (0 or 1).
rerank_model: Option<KnowledgeRerankModel>Reranking model.
score_threshold: Option<f64>Similarity threshold in the open interval (0, 1).
The Rust field keeps its historical name while the wire field follows
the upstream fractional_threshold schema.
Trait Implementations§
Source§impl Clone for KnowledgeSearchBody
impl Clone for KnowledgeSearchBody
Source§fn clone(&self) -> KnowledgeSearchBody
fn clone(&self) -> KnowledgeSearchBody
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for KnowledgeSearchBody
impl Debug for KnowledgeSearchBody
Source§impl<'de> Deserialize<'de> for KnowledgeSearchBody
impl<'de> Deserialize<'de> for KnowledgeSearchBody
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for KnowledgeSearchBody
impl Serialize for KnowledgeSearchBody
Source§impl Validate for KnowledgeSearchBody
impl Validate for KnowledgeSearchBody
Source§impl<'v_a> ValidateArgs<'v_a> for KnowledgeSearchBody
impl<'v_a> ValidateArgs<'v_a> for KnowledgeSearchBody
Auto Trait Implementations§
impl Freeze for KnowledgeSearchBody
impl RefUnwindSafe for KnowledgeSearchBody
impl Send for KnowledgeSearchBody
impl Sync for KnowledgeSearchBody
impl Unpin for KnowledgeSearchBody
impl UnsafeUnpin for KnowledgeSearchBody
impl UnwindSafe for KnowledgeSearchBody
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more