pub struct OpenAIConfig {
pub model: OpenAIModel,
pub dimensions: Option<usize>,
pub max_retries: u32,
pub retry_base_delay_ms: u64,
pub max_concurrent_requests: usize,
pub cache_capacity: usize,
pub timeout_secs: u64,
pub api_base: Option<String>,
}Expand description
Configuration for the OpenAI embedding provider.
Fields§
§model: OpenAIModelThe model to use.
dimensions: Option<usize>Custom dimensions (only for v3 models).
max_retries: u32Maximum retries for failed requests.
retry_base_delay_ms: u64Base delay for exponential backoff (milliseconds).
max_concurrent_requests: usizeMaximum concurrent requests.
cache_capacity: usizeCache capacity (number of embeddings to cache).
timeout_secs: u64Request timeout in seconds.
api_base: Option<String>Custom API base URL (for proxies or Azure).
Trait Implementations§
Source§impl Clone for OpenAIConfig
impl Clone for OpenAIConfig
Source§fn clone(&self) -> OpenAIConfig
fn clone(&self) -> OpenAIConfig
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 OpenAIConfig
impl Debug for OpenAIConfig
Auto Trait Implementations§
impl Freeze for OpenAIConfig
impl RefUnwindSafe for OpenAIConfig
impl Send for OpenAIConfig
impl Sync for OpenAIConfig
impl Unpin for OpenAIConfig
impl UnsafeUnpin for OpenAIConfig
impl UnwindSafe for OpenAIConfig
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> 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