pub struct DummyLMBuilder<S: State = Empty> { /* private fields */ }Expand description
Use builder syntax to set the inputs and finish with build().
Implementations§
Source§impl<S: State> DummyLMBuilder<S>
impl<S: State> DummyLMBuilder<S>
Sourcepub fn build(self) -> DummyLMwhere
S: IsComplete,
pub fn build(self) -> DummyLMwhere
S: IsComplete,
Finish building and return the requested object
Sourcepub fn api_key(self, value: String) -> DummyLMBuilder<SetApiKey<S>>where
S::ApiKey: IsUnset,
pub fn api_key(self, value: String) -> DummyLMBuilder<SetApiKey<S>>where
S::ApiKey: IsUnset,
Required.
Sourcepub fn base_url(self, value: String) -> DummyLMBuilder<SetBaseUrl<S>>where
S::BaseUrl: IsUnset,
pub fn base_url(self, value: String) -> DummyLMBuilder<SetBaseUrl<S>>where
S::BaseUrl: IsUnset,
Sourcepub fn maybe_base_url(
self,
value: Option<String>,
) -> DummyLMBuilder<SetBaseUrl<S>>where
S::BaseUrl: IsUnset,
pub fn maybe_base_url(
self,
value: Option<String>,
) -> DummyLMBuilder<SetBaseUrl<S>>where
S::BaseUrl: IsUnset,
Sourcepub fn temperature(self, value: f32) -> DummyLMBuilder<SetTemperature<S>>where
S::Temperature: IsUnset,
pub fn temperature(self, value: f32) -> DummyLMBuilder<SetTemperature<S>>where
S::Temperature: IsUnset,
Sourcepub fn maybe_temperature(
self,
value: Option<f32>,
) -> DummyLMBuilder<SetTemperature<S>>where
S::Temperature: IsUnset,
pub fn maybe_temperature(
self,
value: Option<f32>,
) -> DummyLMBuilder<SetTemperature<S>>where
S::Temperature: IsUnset,
Sourcepub fn max_tokens(self, value: u32) -> DummyLMBuilder<SetMaxTokens<S>>where
S::MaxTokens: IsUnset,
pub fn max_tokens(self, value: u32) -> DummyLMBuilder<SetMaxTokens<S>>where
S::MaxTokens: IsUnset,
Sourcepub fn maybe_max_tokens(
self,
value: Option<u32>,
) -> DummyLMBuilder<SetMaxTokens<S>>where
S::MaxTokens: IsUnset,
pub fn maybe_max_tokens(
self,
value: Option<u32>,
) -> DummyLMBuilder<SetMaxTokens<S>>where
S::MaxTokens: IsUnset,
Sourcepub fn cache(self, value: bool) -> DummyLMBuilder<SetCache<S>>where
S::Cache: IsUnset,
pub fn cache(self, value: bool) -> DummyLMBuilder<SetCache<S>>where
S::Cache: IsUnset,
Sourcepub fn maybe_cache(self, value: Option<bool>) -> DummyLMBuilder<SetCache<S>>where
S::Cache: IsUnset,
pub fn maybe_cache(self, value: Option<bool>) -> DummyLMBuilder<SetCache<S>>where
S::Cache: IsUnset,
Sourcepub fn cache_handler(
self,
value: Arc<Mutex<ResponseCache>>,
) -> DummyLMBuilder<SetCacheHandler<S>>where
S::CacheHandler: IsUnset,
pub fn cache_handler(
self,
value: Arc<Mutex<ResponseCache>>,
) -> DummyLMBuilder<SetCacheHandler<S>>where
S::CacheHandler: IsUnset,
Sourcepub fn maybe_cache_handler(
self,
value: Option<Arc<Mutex<ResponseCache>>>,
) -> DummyLMBuilder<SetCacheHandler<S>>where
S::CacheHandler: IsUnset,
pub fn maybe_cache_handler(
self,
value: Option<Arc<Mutex<ResponseCache>>>,
) -> DummyLMBuilder<SetCacheHandler<S>>where
S::CacheHandler: IsUnset,
Auto Trait Implementations§
impl<S> Freeze for DummyLMBuilder<S>
impl<S = Empty> !RefUnwindSafe for DummyLMBuilder<S>
impl<S> Send for DummyLMBuilder<S>
impl<S> Sync for DummyLMBuilder<S>
impl<S> Unpin for DummyLMBuilder<S>
impl<S = Empty> !UnwindSafe for DummyLMBuilder<S>
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> 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 more