pub struct QdrantVectorStore<M: EmbeddingModel> { /* private fields */ }Expand description
Represents a vector store implementation using Qdrant - https://qdrant.tech/ as the backend.
Implementations§
Source§impl<M> QdrantVectorStore<M>where
M: EmbeddingModel,
impl<M> QdrantVectorStore<M>where
M: EmbeddingModel,
Sourcepub fn new(client: Qdrant, model: M, query_params: QueryPoints) -> Self
pub fn new(client: Qdrant, model: M, query_params: QueryPoints) -> Self
Creates a new instance of QdrantVectorStore.
§Arguments
client- Qdrant client instancemodel- Embedding model instancequery_params- Search parameters for vector queries Reference: https://api.qdrant.tech/v-1-12-x/api-reference/search/query-points
pub fn client(&self) -> &Qdrant
Trait Implementations§
Source§impl<Model> InsertDocuments for QdrantVectorStore<Model>
impl<Model> InsertDocuments for QdrantVectorStore<Model>
Source§impl<M> VectorStoreIndex for QdrantVectorStore<M>
impl<M> VectorStoreIndex for QdrantVectorStore<M>
Source§async fn top_n<T: for<'a> Deserialize<'a> + Send>(
&self,
req: VectorSearchRequest<Self::Filter>,
) -> Result<Vec<(f64, String, T)>, VectorStoreError>
async fn top_n<T: for<'a> Deserialize<'a> + Send>( &self, req: VectorSearchRequest<Self::Filter>, ) -> Result<Vec<(f64, String, T)>, VectorStoreError>
Search for the top n nearest neighbors to the given query within the Qdrant vector store.
Returns a vector of tuples containing the score, ID, and payload of the nearest neighbors.
Source§async fn top_n_ids(
&self,
req: VectorSearchRequest<Self::Filter>,
) -> Result<Vec<(f64, String)>, VectorStoreError>
async fn top_n_ids( &self, req: VectorSearchRequest<Self::Filter>, ) -> Result<Vec<(f64, String)>, VectorStoreError>
Search for the top n nearest neighbors to the given query within the Qdrant vector store.
Returns a vector of tuples containing the score and ID of the nearest neighbors.
Source§type Filter = QdrantFilter
type Filter = QdrantFilter
Auto Trait Implementations§
impl<M> !RefUnwindSafe for QdrantVectorStore<M>
impl<M> !UnwindSafe for QdrantVectorStore<M>
impl<M> Freeze for QdrantVectorStore<M>where
M: Freeze,
impl<M> Send for QdrantVectorStore<M>
impl<M> Sync for QdrantVectorStore<M>
impl<M> Unpin for QdrantVectorStore<M>where
M: Unpin,
impl<M> UnsafeUnpin for QdrantVectorStore<M>where
M: UnsafeUnpin,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T, F> Tool for Twhere
F: SearchFilter<Value = Value> + WasmCompatSend + WasmCompatSync + for<'de> Deserialize<'de>,
T: VectorStoreIndex<Filter = F>,
impl<T, F> Tool for Twhere
F: SearchFilter<Value = Value> + WasmCompatSend + WasmCompatSync + for<'de> Deserialize<'de>,
T: VectorStoreIndex<Filter = F>,
Source§const NAME: &'static str = "search_vector_store"
const NAME: &'static str = "search_vector_store"
ToolSet or other registration scope that dispatches tools by name.Source§type Error = VectorStoreError
type Error = VectorStoreError
Source§type Args = VectorSearchRequest<F>
type Args = VectorSearchRequest<F>
Source§type Output = Vec<VectorStoreOutput>
type Output = Vec<VectorStoreOutput>
Source§fn description(&self) -> String
fn description(&self) -> String
Source§fn parameters(&self) -> Value
fn parameters(&self) -> Value
Source§async fn call(
&self,
args: <T as Tool>::Args,
) -> Result<<T as Tool>::Output, <T as Tool>::Error>
async fn call( &self, args: <T as Tool>::Args, ) -> Result<<T as Tool>::Output, <T as Tool>::Error>
Source§fn call_with_extensions(
&self,
args: Self::Args,
_extensions: &ToolCallExtensions,
) -> impl Future<Output = Result<Self::Output, Self::Error>> + WasmCompatSend
fn call_with_extensions( &self, args: Self::Args, _extensions: &ToolCallExtensions, ) -> impl Future<Output = Result<Self::Output, Self::Error>> + WasmCompatSend
Source§fn classify_error(&self, error: &Self::Error) -> ToolFailure
fn classify_error(&self, error: &Self::Error) -> ToolFailure
ToolFailure. Read moreSource§fn call_structured(
&self,
args: Self::Args,
extensions: &ToolCallExtensions,
) -> impl Future<Output = Result<ToolReturn<Self::Output>, Self::Error>> + WasmCompatSend
fn call_structured( &self, args: Self::Args, extensions: &ToolCallExtensions, ) -> impl Future<Output = Result<ToolReturn<Self::Output>, Self::Error>> + WasmCompatSend
ToolReturn instead of a bare
output. Read moreSource§impl<T> ToolDyn for Twhere
T: Tool,
impl<T> ToolDyn for Twhere
T: Tool,
Source§fn call_structured<'a>(
&'a self,
args: String,
extensions: &'a ToolCallExtensions,
) -> Pin<Box<dyn Future<Output = ToolExecutionResult> + Send + 'a>>
fn call_structured<'a>( &'a self, args: String, extensions: &'a ToolCallExtensions, ) -> Pin<Box<dyn Future<Output = ToolExecutionResult> + Send + 'a>>
Routes through Tool::call_structured so rich returns
(ToolReturn) and Tool::classify_error are honored: a JSON
argument parse failure becomes an
InvalidArgs outcome, a returned
Err(Self::Error) is classified, and a successful ToolReturn is
serialized while preserving its outcome and extensions.