pub struct TimeoutConfig {
pub request_timeout: Duration,
pub stream_timeout: Duration,
pub embedding_timeout: Duration,
}Expand description
Configuration for timeout behavior
Fields§
§request_timeout: DurationTimeout for completion requests (default: 60s)
stream_timeout: DurationTimeout for streaming requests (default: 120s)
embedding_timeout: DurationTimeout for embedding requests (default: 30s)
Implementations§
Source§impl TimeoutConfig
impl TimeoutConfig
Sourcepub fn uniform(timeout: Duration) -> Self
pub fn uniform(timeout: Duration) -> Self
Create a new config with a uniform timeout for all request types
Sourcepub fn with_request_timeout(self, timeout: Duration) -> Self
pub fn with_request_timeout(self, timeout: Duration) -> Self
Set the request timeout
Sourcepub fn with_stream_timeout(self, timeout: Duration) -> Self
pub fn with_stream_timeout(self, timeout: Duration) -> Self
Set the stream timeout
Sourcepub fn with_embedding_timeout(self, timeout: Duration) -> Self
pub fn with_embedding_timeout(self, timeout: Duration) -> Self
Set the embedding timeout
Trait Implementations§
Source§impl Clone for TimeoutConfig
impl Clone for TimeoutConfig
Source§fn clone(&self) -> TimeoutConfig
fn clone(&self) -> TimeoutConfig
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 TimeoutConfig
impl Debug for TimeoutConfig
Auto Trait Implementations§
impl Freeze for TimeoutConfig
impl RefUnwindSafe for TimeoutConfig
impl Send for TimeoutConfig
impl Sync for TimeoutConfig
impl Unpin for TimeoutConfig
impl UnwindSafe for TimeoutConfig
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