pub struct QueryTextRequest {
pub text: String,
pub top_k: u32,
pub filter: Option<Value>,
pub include_text: bool,
pub include_vectors: bool,
pub model: Option<EmbeddingModel>,
}Expand description
Request to query using natural language text with automatic embedding.
Fields§
§text: StringQuery text.
top_k: u32Number of results to return.
filter: Option<Value>Optional metadata filter.
include_text: boolWhether to include the original text in results.
include_vectors: boolWhether to include vectors in results.
model: Option<EmbeddingModel>Embedding model to use (default: minilm).
Implementations§
Source§impl QueryTextRequest
impl QueryTextRequest
Sourcepub fn with_filter(self, filter: Value) -> Self
pub fn with_filter(self, filter: Value) -> Self
Add a metadata filter.
Sourcepub fn include_text(self, include: bool) -> Self
pub fn include_text(self, include: bool) -> Self
Set whether to include the original text in results.
Sourcepub fn include_vectors(self, include: bool) -> Self
pub fn include_vectors(self, include: bool) -> Self
Set whether to include vectors in results.
Sourcepub fn with_model(self, model: EmbeddingModel) -> Self
pub fn with_model(self, model: EmbeddingModel) -> Self
Set the embedding model.
Trait Implementations§
Source§impl Clone for QueryTextRequest
impl Clone for QueryTextRequest
Source§fn clone(&self) -> QueryTextRequest
fn clone(&self) -> QueryTextRequest
Returns a duplicate of the value. Read more
1.0.0 · 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 QueryTextRequest
impl Debug for QueryTextRequest
Source§impl<'de> Deserialize<'de> for QueryTextRequest
impl<'de> Deserialize<'de> for QueryTextRequest
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
Auto Trait Implementations§
impl Freeze for QueryTextRequest
impl RefUnwindSafe for QueryTextRequest
impl Send for QueryTextRequest
impl Sync for QueryTextRequest
impl Unpin for QueryTextRequest
impl UnsafeUnpin for QueryTextRequest
impl UnwindSafe for QueryTextRequest
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