pub trait OAIConfig:
Config
+ Send
+ Sync
+ 'static {
// Required methods
fn create() -> Self;
fn with_api_key<S: Into<String>>(&mut self, api_key: S) -> Self;
fn with_api_base<S: Into<String>>(&mut self, api_base: S) -> Self;
fn model_config() -> (String, Vec<String>);
fn tokenizer(&self) -> Box<dyn Tokenizer>;
}Expand description
config extension
Required Methods§
fn create() -> Self
fn with_api_key<S: Into<String>>(&mut self, api_key: S) -> Self
Sourcefn with_api_base<S: Into<String>>(&mut self, api_base: S) -> Self
fn with_api_base<S: Into<String>>(&mut self, api_base: S) -> Self
To use a API base url different from default OPENAI_API_BASE
fn model_config() -> (String, Vec<String>)
fn tokenizer(&self) -> Box<dyn Tokenizer>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.