pub enum Provider {
OpenAi,
OpenRouter,
Together,
Vllm,
Ollama,
}Expand description
A provider preset.
Variants§
Implementations§
Source§impl Provider
impl Provider
pub const ALL: [Provider; 5]
pub fn name(self) -> &'static str
pub fn from_name(name: &str) -> Option<Provider>
Sourcepub fn default_base_url(self) -> &'static str
pub fn default_base_url(self) -> &'static str
Base URL used when --base-url is not given.
Sourcepub fn key_env(self) -> Option<(&'static str, bool)>
pub fn key_env(self) -> Option<(&'static str, bool)>
Environment variable holding the API key, and whether it is required.
vLLM only needs a key when the server was started with --api-key.
Sourcepub fn default_model(self) -> Option<&'static str>
pub fn default_model(self) -> Option<&'static str>
Model used when --model is not given. None means the user must
pick one, because the provider’s catalog (or the local server) decides.
Sourcepub fn model_hint(self) -> &'static str
pub fn model_hint(self) -> &'static str
What to suggest when no model was given.
pub fn logprobs_param(self) -> LogprobsParam
Trait Implementations§
impl Copy for Provider
impl Eq for Provider
impl StructuralPartialEq for Provider
Auto Trait Implementations§
impl Freeze for Provider
impl RefUnwindSafe for Provider
impl Send for Provider
impl Sync for Provider
impl Unpin for Provider
impl UnsafeUnpin for Provider
impl UnwindSafe for Provider
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