pub trait Config: Clone {
// Required methods
fn headers(&self) -> HeaderMap;
fn url(&self, path: &str) -> String;
fn query(&self) -> Vec<(&str, &str)>;
fn api_base(&self) -> &str;
fn api_key(&self) -> &SecretString;
}
Expand description
crate::Client relies on this for every API call on OpenAI or Azure OpenAI service
Required Methods§
fn headers(&self) -> HeaderMap
fn url(&self, path: &str) -> String
fn query(&self) -> Vec<(&str, &str)>
fn api_base(&self) -> &str
fn api_key(&self) -> &SecretString
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.