pub struct OpenAIBackendBuilder {
pub config: OpenAIConfig,
pub model: ApiLLMModel,
}
Fields§
§config: OpenAIConfig
§model: ApiLLMModel
Implementations§
Source§impl OpenAIBackendBuilder
impl OpenAIBackendBuilder
pub fn init(self) -> Result<Arc<LLMBackend>>
Trait Implementations§
Source§impl Default for OpenAIBackendBuilder
impl Default for OpenAIBackendBuilder
Source§impl LLMApiConfigTrait for OpenAIBackendBuilder
impl LLMApiConfigTrait for OpenAIBackendBuilder
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 OpenAIBackendBuilder
impl LoggingConfigTrait for OpenAIBackendBuilder
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 OpenAIModelTrait for OpenAIBackendBuilder
impl OpenAIModelTrait for OpenAIBackendBuilder
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.
Source§fn gpt_4_32k(self) -> Selfwhere
Self: Sized,
fn gpt_4_32k(self) -> Selfwhere
Self: Sized,
Use gpt-4-32k as the model for the OpenAI client. Limited support for this model from OpenAI.
Source§fn gpt_4_turbo(self) -> Selfwhere
Self: Sized,
fn gpt_4_turbo(self) -> Selfwhere
Self: Sized,
Use gpt-4-turbo as the model for the OpenAI client.
Source§fn gpt_3_5_turbo(self) -> Selfwhere
Self: Sized,
fn gpt_3_5_turbo(self) -> Selfwhere
Self: Sized,
Use gpt-3.5-turbo as the model for the OpenAI client.
fn o1_preview<T>(self) -> Self
Auto Trait Implementations§
impl Freeze for OpenAIBackendBuilder
impl !RefUnwindSafe for OpenAIBackendBuilder
impl Send for OpenAIBackendBuilder
impl Sync for OpenAIBackendBuilder
impl Unpin for OpenAIBackendBuilder
impl !UnwindSafe for OpenAIBackendBuilder
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