pub struct EmbedderConfig {
pub endpoint_url: String,
pub model: String,
pub api_key: String,
pub dimensions: u32,
pub batch_size: usize,
pub timeout_ms: u64,
pub max_retries: u32,
pub max_input_tokens: usize,
}Expand description
Embedder configuration.
Fields§
§endpoint_url: StringOpenAI-compatible embedding endpoint URL (EMBEDDING_ENDPOINT_URL; required).
model: StringEmbedding model name (EMBEDDING_MODEL; required).
api_key: StringAPI key for the embedding endpoint (EMBEDDING_API_KEY; required).
dimensions: u32Output vector dimensions (EMBEDDING_DIMENSIONS; required).
batch_size: usizeNumber of texts per embedding batch (EMBEDDING_BATCH_SIZE; default 32).
timeout_ms: u64HTTP request timeout in milliseconds (EMBEDDING_TIMEOUT_MS; default 30000).
max_retries: u32Maximum number of retries on transient failures (EMBEDDING_MAX_RETRIES; default 3).
max_input_tokens: usizeMaximum tokens per input text (EMBEDDING_MAX_INPUT_TOKENS; default 8192).
Trait Implementations§
Source§impl Clone for EmbedderConfig
impl Clone for EmbedderConfig
Auto Trait Implementations§
impl Freeze for EmbedderConfig
impl RefUnwindSafe for EmbedderConfig
impl Send for EmbedderConfig
impl Sync for EmbedderConfig
impl Unpin for EmbedderConfig
impl UnsafeUnpin for EmbedderConfig
impl UnwindSafe for EmbedderConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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::RequestCreates a shared type from an unshared type.