pub struct VectorConfigBuilder { /* private fields */ }Expand description
Fluent builder for VectorConfig.
Implementations§
Source§impl VectorConfigBuilder
impl VectorConfigBuilder
Sourcepub fn embedding_service_url(self, url: impl Into<String>) -> Self
pub fn embedding_service_url(self, url: impl Into<String>) -> Self
Set the embedding service gRPC URL.
Sourcepub fn default_dimensions(self, dims: usize) -> Self
pub fn default_dimensions(self, dims: usize) -> Self
Set the default embedding dimensionality.
Sourcepub fn ef_construction(self, ef: usize) -> Self
pub fn ef_construction(self, ef: usize) -> Self
Set the HNSW ef_construction parameter.
Sourcepub fn m_connections(self, m: usize) -> Self
pub fn m_connections(self, m: usize) -> Self
Set the HNSW M connections parameter.
Sourcepub fn max_elements(self, n: usize) -> Self
pub fn max_elements(self, n: usize) -> Self
Set the maximum number of vectors per index.
Sourcepub fn cache_size(self, n: usize) -> Self
pub fn cache_size(self, n: usize) -> Self
Set the LRU embedding cache capacity.
Sourcepub fn batch_size(self, n: usize) -> Self
pub fn batch_size(self, n: usize) -> Self
Set the maximum batch size for embedding calls.
Sourcepub fn embedding_timeout_ms(self, ms: u64) -> Self
pub fn embedding_timeout_ms(self, ms: u64) -> Self
Set the embedding gRPC call timeout in milliseconds.
Sourcepub fn num_threads(self, n: usize) -> Self
pub fn num_threads(self, n: usize) -> Self
Set the number of rayon threads.
Sourcepub fn default_workspace_id(self, workspace_id: impl Into<String>) -> Self
pub fn default_workspace_id(self, workspace_id: impl Into<String>) -> Self
Set the default workspace id.
Sourcepub fn api_key_store_path(self, path: impl Into<PathBuf>) -> Self
pub fn api_key_store_path(self, path: impl Into<PathBuf>) -> Self
Set the API key store path.
Sourcepub fn rate_limit_rps(self, rps: u32) -> Self
pub fn rate_limit_rps(self, rps: u32) -> Self
Set the workspace rate limit in requests per second.
Sourcepub fn require_auth(self, require_auth: bool) -> Self
pub fn require_auth(self, require_auth: bool) -> Self
Set whether request authentication is required.
Sourcepub fn build(self) -> VectorResult<VectorConfig>
pub fn build(self) -> VectorResult<VectorConfig>
Validate and return the completed VectorConfig.
§Errors
dimensionsmust be ≥ 1ef_constructionmust be ≥m_connectionsm_connectionsmust be ≥ 2
Trait Implementations§
Source§impl Clone for VectorConfigBuilder
impl Clone for VectorConfigBuilder
Source§fn clone(&self) -> VectorConfigBuilder
fn clone(&self) -> VectorConfigBuilder
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 VectorConfigBuilder
impl Debug for VectorConfigBuilder
Source§impl Default for VectorConfigBuilder
impl Default for VectorConfigBuilder
Source§fn default() -> VectorConfigBuilder
fn default() -> VectorConfigBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for VectorConfigBuilder
impl RefUnwindSafe for VectorConfigBuilder
impl Send for VectorConfigBuilder
impl Sync for VectorConfigBuilder
impl Unpin for VectorConfigBuilder
impl UnsafeUnpin for VectorConfigBuilder
impl UnwindSafe for VectorConfigBuilder
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§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::Request