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,
) -> Result<Vec<(f64, String, T)>, VectorStoreError>
async fn top_n<T: for<'a> Deserialize<'a> + Send>( &self, req: VectorSearchRequest, ) -> 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,
) -> Result<Vec<(f64, String)>, VectorStoreError>
async fn top_n_ids( &self, req: VectorSearchRequest, ) -> 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.
Auto Trait Implementations§
impl<M> !Freeze for QdrantVectorStore<M>
impl<M> RefUnwindSafe for QdrantVectorStore<M>where
M: RefUnwindSafe,
impl<M> Send for QdrantVectorStore<M>
impl<M> Sync for QdrantVectorStore<M>
impl<M> Unpin for QdrantVectorStore<M>where
M: Unpin,
impl<M> UnwindSafe for QdrantVectorStore<M>where
M: UnwindSafe,
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
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> Tool for Twhere
T: VectorStoreIndex,
impl<T> Tool for Twhere
T: VectorStoreIndex,
Source§const NAME: &'static str = "search_vector_store"
const NAME: &'static str = "search_vector_store"
The name of the tool. This name should be unique.
Source§type Error = VectorStoreError
type Error = VectorStoreError
The error type of the tool.
Source§type Args = VectorSearchRequest
type Args = VectorSearchRequest
The arguments type of the tool.
Source§type Output = Vec<VectorStoreOutput>
type Output = Vec<VectorStoreOutput>
The output type of the tool.
Source§async fn definition(&self, _prompt: String) -> ToolDefinition
async fn definition(&self, _prompt: String) -> ToolDefinition
A method returning the tool definition. The user prompt can be used to
tailor the definition to the specific use case.