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
The filter type for this backend.
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
Mutably borrows from an owned value. Read more
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>
Wrap the input message
T in a tonic::RequestSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T, F> PortableTool for Twhere
F: SearchFilter<Value = Value> + WasmCompatSend + WasmCompatSync + for<'de> Deserialize<'de>,
T: VectorStoreIndex<Filter = F>,
impl<T, F> PortableTool 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"
Unique registration and provider-facing name.
Source§type Error = VectorStoreError
type Error = VectorStoreError
Concrete author-facing failure.
Source§type Args = VectorSearchRequest<F>
type Args = VectorSearchRequest<F>
Owned JSON arguments.
Source§type Output = Vec<VectorStoreOutput>
type Output = Vec<VectorStoreOutput>
Canonical model-visible output.
Source§fn description(&self) -> String
fn description(&self) -> String
Model-facing description.
Source§fn parameters(&self) -> Value
fn parameters(&self) -> Value
JSON Schema for arguments.
Source§async fn call(
&self,
args: <T as PortableTool>::Args,
) -> Result<<T as PortableTool>::Output, <T as PortableTool>::Error>
async fn call( &self, args: <T as PortableTool>::Args, ) -> Result<<T as PortableTool>::Output, <T as PortableTool>::Error>
Execute one owned invocation without runtime access.
Source§fn map_error(&self, error: Self::Error) -> ToolExecutionError
fn map_error(&self, error: Self::Error) -> ToolExecutionError
Normalize a concrete failure at the runtime effect boundary.