pub struct PerplexityBackendBuilder {
pub config: GenericApiConfig,
pub model: ApiLLMModel,
}
Fields§
§config: GenericApiConfig
§model: ApiLLMModel
Implementations§
Source§impl PerplexityBackendBuilder
impl PerplexityBackendBuilder
pub fn init(self) -> Result<Arc<LLMBackend>>
Trait Implementations§
Source§impl Default for PerplexityBackendBuilder
impl Default for PerplexityBackendBuilder
Source§impl LLMApiConfigTrait for PerplexityBackendBuilder
impl LLMApiConfigTrait for PerplexityBackendBuilder
fn api_base_config_mut(&mut self) -> &mut ApiConfig
fn api_config(&self) -> &ApiConfig
fn with_api_host<S: AsRef<str>>(self, host: S) -> Selfwhere
Self: Sized,
fn with_api_port<S: AsRef<str>>(self, port: S) -> Selfwhere
Self: Sized,
fn with_api_key<S: Into<String>>(self, api_key: S) -> Selfwhere
Self: Sized,
Source§impl LoggingConfigTrait for PerplexityBackendBuilder
impl LoggingConfigTrait for PerplexityBackendBuilder
fn logging_config_mut(&mut self) -> &mut LoggingConfig
Source§fn logging_enabled(self, enabled: bool) -> Selfwhere
Self: Sized,
fn logging_enabled(self, enabled: bool) -> Selfwhere
Self: Sized,
Enables or disables logging for the configuration. Read more
Source§fn logger_name<S>(self, logger_name: S) -> Self
fn logger_name<S>(self, logger_name: S) -> Self
Sets the name of the logger. Read more
Source§fn log_level_trace(self) -> Selfwhere
Self: Sized,
fn log_level_trace(self) -> Selfwhere
Self: Sized,
Sets the log level to TRACE. Read more
Source§fn log_level_debug(self) -> Selfwhere
Self: Sized,
fn log_level_debug(self) -> Selfwhere
Self: Sized,
Sets the log level to DEBUG. Read more
Source§fn log_level_info(self) -> Selfwhere
Self: Sized,
fn log_level_info(self) -> Selfwhere
Self: Sized,
Sets the log level to INFO. Read more
Source§fn log_level_warn(self) -> Selfwhere
Self: Sized,
fn log_level_warn(self) -> Selfwhere
Self: Sized,
Sets the log level to WARN. Read more
Source§fn log_level_error(self) -> Selfwhere
Self: Sized,
fn log_level_error(self) -> Selfwhere
Self: Sized,
Sets the log level to ERROR. Read more
Source§impl PerplexityModelTrait for PerplexityBackendBuilder
impl PerplexityModelTrait for PerplexityBackendBuilder
fn model(&mut self) -> &mut ApiLLMModel
Source§fn model_id_str(self, model_id: &str) -> Selfwhere
Self: Sized,
fn model_id_str(self, model_id: &str) -> Selfwhere
Self: Sized,
Set the model using the model_id string.
fn sonar_small(self) -> Selfwhere
Self: Sized,
fn sonar_large(self) -> Selfwhere
Self: Sized,
fn sonar_huge(self) -> Selfwhere
Self: Sized,
Auto Trait Implementations§
impl Freeze for PerplexityBackendBuilder
impl !RefUnwindSafe for PerplexityBackendBuilder
impl Send for PerplexityBackendBuilder
impl Sync for PerplexityBackendBuilder
impl Unpin for PerplexityBackendBuilder
impl !UnwindSafe for PerplexityBackendBuilder
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> 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